Quantcast

[JIRA] (JENKINS-15351) Exception while processing cpd report.

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Affects Versions: current
Assignee: Ulli Hafner
Components: dry
Created: 28/Sep/12 1:26 PM
Description:

Plugin version: 2.30

My Maven build creates a cpd.xml that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd>
</pmd-cpd>

And I'm seeing the following exception in the Jenkins log when the DRY plugin is enabled:

org.apache.commons.digester3.Digester error
SEVERE: Parse Error at line 2 column 10: Document root element "pmd-cpd", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "pmd-cpd", must match DOCTYPE root "null".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
at hudson.plugins.dry.parser.cpd.CpdParser.accepts(CpdParser.java:48)
at hudson.plugins.dry.parser.DuplicationParserRegistry.parse(DuplicationParserRegistry.java:77)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:261)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:220)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:169)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2196)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
org.apache.commons.digester3.Digester error
SEVERE: Parse Error at line 2 column 10: Document is invalid: no grammar found.
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
at hudson.plugins.dry.parser.cpd.CpdParser.accepts(CpdParser.java:48)
at hudson.plugins.dry.parser.DuplicationParserRegistry.parse(DuplicationParserRegistry.java:77)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:261)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:220)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:169)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2196)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Do I need to somehow disable validation on the cpd.xml file? Or is the cpd.xml file malformed?

The exception seems to occur regardless of whether the cpd.xml file contains warnings or not.

Despite this exception, the plugin appears to report the correct number of duplicate code warnings.

However, the exceptions are filling the Jenkins log.

Project: Jenkins
Priority: Major Major
Reporter: Mat Lowery
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org

We're seing this as well using Jenkins 1.470 and DRY Plugin 2.28.

The stack trace scared a colleague because he though that his release build had failed, when in fact it had succeeded.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Mat Lowery (28/Sep/12 1:52 PM)
Description: Jenkins version: 1.476
Plugin version: 2.30

My Maven build creates a cpd.xml that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd>
</pmd-cpd>

And I'm seeing the following exception in the Jenkins log when the DRY plugin is enabled:

org.apache.commons.digester3.Digester error
SEVERE: Parse Error at line 2 column 10: Document root element "pmd-cpd", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "pmd-cpd", must match DOCTYPE root "null".
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
        at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
        at hudson.plugins.dry.parser.cpd.CpdParser.accepts(CpdParser.java:48)
        at hudson.plugins.dry.parser.DuplicationParserRegistry.parse(DuplicationParserRegistry.java:77)
        at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:261)
        at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:220)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:169)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2196)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
org.apache.commons.digester3.Digester error
SEVERE: Parse Error at line 2 column 10: Document is invalid: no grammar found.
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
        at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
        at hudson.plugins.dry.parser.cpd.CpdParser.accepts(CpdParser.java:48)
        at hudson.plugins.dry.parser.DuplicationParserRegistry.parse(DuplicationParserRegistry.java:77)
        at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:261)
        at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:220)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:169)
        at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2196)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Do I need to somehow disable validation on the cpd.xml file?  Or is the cpd.xml file malformed?

The exception seems to occur regardless of whether the cpd.xml file contains warnings or not.

Despite this exception, the plugin appears to report the correct number of duplicate code warnings.

However, the exceptions are filling the Jenkins log.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Ulli Hafner (29/Sep/12 7:08 AM)
Priority: Major Minor
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: Ulli Hafner
Path:
src/main/java/hudson/plugins/dry/parser/cpd/CpdParser.java
http://jenkins-ci.org/commit/dry-plugin/dd207d5c076d0b25138cc48d0e33e6a030f6a048
Log:
[FIXED JENKINS-15351] Don't validate CPD report with empty schema.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: SCM/JIRA link daemon (05/Oct/12 8:58 AM)
Status: Open Resolved
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I tried version 2.33 of this plugin and it solved the issue for us. Thank you!

I noted that in the ChangeLog at https://wiki.jenkins-ci.org/display/JENKINS/DRY+Plugin the issue number for this issue is wrong. It is currently listed there as JENKINS-15354.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Ulli Hafner commented on Bug JENKINS-15351

Thanks. BTW: you also have the rights to modify the wiki

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15351) Exception while processing cpd report.

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Ulli Hafner closed Bug JENKINS-15351 as Fixed
Change By: Ulli Hafner (11/Oct/12 2:05 PM)
Status: Resolved Closed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Loading...