beckje01 / grails-code-coverage

Git Repo of the Grails Code Coverage plugin.
http://grails.org/plugin/code-coverage
16 stars 26 forks source link

Plugin crashed after upgrade #27

Open nbabynyuk opened 10 years ago

nbabynyuk commented 10 years ago

| Error Exception occurred trigger event [TestProduceReports]: java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementImpl (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementImpl at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown Source) at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.createDocument(XMLResultAggregator.java:241) at org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator.execute(XMLResultAggregator.java:144) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.codehaus.gant.GantBuilder.invokeMethod(GantBuilder.java:99) at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:61) at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:214) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at TestApp$_run_closure1.doCall(TestApp.groovy:82) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:591) at gant.Gant.executeTargets(Gant.groovy:590) Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.ElementImpl ... 39 more | Error Exception occurred trigger event [TestProduceReports]: java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementImpl | Tests FAILED - view reports in D:\Projects\grails-project\target\test-reports Done with post processing reports in 18ms | Cobertura Code Coverage Complete (view reports in: D:\Projects\grails-project\target\test-reports/cobertura) | Error Error executing script TestApp: org/apache/xerces/dom/ElementImpl (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementImpl at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(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.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at _GrailsPackage_groovy$_run_closure5.doCall(_GrailsPackage_groovy:74) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at _GrailsPackage_groovy$_run_closure2.doCall(_GrailsPackage_groovy:58) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at _GrailsBootstrap_groovy$_run_closure6.doCall(_GrailsBootstrap_groovy:122) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at _GrailsTest_groovy$_run_closure9.doCall(_GrailsTest_groovy:334) at _GrailsTest_groovy$_run_closure9.doCall(_GrailsTest_groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:168) at _GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:192) at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:184) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at TestApp$_run_closure1.doCall(TestApp.groovy:82) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:591) at gant.Gant.executeTargets(Gant.groovy:590) Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.ElementImpl ... 73 more | Error Error executing script TestApp: org/apache/xerces/dom/ElementImpl

Environment:

grails --version Grails version: 2.2.0 java -version java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) Plugin version : ':code-coverage:2.0.3-1'

beckje01 commented 10 years ago

There seems to be a bug related to just 2.2.0, with 2.2.1 it doesn't have the same error. For now I would suggest using the older version of the plugin.

biancarosa commented 10 years ago

Hi. I also had this problem with Grails 2.0.4 and managed to make it work running with " -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl".

It's not my favourite solution, but it's better than using the older version because I was having some problems with it. (java.lang.VerifyError: Expecting a stackmap frame at branch target... something about Coverage version not being compatible w/ JDK 7)

nbabynyuk commented 10 years ago

Thanks a lot! For now I switched to the previous version.

2014-06-26 22:55 GMT+03:00 Bianca Rosa notifications@github.com:

Hi. I also had this problem with Grails 2.0.4 and managed to make it work running with " -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl".

It's not my favourite solution, but it's better than using the older version because I was having some problems with it. (java.lang.VerifyError: Expecting a stackmap frame at branch target... something about Coverage version not being compatible w/ Grails 2)

— Reply to this email directly or view it on GitHub https://github.com/beckje01/grails-code-coverage/issues/27#issuecomment-47272008 .

beckje01 commented 10 years ago

@biancarosa Thanks for the info, I'm thinking the updated plugin will need a newer version of grails without your work around. I'm going to add your workaround to the plugin page.

beckje01 commented 10 years ago

Would anyone be willing to test the latest snapshot of the plugin with one of these projects?

biancarosa commented 10 years ago

@beckje01 How should I put the dependency of the new version in my BuildConfig.groovy? I'm using test ":code-coverage:2.0.3-2-SNAPSHOT" but it doesn't seem to find it.

beckje01 commented 10 years ago

You would need to if you don't mind build the plugin locally.

In the cloned repo run:

The snapshot will be in the local repo on the computer. Thank you so much for the support.

biancarosa commented 10 years ago

Still getting an error.

| java.lang.NoClassDefFoundError: org/apache/xerces/dom/ElementImpl at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.startTestSuite(XMLJUnitResultFormatter.java:115) Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.ElementImpl at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 1 more | Failure: Test mechanism | java.lang.NullPointerException at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.endTest(XMLJUnitResultFormatter.java:215) at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.formatError(XMLJUnitResultFormatter.java:270) at org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.addError(XMLJUnitResultFormatter.java:265)

beckje01 commented 10 years ago

Ok thanks for the help, I'm going to release the latest version with a note about your work around. That seems to be as good as I can do at this time for older grails versions and newer cobetura....

If anyone objects or has concerns let me know.

beckje01 commented 10 years ago

Any chance we could try with the latest version of the plugin there was some more changes included to help with ant