You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jim Christenson <ji...@wolterskluwer.com> on 2006/04/07 17:29:55 UTC

[m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3

I upgraded to version 2.1.3 of the maven-surefire-plugin for the forkmode
fixes on windows -- solved lots of problems, but created others.

I have a set of unit tests that run just fine when I have forkmode set to
none.  However, when I set forkmode to perTest I get a bunch of
'java.lang.IncompatibleClassChangeError' exceptions.  (see dump below)

It looks like a problem with XercesImpl, but I don't see that as a
dependency of the surefire plugin.  

Does anybody have any suggestions?

Thanks for any and all help.
Jim





    <error
type="java.lang.IncompatibleClassChangeError">java.lang.IncompatibleClassChangeError
 at net.sf.ehcache.config.BeanHandler.startElement(BeanHandler.java:113)
 at org.apache.xerces.parsers.AbstractSAXParser.startElement(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 javax.xml.parsers.SAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at net.sf.ehcache.config.Configurator.configure(Configurator.java:130)
 at net.sf.ehcache.CacheManager.configure(CacheManager.java:166)
 at net.sf.ehcache.CacheManager.&lt;init&gt;(CacheManager.java:138)
 at net.sf.ehcache.CacheManager.create(CacheManager.java:193)
 at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:209)
 at
com.bankerssystems.framework.cache.ehcache.EHCacheFactory.&lt;init&gt;(EHCacheFactory.java:27)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
 at java.lang.Class.newInstance0(Class.java:308)
 at java.lang.Class.newInstance(Class.java:261)
 at
com.bankerssystems.framework.cache.CacheFactory.createFactory(CacheFactory.java:133)
 at
com.bankerssystems.framework.cache.CacheFactory.getInstance(CacheFactory.java:87)
 at
com.bankerssystems.framework.cache.ehcache.EHCacheTest.setUp(EHCacheTest.java:39)
 at junit.framework.TestCase.runBare(TestCase.java:125)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
 at
org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
 at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:126)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
--
View this message in context: http://www.nabble.com/-m2-IncompatibleClassChangeError-using-maven-surefire-plugin-2.1.3-t1412704.html#a3805791
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3

Posted by Jim Christenson <ji...@wolterskluwer.com>.
Here is a brief update -- the problem has been solved.

To solve this I took the latest distribution of xalan and installed it to my
local repository as version 2.7.0.1.jim and updated dependencies.  Note:  I
also did this for xml-apis, xerces-impl, and I added the serializer.jar  

Note:  It looks like the central repository has a bad version (2.7.0) of
xalan and not the real 2.7.0 release.

Anyhow, by having the right jar files in my local repository and having them
in the jdk endorsed folder I was able to get everything working.

Jim
--
View this message in context: http://www.nabble.com/-m2-IncompatibleClassChangeError-using-maven-surefire-plugin-2.1.3-t1412704.html#a3862223
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3

Posted by apill <ap...@dolby.co.uk>.
I have the identical situation with cobertura and surefire.

Did you manage to find a permanent solution for other users?
--
View this message in context: http://www.nabble.com/-m2-IncompatibleClassChangeError-using-maven-surefire-plugin-2.1.3-t1412704.html#a3843168
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3

Posted by Jim Christenson <ji...@wolterskluwer.com>.
Okay, the original post was out of frustration...  Sorry.

The problem is that the latest version of xalan on ibiblio seems to have the
wrong stuff in the jar file.  Further, the serializer jar file is missing.

Going to look into this more, but by replacing xalan with a local copy
everything works.

Jim
--
View this message in context: http://www.nabble.com/-m2-IncompatibleClassChangeError-using-maven-surefire-plugin-2.1.3-t1412704.html#a3806655
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3

Posted by ia...@jpmchase.com.
It sounds like there's a disparity in your classpath between the forked and
non-forked VM's.  I know that there used to be a bug in
maven-surefire-plugin that prevented it from properly setting the classpath
on windows for forked VM's.  This bug was fixed in SVN, but I'm not sure
whether that fix made it into 2.1.3.

Something worth looking into if you think it might apply.


HTH,
Ian

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


                                                                                                                                              
                      Jim Christenson                                                                                                         
                      <jim.christenson@wolters        To:       users@maven.apache.org                                                        
                      kluwer.com>                     cc:                                                                                     
                                                      Subject:  [m2] IncompatibleClassChangeError using maven-surefire-plugin 2.1.3           
                      04/07/2006 11:29 AM                                                                                                     
                      Please respond to "Maven                                                                                                
                      Users List"                                                                                                             
                                                                                                                                              





I upgraded to version 2.1.3 of the maven-surefire-plugin for the forkmode
fixes on windows -- solved lots of problems, but created others.

I have a set of unit tests that run just fine when I have forkmode set to
none.  However, when I set forkmode to perTest I get a bunch of
'java.lang.IncompatibleClassChangeError' exceptions.  (see dump below)

It looks like a problem with XercesImpl, but I don't see that as a
dependency of the surefire plugin.

Does anybody have any suggestions?

Thanks for any and all help.
Jim





    <error
type="java.lang.IncompatibleClassChangeError">java.lang.IncompatibleClassChangeError

 at net.sf.ehcache.config.BeanHandler.startElement(BeanHandler.java:113)
 at org.apache.xerces.parsers.AbstractSAXParser.startElement(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 javax.xml.parsers.SAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at net.sf.ehcache.config.Configurator.configure(Configurator.java:130)
 at net.sf.ehcache.CacheManager.configure(CacheManager.java:166)
 at net.sf.ehcache.CacheManager.&lt;init&gt;(CacheManager.java:138)
 at net.sf.ehcache.CacheManager.create(CacheManager.java:193)
 at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:209)
 at
com.bankerssystems.framework.cache.ehcache.EHCacheFactory.&lt;init&gt;(EHCacheFactory.java:27)

 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

 at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

 at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
 at java.lang.Class.newInstance0(Class.java:308)
 at java.lang.Class.newInstance(Class.java:261)
 at
com.bankerssystems.framework.cache.CacheFactory.createFactory(CacheFactory.java:133)

 at
com.bankerssystems.framework.cache.CacheFactory.getInstance(CacheFactory.java:87)

 at
com.bankerssystems.framework.cache.ehcache.EHCacheTest.setUp(EHCacheTest.java:39)

 at junit.framework.TestCase.runBare(TestCase.java:125)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:324)
 at
org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)

 at
org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)

 at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:126)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
--
View this message in context:
http://www.nabble.com/-m2-IncompatibleClassChangeError-using-maven-surefire-plugin-2.1.3-t1412704.html#a3805791

Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org