Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: Error: missing bug code for keyJUA #1272

Closed
BrainStone opened this issue Sep 2, 2020 · 2 comments · Fixed by #1326
Closed

java.lang.IllegalArgumentException: Error: missing bug code for keyJUA #1272

BrainStone opened this issue Sep 2, 2020 · 2 comments · Fixed by #1326

Comments

@BrainStone
Copy link

When running spotbugs through Gradle I get the following exception:

The following errors occurred during analysis:
  Could not generate HTML output
    java.lang.IllegalArgumentException: Error: missing bug code for keyJUA
      At edu.umd.cs.findbugs.DetectorFactoryCollection.getBugCode(DetectorFactoryCollection.java:509)
      At edu.umd.cs.findbugs.BugPattern.getBugCode(BugPattern.java:121)
      At edu.umd.cs.findbugs.BugInstance.getCWEid(BugInstance.java:1961)
      At edu.umd.cs.findbugs.BugInstance.writeXML(BugInstance.java:1989)
      At edu.umd.cs.findbugs.SortedBugCollection.writeXML(SortedBugCollection.java:554)
      At edu.umd.cs.findbugs.SortedBugCollection.toDocument(SortedBugCollection.java:443)
      At edu.umd.cs.findbugs.HTMLBugReporter.finish(HTMLBugReporter.java:52)
      At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
      At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
      At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1165)
      At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
      At com.github.spotbugs.snom.internal.SpotBugsRunnerForWorker$SpotBugsExecutor.execute(SpotBugsRunnerForWorker.java:97)
      At org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
      At org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
      At org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
      At org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
      At org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
      At org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:49)
      At org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:30)
      At org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:85)
      At org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:55)
      At org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
      At org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
      At org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
      At sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      At sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      At sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      At java.lang.reflect.Method.invoke(Method.java:498)
      At org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      At org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      At org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConne
ction.java:182)
      At org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConne
ction.java:164)
      At org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
      At org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
      At org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
      At java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      At java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      At org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
      At java.lang.Thread.run(Thread.java:748)

SpotBugs: 4.1.2
Gradle Plugin: 4.5.0
Gradle: 6.6

This does not happen in 4.1.1!

BrainStone added a commit to AuraDevelopmentTeam/GradleCommon that referenced this issue Sep 2, 2020
Downgrading because of this issue: spotbugs/spotbugs#1272
@cosmoJFH
Copy link

cosmoJFH commented Oct 1, 2020

We have recently upgraded the code to spotbugs 4.1.3 and we get the following error:

spotbugs:
[mkdir] Created dir: /jenkins/.hudson02/workspace/Tools/reports/spotbugs
[spotbugs] Executing SpotBugs FindBugsTask from ant task
[spotbugs] Running SpotBugs...
[spotbugs] java.lang.IllegalArgumentException: Error: missing bug code for keyJUA
[spotbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.getBugCode(DetectorFactoryCollection.java:509)
[spotbugs] at edu.umd.cs.findbugs.BugPattern.getBugCode(BugPattern.java:121)
[spotbugs] at edu.umd.cs.findbugs.BugInstance.getCWEid(BugInstance.java:1961)
[spotbugs] at edu.umd.cs.findbugs.BugInstance.writeXML(BugInstance.java:1989)
[spotbugs] at edu.umd.cs.findbugs.SortedBugCollection.writeXML(SortedBugCollection.java:554)
[spotbugs] at edu.umd.cs.findbugs.SortedBugCollection.writeXML(SortedBugCollection.java:467)
[spotbugs] at edu.umd.cs.findbugs.XMLBugReporter.finish(XMLBugReporter.java:47)
[spotbugs] at edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
[spotbugs] at edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
[spotbugs] at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1165)
[spotbugs] at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
[spotbugs] at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
[spotbugs] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
[spotbugs] Java Result: 4

And when the report is parsed in Jenkins we get the following info, since the xml was not complete:

[SpotBugs] [-ERROR-] Parsing of file '/jenkins/.hudson02/workspace//reports/spotbugs/Tools-sb.xml' failed due to an exception:
[SpotBugs] [-ERROR-] org.xml.sax.SAXParseException; lineNumber: 625; columnNumber: 1; XML document structures must start and end within the same entity.
[SpotBugs] [-ERROR-] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[SpotBugs] [-ERROR-] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
[SpotBugs] [-ERROR-] at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
[SpotBugs] [-ERROR-] at org.apache.commons.digester3.Digester.parse(Digester.java:1745)
[SpotBugs] [-ERROR-] at edu.hm.hafner.analysis.parser.FindBugsParser.preParse(FindBugsParser.java:211)
[SpotBugs] [-ERROR-] at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:99)
[SpotBugs] [-ERROR-] [wrapped] edu.hm.hafner.analysis.ParsingException: Exception occurred during parsing

@KengoTODA
Copy link
Member

this could be related to #1256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants