Re: Another bad Maven day

From: Dain Sundstrom (dai..q80.com)
Date: Tue Mar 13 2007 - 18:26:58 EDT

  • Next message: wilhelm.krah..ataobjects.info: "hello"

    I ran into a problem similar problem with maven the other day.... The
    maven project released a new version (2.3) of the surefire test
    plugin. This plugin changed the class loader model among other
    stuff. It appears that the plugin now has a child first delegation
    model on, which means, for example, that classes loaded by the
    javaagent are not visible to test classes.

    Ultimately, I was not able to code around all the changes and simply
    "fixed" the situation by hard coding the plugin to version 2.2.

    -dain

    On Mar 13, 2007, at 11:09 AM, Andrus Adamchik wrote:

    > Something changed in the Maven unit test class loading....
    > Instrumentation args no longer work... Somehow I think this is
    > related to the new version of the surefire plugin that I noticed
    > was loaded on March 7 :-(
    >
    > Andrus
    >
    >
    > [INFO] Surefire report directory: /Users/andrus/work/cayenne/itests/
    > pojo/target/surefire-reports
    > *** CayenneAgent starting...
    > org.apache.maven.surefire.booter.SurefireExecutionException:
    > org.apache.cayenne.itest.pojo.ExposedPkTest; nested exception is
    > java.lang.ExceptionInInitializerError: null; nested exception is
    > org.apache.maven.surefire.testset.TestSetFailedException:
    > org.apache.cayenne.itest.pojo.ExposedPkTest; nested exception is
    > java.lang.ExceptionInInitializerError: null
    > org.apache.maven.surefire.testset.TestSetFailedException:
    > org.apache.cayenne.itest.pojo.ExposedPkTest; nested exception is
    > java.lang.ExceptionInInitializerError: null
    > java.lang.ExceptionInInitializerError
    > 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:494)
    > at junit.framework.TestSuite.createTest(TestSuite.java:131)
    > at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
    > at junit.framework.TestSuite.<init>(TestSuite.java:75)
    > 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:494)
    > at
    > org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject
    > (JUnitTestSet.java:151)
    > at org.apache.maven.surefire.junit.JUnitTestSet.getTestCount
    > (JUnitTestSet.java:247)
    > at
    > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestS
    > ets(AbstractDirectoryTestSuite.java:104)
    > at
    > org.apache.maven.surefire.Surefire.createSuiteFromDefinition
    > (Surefire.java:150)
    > at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
    > 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:585)
    > at
    > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess
    > (SurefireBooter.java:290)
    > at org.apache.maven.surefire.booter.SurefireBooter.main
    > (SurefireBooter.java:818)
    > Caused by: java.lang.NullPointerException
    > at org.apache.cayenne.itest.pojo.PojoTestCase.<clinit>
    > (PojoTestCase.java:35)
    > ... 22 more
    >



    This archive was generated by hypermail 2.0.0 : Tue Mar 13 2007 - 18:27:36 EDT