Error when selecting Quality Profile after upgrading from to 4.2 - upgrade

Recently upgraded from SonarQube 4.2 to SonarQube 4.3.
In the UI:
Get "We're sorry, but something went wrong." Clicked on "Go back to the homepage" and the following message is included towards the top of the page:
Only offset must be set on DebtRemediationFunction{type=CONSTANT_ISSUE, coefficient=1h, offset=}
In sonar.log:
2014.05.09 17:07:25 ERROR [o.s.s.ui.JRubyFacade] Fail to render: http://our-server.example/rules_configuration/index/9
undefined method `inject' for nil:NilClass
On line #52 of app/views/rules_configuration/index.html.erb
49: </div>
50: <div class="rule-search top">
51: <span class="note"><%= message('rules_configuration.repository') -%></span><br/>
52: <%= dropdown_tag "repositories", options_for_select(#select_repositories, #repositories), {
53: :show_search_box => true,
54: :width => '120px',
55: :placeholder => message('any')
gems/gems/actionpack-2.3.15/lib/action_view/helpers/form_options_helper.rb:292:in `options_for_select'
app/views/rules_configuration/index.html.erb:52:in `block_called_from_erb?'
org/jruby/RubyProc.java:290:in `call'
org/jruby/RubyProc.java:224:in `call'
gems/gems/actionpack-2.3.15/lib/action_view/helpers/capture_helper.rb:36:in `capture'
Updated with plugins and versions 5/13/2014
Plugins & Versions:
Build Breaker [buildbreaker] 1.1
Checkstyle [checkstyle] 2.1
Issues Report [issuesreport] 1.2.1
Java [java] 2.2
PMD [pmd] 2.1
Useless Code Tracker [uselesscodetracker] 1.0
Any ideas?

A JIRA ticket has been created to fix this issue : https://jira.codehaus.org/browse/SONAR-5335
You'll have to follow steps described in the description to manually fix it.

I have exactly the same issue. Seems like the only way is to rollback to 4.2, but it's only possible if you have DB backup.
Update: possible workaround
It seems to be a PMD plugin related issue. I found the following workaround:
Save a backup of your quality profile
Change the name in saved xml to prevent collision
Restore the profile from the saved xml
Use new profile instead of the original
You may notice that the number of active rules in a new profile is a bit decreased.

Related

MRTK V2.2 - Cant build because of error while creating certification

I updated to Mrtk from 2.1 to 2.2 and Unity from 2019.2.15 to 2019.3. In play-mode everything works fine but my build is failing because of following lines:
#1
Failed to create a file 'MRTK v2.0\QViewer Mrtk 2.2\Assets\WSATestCertificate.pfx'
UnityEditor.EditorUtility:WSACreateTestCertificate(String, String, String, Boolean)
#2
Error while creating certificate at 'MRTK v2.0\QViewer Mrtk 2.2\Assets\WSATestCertificate.pfx'
UnityEditor.EditorUtility:WSACreateTestCertificate(String, String, String, Boolean)
#3
InvalidOperationException: Failed to create test certificate.
PostProcessWinRT.CreateTestCertificate () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1045)
I tried to delete my old WSATestCertificate.pfx and switched my build folder, but that didnt help. Is sb else experiencing the same behaviour?
--Edit--
Link to issue on github.
I somehow "fixed" the problem, by downgrading Unity back to 2019.2.15 and updating again to 2019.3. Or by resetting my build and project settings in unity. The only part that does not look good are the 147 Warnings about obsolete api...but my building works now and the app runs!

Unity Cloud Build: Error: Unrecognized Project

This is my first time using Unity Cloud Build. I'm using BitBucket with SourceTree, I've also tried it with GitHub, but I keep getting the same error:
Error: unrecognized project! Please check your app configuration - if this is a Unity application, We expect your "Project Subdirectory" to be set to the path which directly contains the ProjectSettings and Assets directories. For a native app, this should be set to the path which directly contains the project file (.xcodeproj, project.properties, etc).
The project itself is simple, just one 3d character model and a basic walk animation just to make sure things were at a minimum. If anyone could help that would be great!
Here is the full log.
1: Running Prebuild steps
2: Removing bvr
3: Successfully uninstalled bvr-1.2.11
4: 1 gem installed
5: done.
6: bvr 1.2.12
7: bvr-api 0.2.4
8: Cloning the remote Git repository
9: Cloning repository ssh://git#bitbucket.org/jsmccloud/gm_animation_test.git
10: Fetching upstream changes from ssh://git#bitbucket.org/jsmccloud/gm_animation_test.git
11: Fetching upstream changes from ssh://git#bitbucket.org/jsmccloud/gm_animation_test.git
12: Checking out Revision d84217f8e82b1bedcd64256ae88a38b9226beb9b (refs/remotes/origin/master)
13: First time build. Skipping changelog.
14: Calculated Workspace Size: 308.73 MiB
15: PATH | SIZE
16: /GM_Animation_Test | 308.73 MiB
17: postcheckoutstatus finished successfully.
18: Error: unrecognized project! Please check your app configuration - if this is a Unity application, We expect your "Project Subdirectory" to be set to the path which directly contains the ProjectSettings and Assets directories. For a native app, this should be set to the path which directly contains the project file (.xcodeproj, project.properties, etc).
19: Build step 'Execute shell' marked build as failure
20: postbuildstatus finished successfully.
21: Finished: FAILURE
This is how I fixed the problem:
In my Unity project I set the following settings:
Under Edit>Project Settings>Editor
Set Version Control Mode to Visible Meta Files
Set Asset Serialization Mode to Force Text
Save project and close Unity. Apparently, leaving Unity open when I copy my files over to my repo directory had caused problems.
Everything seems to work fine now.

Jenkins tag name is invalid

Has anyone seen the following exception from Jenkins?
FATAL: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:179)
at hudson.plugins.git.GitAPI.tag(GitAPI.java:220)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1239)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1196)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
at hudson.model.Run.execute(Run.java:1567)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.eclipse.jgit.api.TagCommand.processOptions(TagCommand.java:198)
at org.eclipse.jgit.api.TagCommand.call(TagCommand.java:112)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:175)
... 14 more
This is a Scala project and we are using SBT 12.1 to build it. My googling has only returned issues with older versions of Jenkins which I am past. We have 1.506.
We have a ton of other projects building just fine and some of them are also Scala.
I got this error building a Java project. I'm not sure why this would suddenly crop up, but I was able to work around it by doing the following:
Go to the Advanced... config settings for the Source Code Management section of the build config and check "Skip Internal Tag".
(upgraded from comment)

Unable to properly link external Java library in Eclipse

I've been struggling to properly integrate this Netflix Java Client to access Netflix's API into a very basic Eclipse Java Web Project.
Whenever I try to publish any content referring to this library, I get errors like the following, indicating an inability to resolve the type of the classes in the external library I'm trying to use.
Aug 20, 2011 11:48:42 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/OSNet03] threw exception [Unable to compile class for JSP:
An error occurred at line: 19 in the jsp file: /index.jsp
NetflixAPIClient cannot be resolved to a type
16: String myConsumerKey = new String("cefjbgekg7566cqrp2atua2n");
17: String myConsumerSecret = new String("redacted");
18:
19: NetflixAPIClient apiClient = new NetflixAPIClient(myConsumerKey, myConsumerSecret);
20: String uri = APIEndpoints.MOVIE_URI + "/2361637";
21: String details = null;
At the top of the file I include the proper class directories like this:
<%# page import="com.netflix.api.*" %>
<%# page import="com.netflix.api.client.*" %>
<%# page import="com.netflix.api.client.dal.*" %>
And I don't receive any errors from Eclipse telling me it can't resolve the classes. Only once I publish it to the server does this error occur.
I've tried building with jre7 and jdk1.7.0. The library I'm trying to work with includes elements that are from Java v6 and v5.
I included the library by building it with Maven and placing the directory in my WEB-INF/lib folder and then including the jar netflix-client-2.3-SNAPSHOT.jar in my Build Path.
I've looked all over the web for possible causes and tried every prescribed solution I've found but none have worked.
You may be able to tell I'm very new to using Eclipse and Java Web Programming but I'm trying to figure things out as best I can as I go.
check if build automatically is on :P. if not try turning it on for once.
if yes then check the project build path and look for libraries. check if the correct jars are there.
also check if your jars are not corrupted.
these are the usual problems for more wait for sm1 else to answer.
you could also try searching for the resource class that can't be resolved using Ctrl+Shift+R and see if the class turns up.
if you don't get it, then just extract the jar and see if the class is there for real.

Zend_Tool CLI issues, throwing fatal errors

Before installing PHPUnit on my Ubuntu machine, I thought I had zf.sh all set up correctly. I was able to create a new project without any issues. Now, since installing PHPUnit, everything is not working right.
When I try to create a test project, I get this:
Fatal error: Cannot redeclare class PHPUnit_Framework_TestSuite_DataProvider in /usr/share/php/PHPUnit/Framework/TestSuite/DataProvider.php on line 64
Call Stack:
0.0011 110200 1. {main}() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/bin/zf.php:0
0.0011 110320 2. zf_main() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/bin/zf.php:23
0.0113 685448 3. zf_run() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/bin/zf.php:36
0.0113 685568 4. Zend_Tool_Framework_Client_Console::main() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/bin/zf.php:214
0.0114 686044 5. Zend_Tool_Framework_Client_Abstract->dispatch() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/library/Zend/Tool/Framework/Client/Console.php:96
0.0114 686164 6. Zend_Tool_Framework_Client_Abstract->initialize() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/library/Zend/Tool/Framework/Client/Abstract.php:209
0.0152 866128 7. Zend_Tool_Framework_Loader_Abstract->load() /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/library/Zend/Tool/Framework/Client/Abstract.php:118
0.4374 2729116 8. include_once('/usr/share/php/PHPUnit/Framework/TestSuite/DataProvider.php') /opt/ZendFramework/ZendFramework-1.9.3PL1-minimal/library/Zend/Tool/Framework/Loader/Abstract.php:90
What do I need to do to get it working again?
Update: I think I understand the reason why this is happening. In PHPUnit 3.4.0 there is a class with the same name as the Zend Framework 1.9.3. Apparently it is a known issue. But how can I get around this so I can use Zend_Tool again?? Can I downgrade PHPUnit? Will that fix the problem?
Update: This tutorial mentions something about installing a diff patch.
I found a temporary workaround:
Edit PHPUnit/Framework.php, near line 70:
require 'PHPUnit/Framework/TestSuite/DataProvider.php';
Change to:
require_once 'PHPUnit/Framework/TestSuite/DataProvider.php';
This is probably not the long-term fix, but it resolves the immediate symptom.
Update 2009-11-20: I just saw a commit to the ZF 1.9 branch that claims to resolve this issue. Presumably the fix will be in the next point-release (1.9.6) and in subsequent minor releases (1.10.0 and later).
Another solution, which doesn't require to change any 3th party code, is copying the PHPUnit folder to a location outside the include_path and create a symlink to the new location instead.
For details on this issue have a look here: Zend_Tool troubles PHPUnit