You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Mark Struberg <st...@yahoo.de> on 2012/07/28 19:48:49 UTC

stochastic test errors

Hi folks!

When doing a full build of the container module, I get the following Exception:

Test set: org.apache.openejb.persistence.ResourceLocalCdiEmTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.192 sec <<< FAILURE!
injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time elapsed: 2.097 sec  <<< FAILURE!
junit.framework.AssertionFailedError
        at junit.framework.Assert.fail(Assert.java:48)
        at junit.framework.Assert.assertTrue(Assert.java:20)
        at junit.framework.Assert.assertNotNull(Assert.java:218)
        at junit.framework.Assert.assertNotNull(Assert.java:211)
        at org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


If I start the test in the debugger, all works fine!

It seems the injection doesn't work.

Any tips?

LieGrue,
strub


Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.

I see. I will run them again and if they still fail for me then we should investigate a bit.

In
 OWB we also have such a test. It checks for doing a few iterations 
without interceptors and taking the time. Then we do it with 
interceptors enabled and check if the time is not worse than 5x the 
original time. Usually we are far below, but we had some regressions 
which heavily increased the time used. The 5x is just a rule of thumbs -
 I assume this test has a similar background.

LieGrue,
strub



----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> Cc: 
> Sent: Monday, July 30, 2012 4:14 PM
> Subject: Re: stochastic test errors
> 
> well this one is different,
> 
> we have several "bad tests" in the sense where we do some timing tests 
> so
> it is easy to make them failing but we *need* them. we should probably
> refactor them but not so easy :s
> 
> - Romain
> 
> 
> 2012/7/30 Mark Struberg <st...@yahoo.de>
> 
>>  In that case I rather give up a bit on speed if this 'trick' harms
>>  classloader rules.
>> 
>>  Btw, on Windows I get another error:
>> 
>>  testAging(org.apache.openejb.core.stateless.StatelessPoolStatsTest)  Time
>>  elapsed: 0.404 sec  <<< FAILURE!
>>  junit.framework.AssertionFailedError: Replaced expected:<3> but 
> was:<1>
>>          at junit.framework.Assert.fail(Assert.java:50)
>>          at junit.framework.Assert.failNotEquals(Assert.java:287)
>>          at junit.framework.Assert.assertEquals(Assert.java:67)
>>          at
>> 
> org.apache.openejb.core.stateless.StatelessPoolStatsTest.assertAttribute(StatelessPoolStatsTest.java:550)
>>          at
>> 
> org.apache.openejb.core.stateless.StatelessPoolStatsTest.testAging(StatelessPoolStatsTest.java:384)
>> 
>> 
>>  LieGrue,
>>  strub
>> 
>> 
>> 
>> 
>>  >________________________________
>>  > From: Romain Manni-Bucau <rm...@gmail.com>
>>  >To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
>>  >Sent: Monday, July 30, 2012 11:57 AM
>>  >Subject: Re: stochastic test errors
>>  >
>>  >Uncomment them :p
>>  >
>>  >The issue is the way the jdk loads classes. Catch the error, redo the 
> same
>>  >it works. We cut down some class loading for memory+speed that's 
> the
>>  cause.
>>  >You see it here because the test uses internals (so it cuts some more
>>  >stuff).
>>  >
>>  >- Romain
>>  >Le 30 juil. 2012 11:53, "Mark Struberg" 
> <st...@yahoo.de> a écrit :
>>  >
>>  >> There are some commented out lines in ApplicationComposer which 
> preload
>>  >> the classes I have problem with.
>>  >> But that looks pretty much like a hack and I think the underlying
>>  problem
>>  >> is much deeper.
>>  >>
>>  >> And again: those lines are commented out...
>>  >>
>>  >>
>>  >> LieGrue,
>>  >> strub
>>  >>
>>  >>
>>  >>
>>  >> ----- Original Message -----
>>  >> > From: Romain Manni-Bucau <rm...@gmail.com>
>>  >> > To: Mark Struberg <st...@yahoo.de>; 
> dev@openejb.apache.org
>>  >> > Cc:
>>  >> > Sent: Monday, July 30, 2012 11:30 AM
>>  >> > Subject: Re: stochastic test errors
>>  >> >
>>  >> > I think it was simply preloading this class in Core.
>>  >> >
>>  >> > - Romain
>>  >> > Le 30 juil. 2012 11:20, "Mark Struberg" 
> <st...@yahoo.de> a
>>  >> > écrit :
>>  >> >
>>  >> >>  Do you know what David fixed? I didn't find any 
> corresponding JIRA
>>  >> > entry.
>>  >> >>
>>  >> >>  LieGrue,
>>  >> >>  strub
>>  >> >>
>>  >> >>
>>  >> >>
>>  >> >>  ----- Original Message -----
>>  >> >>  > From: Romain Manni-Bucau 
> <rm...@gmail.com>
>>  >> >>  > To: dev@openejb.apache.org; Mark Struberg 
> <st...@yahoo.de>
>>  >> >>  > Cc:
>>  >> >>  > Sent: Monday, July 30, 2012 10:52 AM
>>  >> >>  > Subject: Re: stochastic test errors
>>  >> >>  >
>>  >> >>  > yep but seems you are the only once getting it 
> since David and JL
>>  ran
>>  >> > it
>>  >> >>  on
>>  >> >>  > mac os too i think
>>  >> >>  >
>>  >> >>  > I'm not familiar with macos jdk but any idea 
> what could be the
>>  >> > diff with
>>  >> >>  > win or linux jdk? both works
>>  >> >>  >
>>  >> >>  > - Romain
>>  >> >>  >
>>  >> >>  >
>>  >> >>  > 2012/7/30 Mark Struberg <st...@yahoo.de>
>>  >> >>  >
>>  >> >>  >>  nope, clean 7up on openejb svn trunk...
>>  >> >>  >>
>>  >> >>  >>  I'm using OSX-10.7 with jdk-1.6. It seems 
> to be a classloader
>>  >> > issue.
>>  >> >>  >>  It doesn't happen if I debug it in idea, 
> but breaks if I
>>  >> > start mvn test
>>  >> >>  >>  -Dtest=..
>>  >> >>  >>
>>  >> >>  >>
>>  >> >>  >>  Is there some temp-classloader or other 
> classloader magic
>>  >> > involved?
>>  >> >>  >>
>>  >> >>  >>
>>  >> >>  >>  LieGrue,
>>  >> >>  >>  strub
>>  >> >>  >>
>>  >> >>  >>  >________________________________
>>  >> >>  >>  > From: Romain Manni-Bucau 
> <rm...@gmail.com>
>>  >> >>  >>  >To: dev@openejb.apache.org; Mark Struberg
>>  >> > <st...@yahoo.de>
>>  >> >>  >>  >Sent: Monday, July 30, 2012 9:56 AM
>>  >> >>  >>  >Subject: Re: stochastic test errors
>>  >> >>  >>  >
>>  >> >>  >>  >
>>  >> >>  >>  >Hey Mark,
>>  >> >>  >>  >
>>  >> >>  >>  >JL got this error too but David fixed it 
> weeks ago...is it
>>  >> > possible
>>  >> >>  > your
>>  >> >>  >>  are not sync? (do you use github proxy?)
>>  >> >>  >>  >
>>  >> >>  >>  >- Romain
>>  >> >>  >>  >
>>  >> >>  >>  >
>>  >> >>  >>  >
>>  >> >>  >>  >2012/7/28 Mark Struberg 
> <st...@yahoo.de>
>>  >> >>  >>  >
>>  >> >>  >>  >I digged a bit deeper:
>>  >> >>  >>  >>
>>  >> >>  >>  >>Caused by: java.lang.LinkageError: 
> loader (instance of
>>  >> >>  >>  sun/misc/Launcher$ExtClassLoader): attempted  
> duplicate class
>>  >> >>  definition
>>  >> >>  >>  for name: 
> &quot;sun/security/pkcs11/SunPKCS11&quot;
>>  >> >>  >>  >>        at 
> java.lang.ClassLoader.defineClass1(Native
>>  >> > Method)
>>  >> >>  >>  >>        at
>>  >> >>  > 
> java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>  >> >>  >>  >>        at
>>  >> > java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>  >> >>  >>  >>...
>>  >> >>  >>  >>        at
>>  >> > org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>>  >> >>  >>  >>        at 
> org.hsqldb.jdbc.JDBCDriver.connect(Unknown
>>  >> > Source)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>>  >> >>  >>  >>...
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>>  >> >>  >>  >>        at
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>>  >> >>  >>  >>
>>  >> >>  >>  >>
>>  >> >>  >>  >>LieGrue,
>>  >> >>  >>  >>strub
>>  >> >>  >>  >>
>>  >> >>  >>  >>
>>  >> >>  >>  >>
>>  >> >>  >>  >>
>>  >> >>  >>  >>
>>  >> >>  >>  >>----- Original Message -----
>>  >> >>  >>  >>> From: Mark Struberg 
> <st...@yahoo.de>
>>  >> >>  >>  >>> To: openejb-dev 
> <de...@openejb.apache.org>
>>  >> >>  >>  >>> Cc:
>>  >> >>  >>  >>> Sent: Saturday, July 28, 2012 
> 7:48 PM
>>  >> >>  >>  >>> Subject: stochastic test errors
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> Hi folks!
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> When doing a full build of the 
> container module, I
>>  >> > get the
>>  >> >>  > following
>>  >> >>  >>  Exception:
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> Test set:
>>  >> >>  > 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest
>>  >> >>  >>  >>>
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> -------------------------------------------------------------------------------
>>  >> >>  >>  >>> Tests run: 1, Failures: 1, 
> Errors: 0, Skipped: 0,
>>  >> > Time
>>  >> >>  > elapsed: 2.192
>>  >> >>  >>  sec
>>  >> >>  >>  >>> <<< FAILURE!
>>  >> >>  >>  >>>
>>  >> >>  > 
> injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)
>>  >> Time
>>  >> >>  >>  elapsed:
>>  >> >>  >>  >>> 2.097 sec  <<< FAILURE!
>>  >> >>  >>  >>> 
> junit.framework.AssertionFailedError
>>  >> >>  >>  >>>         at
>>  >> > junit.framework.Assert.fail(Assert.java:48)
>>  >> >>  >>  >>>         at
>>  >> > junit.framework.Assert.assertTrue(Assert.java:20)
>>  >> >>  >>  >>>         at
>>  >> >>  > 
> junit.framework.Assert.assertNotNull(Assert.java:218)
>>  >> >>  >>  >>>         at
>>  >> >>  > 
> junit.framework.Assert.assertNotNull(Assert.java:211)
>>  >> >>  >>  >>>         at
>>  >> >>  >>  >>>
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>>  >> >>  >>  >>>         at
>>  >> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>  >> >>  > Method)
>>  >> >>  >>  >>>         at
>>  >> >>  >>  >>>
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>  >> >>  >>  >>>         at
>>  >> >>  >>  >>>
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>  >> >>  >>  >>>
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> If I start the test in the 
> debugger, all works fine!
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> It seems the injection 
> doesn't work.
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> Any tips?
>>  >> >>  >>  >>>
>>  >> >>  >>  >>> LieGrue,
>>  >> >>  >>  >>> strub
>>  >> >>  >>  >>>
>>  >> >>  >>  >>
>>  >> >>  >>  >
>>  >> >>  >>  >
>>  >> >>  >>  >
>>  >> >>  >>
>>  >> >>  >
>>  >> >>
>>  >> >
>>  >>
>>  >
>>  >
>>  >
>> 
> 

Re: stochastic test errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well this one is different,

we have several "bad tests" in the sense where we do some timing tests so
it is easy to make them failing but we *need* them. we should probably
refactor them but not so easy :s

- Romain


2012/7/30 Mark Struberg <st...@yahoo.de>

> In that case I rather give up a bit on speed if this 'trick' harms
> classloader rules.
>
> Btw, on Windows I get another error:
>
> testAging(org.apache.openejb.core.stateless.StatelessPoolStatsTest)  Time
> elapsed: 0.404 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: Replaced expected:<3> but was:<1>
>         at junit.framework.Assert.fail(Assert.java:50)
>         at junit.framework.Assert.failNotEquals(Assert.java:287)
>         at junit.framework.Assert.assertEquals(Assert.java:67)
>         at
> org.apache.openejb.core.stateless.StatelessPoolStatsTest.assertAttribute(StatelessPoolStatsTest.java:550)
>         at
> org.apache.openejb.core.stateless.StatelessPoolStatsTest.testAging(StatelessPoolStatsTest.java:384)
>
>
> LieGrue,
> strub
>
>
>
>
> >________________________________
> > From: Romain Manni-Bucau <rm...@gmail.com>
> >To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
> >Sent: Monday, July 30, 2012 11:57 AM
> >Subject: Re: stochastic test errors
> >
> >Uncomment them :p
> >
> >The issue is the way the jdk loads classes. Catch the error, redo the same
> >it works. We cut down some class loading for memory+speed that's the
> cause.
> >You see it here because the test uses internals (so it cuts some more
> >stuff).
> >
> >- Romain
> >Le 30 juil. 2012 11:53, "Mark Struberg" <st...@yahoo.de> a écrit :
> >
> >> There are some commented out lines in ApplicationComposer which preload
> >> the classes I have problem with.
> >> But that looks pretty much like a hack and I think the underlying
> problem
> >> is much deeper.
> >>
> >> And again: those lines are commented out...
> >>
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> >>
> >> ----- Original Message -----
> >> > From: Romain Manni-Bucau <rm...@gmail.com>
> >> > To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
> >> > Cc:
> >> > Sent: Monday, July 30, 2012 11:30 AM
> >> > Subject: Re: stochastic test errors
> >> >
> >> > I think it was simply preloading this class in Core.
> >> >
> >> > - Romain
> >> > Le 30 juil. 2012 11:20, "Mark Struberg" <st...@yahoo.de> a
> >> > écrit :
> >> >
> >> >>  Do you know what David fixed? I didn't find any corresponding JIRA
> >> > entry.
> >> >>
> >> >>  LieGrue,
> >> >>  strub
> >> >>
> >> >>
> >> >>
> >> >>  ----- Original Message -----
> >> >>  > From: Romain Manni-Bucau <rm...@gmail.com>
> >> >>  > To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >> >>  > Cc:
> >> >>  > Sent: Monday, July 30, 2012 10:52 AM
> >> >>  > Subject: Re: stochastic test errors
> >> >>  >
> >> >>  > yep but seems you are the only once getting it since David and JL
> ran
> >> > it
> >> >>  on
> >> >>  > mac os too i think
> >> >>  >
> >> >>  > I'm not familiar with macos jdk but any idea what could be the
> >> > diff with
> >> >>  > win or linux jdk? both works
> >> >>  >
> >> >>  > - Romain
> >> >>  >
> >> >>  >
> >> >>  > 2012/7/30 Mark Struberg <st...@yahoo.de>
> >> >>  >
> >> >>  >>  nope, clean 7up on openejb svn trunk...
> >> >>  >>
> >> >>  >>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader
> >> > issue.
> >> >>  >>  It doesn't happen if I debug it in idea, but breaks if I
> >> > start mvn test
> >> >>  >>  -Dtest=..
> >> >>  >>
> >> >>  >>
> >> >>  >>  Is there some temp-classloader or other classloader magic
> >> > involved?
> >> >>  >>
> >> >>  >>
> >> >>  >>  LieGrue,
> >> >>  >>  strub
> >> >>  >>
> >> >>  >>  >________________________________
> >> >>  >>  > From: Romain Manni-Bucau <rm...@gmail.com>
> >> >>  >>  >To: dev@openejb.apache.org; Mark Struberg
> >> > <st...@yahoo.de>
> >> >>  >>  >Sent: Monday, July 30, 2012 9:56 AM
> >> >>  >>  >Subject: Re: stochastic test errors
> >> >>  >>  >
> >> >>  >>  >
> >> >>  >>  >Hey Mark,
> >> >>  >>  >
> >> >>  >>  >JL got this error too but David fixed it weeks ago...is it
> >> > possible
> >> >>  > your
> >> >>  >>  are not sync? (do you use github proxy?)
> >> >>  >>  >
> >> >>  >>  >- Romain
> >> >>  >>  >
> >> >>  >>  >
> >> >>  >>  >
> >> >>  >>  >2012/7/28 Mark Struberg <st...@yahoo.de>
> >> >>  >>  >
> >> >>  >>  >I digged a bit deeper:
> >> >>  >>  >>
> >> >>  >>  >>Caused by: java.lang.LinkageError: loader (instance of
> >> >>  >>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class
> >> >>  definition
> >> >>  >>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
> >> >>  >>  >>        at java.lang.ClassLoader.defineClass1(Native
> >> > Method)
> >> >>  >>  >>        at
> >> >>  > java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> >> >>  >>  >>        at
> >> > java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> >> >>  >>  >>...
> >> >>  >>  >>        at
> >> > org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
> >> >>  >>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown
> >> > Source)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
> >> >>  >>  >>...
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
> >> >>  >>  >>        at
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
> >> >>  >>  >>
> >> >>  >>  >>
> >> >>  >>  >>LieGrue,
> >> >>  >>  >>strub
> >> >>  >>  >>
> >> >>  >>  >>
> >> >>  >>  >>
> >> >>  >>  >>
> >> >>  >>  >>
> >> >>  >>  >>----- Original Message -----
> >> >>  >>  >>> From: Mark Struberg <st...@yahoo.de>
> >> >>  >>  >>> To: openejb-dev <de...@openejb.apache.org>
> >> >>  >>  >>> Cc:
> >> >>  >>  >>> Sent: Saturday, July 28, 2012 7:48 PM
> >> >>  >>  >>> Subject: stochastic test errors
> >> >>  >>  >>>
> >> >>  >>  >>> Hi folks!
> >> >>  >>  >>>
> >> >>  >>  >>> When doing a full build of the container module, I
> >> > get the
> >> >>  > following
> >> >>  >>  Exception:
> >> >>  >>  >>>
> >> >>  >>  >>> Test set:
> >> >>  > org.apache.openejb.persistence.ResourceLocalCdiEmTest
> >> >>  >>  >>>
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> -------------------------------------------------------------------------------
> >> >>  >>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0,
> >> > Time
> >> >>  > elapsed: 2.192
> >> >>  >>  sec
> >> >>  >>  >>> <<< FAILURE!
> >> >>  >>  >>>
> >> >>  > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)
> >> Time
> >> >>  >>  elapsed:
> >> >>  >>  >>> 2.097 sec  <<< FAILURE!
> >> >>  >>  >>> junit.framework.AssertionFailedError
> >> >>  >>  >>>         at
> >> > junit.framework.Assert.fail(Assert.java:48)
> >> >>  >>  >>>         at
> >> > junit.framework.Assert.assertTrue(Assert.java:20)
> >> >>  >>  >>>         at
> >> >>  > junit.framework.Assert.assertNotNull(Assert.java:218)
> >> >>  >>  >>>         at
> >> >>  > junit.framework.Assert.assertNotNull(Assert.java:211)
> >> >>  >>  >>>         at
> >> >>  >>  >>>
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
> >> >>  >>  >>>         at
> >> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> >>  > Method)
> >> >>  >>  >>>         at
> >> >>  >>  >>>
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> >>  >>  >>>         at
> >> >>  >>  >>>
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> >>  >>  >>>
> >> >>  >>  >>>
> >> >>  >>  >>> If I start the test in the debugger, all works fine!
> >> >>  >>  >>>
> >> >>  >>  >>> It seems the injection doesn't work.
> >> >>  >>  >>>
> >> >>  >>  >>> Any tips?
> >> >>  >>  >>>
> >> >>  >>  >>> LieGrue,
> >> >>  >>  >>> strub
> >> >>  >>  >>>
> >> >>  >>  >>
> >> >>  >>  >
> >> >>  >>  >
> >> >>  >>  >
> >> >>  >>
> >> >>  >
> >> >>
> >> >
> >>
> >
> >
> >
>

Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.
In that case I rather give up a bit on speed if this 'trick' harms classloader rules.

Btw, on Windows I get another error:

testAging(org.apache.openejb.core.stateless.StatelessPoolStatsTest)  Time elapsed: 0.404 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Replaced expected:<3> but was:<1>
        at junit.framework.Assert.fail(Assert.java:50)
        at junit.framework.Assert.failNotEquals(Assert.java:287)
        at junit.framework.Assert.assertEquals(Assert.java:67)
        at org.apache.openejb.core.stateless.StatelessPoolStatsTest.assertAttribute(StatelessPoolStatsTest.java:550)
        at org.apache.openejb.core.stateless.StatelessPoolStatsTest.testAging(StatelessPoolStatsTest.java:384)


LieGrue,
strub




>________________________________
> From: Romain Manni-Bucau <rm...@gmail.com>
>To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org 
>Sent: Monday, July 30, 2012 11:57 AM
>Subject: Re: stochastic test errors
> 
>Uncomment them :p
>
>The issue is the way the jdk loads classes. Catch the error, redo the same
>it works. We cut down some class loading for memory+speed that's the cause.
>You see it here because the test uses internals (so it cuts some more
>stuff).
>
>- Romain
>Le 30 juil. 2012 11:53, "Mark Struberg" <st...@yahoo.de> a écrit :
>
>> There are some commented out lines in ApplicationComposer which preload
>> the classes I have problem with.
>> But that looks pretty much like a hack and I think the underlying problem
>> is much deeper.
>>
>> And again: those lines are commented out...
>>
>>
>> LieGrue,
>> strub
>>
>>
>>
>> ----- Original Message -----
>> > From: Romain Manni-Bucau <rm...@gmail.com>
>> > To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
>> > Cc:
>> > Sent: Monday, July 30, 2012 11:30 AM
>> > Subject: Re: stochastic test errors
>> >
>> > I think it was simply preloading this class in Core.
>> >
>> > - Romain
>> > Le 30 juil. 2012 11:20, "Mark Struberg" <st...@yahoo.de> a
>> > écrit :
>> >
>> >>  Do you know what David fixed? I didn't find any corresponding JIRA
>> > entry.
>> >>
>> >>  LieGrue,
>> >>  strub
>> >>
>> >>
>> >>
>> >>  ----- Original Message -----
>> >>  > From: Romain Manni-Bucau <rm...@gmail.com>
>> >>  > To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
>> >>  > Cc:
>> >>  > Sent: Monday, July 30, 2012 10:52 AM
>> >>  > Subject: Re: stochastic test errors
>> >>  >
>> >>  > yep but seems you are the only once getting it since David and JL ran
>> > it
>> >>  on
>> >>  > mac os too i think
>> >>  >
>> >>  > I'm not familiar with macos jdk but any idea what could be the
>> > diff with
>> >>  > win or linux jdk? both works
>> >>  >
>> >>  > - Romain
>> >>  >
>> >>  >
>> >>  > 2012/7/30 Mark Struberg <st...@yahoo.de>
>> >>  >
>> >>  >>  nope, clean 7up on openejb svn trunk...
>> >>  >>
>> >>  >>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader
>> > issue.
>> >>  >>  It doesn't happen if I debug it in idea, but breaks if I
>> > start mvn test
>> >>  >>  -Dtest=..
>> >>  >>
>> >>  >>
>> >>  >>  Is there some temp-classloader or other classloader magic
>> > involved?
>> >>  >>
>> >>  >>
>> >>  >>  LieGrue,
>> >>  >>  strub
>> >>  >>
>> >>  >>  >________________________________
>> >>  >>  > From: Romain Manni-Bucau <rm...@gmail.com>
>> >>  >>  >To: dev@openejb.apache.org; Mark Struberg
>> > <st...@yahoo.de>
>> >>  >>  >Sent: Monday, July 30, 2012 9:56 AM
>> >>  >>  >Subject: Re: stochastic test errors
>> >>  >>  >
>> >>  >>  >
>> >>  >>  >Hey Mark,
>> >>  >>  >
>> >>  >>  >JL got this error too but David fixed it weeks ago...is it
>> > possible
>> >>  > your
>> >>  >>  are not sync? (do you use github proxy?)
>> >>  >>  >
>> >>  >>  >- Romain
>> >>  >>  >
>> >>  >>  >
>> >>  >>  >
>> >>  >>  >2012/7/28 Mark Struberg <st...@yahoo.de>
>> >>  >>  >
>> >>  >>  >I digged a bit deeper:
>> >>  >>  >>
>> >>  >>  >>Caused by: java.lang.LinkageError: loader (instance of
>> >>  >>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class
>> >>  definition
>> >>  >>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
>> >>  >>  >>        at java.lang.ClassLoader.defineClass1(Native
>> > Method)
>> >>  >>  >>        at
>> >>  > java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>> >>  >>  >>        at
>> > java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>> >>  >>  >>...
>> >>  >>  >>        at
>> > org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>> >>  >>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown
>> > Source)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>> >>  >>  >>...
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>> >>  >>  >>        at
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>> >>  >>  >>
>> >>  >>  >>
>> >>  >>  >>LieGrue,
>> >>  >>  >>strub
>> >>  >>  >>
>> >>  >>  >>
>> >>  >>  >>
>> >>  >>  >>
>> >>  >>  >>
>> >>  >>  >>----- Original Message -----
>> >>  >>  >>> From: Mark Struberg <st...@yahoo.de>
>> >>  >>  >>> To: openejb-dev <de...@openejb.apache.org>
>> >>  >>  >>> Cc:
>> >>  >>  >>> Sent: Saturday, July 28, 2012 7:48 PM
>> >>  >>  >>> Subject: stochastic test errors
>> >>  >>  >>>
>> >>  >>  >>> Hi folks!
>> >>  >>  >>>
>> >>  >>  >>> When doing a full build of the container module, I
>> > get the
>> >>  > following
>> >>  >>  Exception:
>> >>  >>  >>>
>> >>  >>  >>> Test set:
>> >>  > org.apache.openejb.persistence.ResourceLocalCdiEmTest
>> >>  >>  >>>
>> >>  >>
>> >>  >
>> >>
>> >
>> -------------------------------------------------------------------------------
>> >>  >>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0,
>> > Time
>> >>  > elapsed: 2.192
>> >>  >>  sec
>> >>  >>  >>> <<< FAILURE!
>> >>  >>  >>>
>> >>  > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)
>> Time
>> >>  >>  elapsed:
>> >>  >>  >>> 2.097 sec  <<< FAILURE!
>> >>  >>  >>> junit.framework.AssertionFailedError
>> >>  >>  >>>         at
>> > junit.framework.Assert.fail(Assert.java:48)
>> >>  >>  >>>         at
>> > junit.framework.Assert.assertTrue(Assert.java:20)
>> >>  >>  >>>         at
>> >>  > junit.framework.Assert.assertNotNull(Assert.java:218)
>> >>  >>  >>>         at
>> >>  > junit.framework.Assert.assertNotNull(Assert.java:211)
>> >>  >>  >>>         at
>> >>  >>  >>>
>> >>  >>
>> >>  >
>> >>
>> >
>> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>> >>  >>  >>>         at
>> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >>  > Method)
>> >>  >>  >>>         at
>> >>  >>  >>>
>> >>  >>
>> >>  >
>> >>
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >>  >>  >>>         at
>> >>  >>  >>>
>> >>  >>
>> >>  >
>> >>
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >>  >>  >>>
>> >>  >>  >>>
>> >>  >>  >>> If I start the test in the debugger, all works fine!
>> >>  >>  >>>
>> >>  >>  >>> It seems the injection doesn't work.
>> >>  >>  >>>
>> >>  >>  >>> Any tips?
>> >>  >>  >>>
>> >>  >>  >>> LieGrue,
>> >>  >>  >>> strub
>> >>  >>  >>>
>> >>  >>  >>
>> >>  >>  >
>> >>  >>  >
>> >>  >>  >
>> >>  >>
>> >>  >
>> >>
>> >
>>
>
>
>

Re: stochastic test errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Uncomment them :p

The issue is the way the jdk loads classes. Catch the error, redo the same
it works. We cut down some class loading for memory+speed that's the cause.
You see it here because the test uses internals (so it cuts some more
stuff).

- Romain
Le 30 juil. 2012 11:53, "Mark Struberg" <st...@yahoo.de> a écrit :

> There are some commented out lines in ApplicationComposer which preload
> the classes I have problem with.
> But that looks pretty much like a hack and I think the underlying problem
> is much deeper.
>
> And again: those lines are commented out...
>
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Romain Manni-Bucau <rm...@gmail.com>
> > To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
> > Cc:
> > Sent: Monday, July 30, 2012 11:30 AM
> > Subject: Re: stochastic test errors
> >
> > I think it was simply preloading this class in Core.
> >
> > - Romain
> > Le 30 juil. 2012 11:20, "Mark Struberg" <st...@yahoo.de> a
> > écrit :
> >
> >>  Do you know what David fixed? I didn't find any corresponding JIRA
> > entry.
> >>
> >>  LieGrue,
> >>  strub
> >>
> >>
> >>
> >>  ----- Original Message -----
> >>  > From: Romain Manni-Bucau <rm...@gmail.com>
> >>  > To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >>  > Cc:
> >>  > Sent: Monday, July 30, 2012 10:52 AM
> >>  > Subject: Re: stochastic test errors
> >>  >
> >>  > yep but seems you are the only once getting it since David and JL ran
> > it
> >>  on
> >>  > mac os too i think
> >>  >
> >>  > I'm not familiar with macos jdk but any idea what could be the
> > diff with
> >>  > win or linux jdk? both works
> >>  >
> >>  > - Romain
> >>  >
> >>  >
> >>  > 2012/7/30 Mark Struberg <st...@yahoo.de>
> >>  >
> >>  >>  nope, clean 7up on openejb svn trunk...
> >>  >>
> >>  >>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader
> > issue.
> >>  >>  It doesn't happen if I debug it in idea, but breaks if I
> > start mvn test
> >>  >>  -Dtest=..
> >>  >>
> >>  >>
> >>  >>  Is there some temp-classloader or other classloader magic
> > involved?
> >>  >>
> >>  >>
> >>  >>  LieGrue,
> >>  >>  strub
> >>  >>
> >>  >>  >________________________________
> >>  >>  > From: Romain Manni-Bucau <rm...@gmail.com>
> >>  >>  >To: dev@openejb.apache.org; Mark Struberg
> > <st...@yahoo.de>
> >>  >>  >Sent: Monday, July 30, 2012 9:56 AM
> >>  >>  >Subject: Re: stochastic test errors
> >>  >>  >
> >>  >>  >
> >>  >>  >Hey Mark,
> >>  >>  >
> >>  >>  >JL got this error too but David fixed it weeks ago...is it
> > possible
> >>  > your
> >>  >>  are not sync? (do you use github proxy?)
> >>  >>  >
> >>  >>  >- Romain
> >>  >>  >
> >>  >>  >
> >>  >>  >
> >>  >>  >2012/7/28 Mark Struberg <st...@yahoo.de>
> >>  >>  >
> >>  >>  >I digged a bit deeper:
> >>  >>  >>
> >>  >>  >>Caused by: java.lang.LinkageError: loader (instance of
> >>  >>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class
> >>  definition
> >>  >>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
> >>  >>  >>        at java.lang.ClassLoader.defineClass1(Native
> > Method)
> >>  >>  >>        at
> >>  > java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> >>  >>  >>        at
> > java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> >>  >>  >>...
> >>  >>  >>        at
> > org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
> >>  >>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown
> > Source)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
> >>  >>  >>...
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
> >>  >>  >>        at
> >>  >>
> >>  >
> >>
> >
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
> >>  >>  >>
> >>  >>  >>
> >>  >>  >>LieGrue,
> >>  >>  >>strub
> >>  >>  >>
> >>  >>  >>
> >>  >>  >>
> >>  >>  >>
> >>  >>  >>
> >>  >>  >>----- Original Message -----
> >>  >>  >>> From: Mark Struberg <st...@yahoo.de>
> >>  >>  >>> To: openejb-dev <de...@openejb.apache.org>
> >>  >>  >>> Cc:
> >>  >>  >>> Sent: Saturday, July 28, 2012 7:48 PM
> >>  >>  >>> Subject: stochastic test errors
> >>  >>  >>>
> >>  >>  >>> Hi folks!
> >>  >>  >>>
> >>  >>  >>> When doing a full build of the container module, I
> > get the
> >>  > following
> >>  >>  Exception:
> >>  >>  >>>
> >>  >>  >>> Test set:
> >>  > org.apache.openejb.persistence.ResourceLocalCdiEmTest
> >>  >>  >>>
> >>  >>
> >>  >
> >>
> >
> -------------------------------------------------------------------------------
> >>  >>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0,
> > Time
> >>  > elapsed: 2.192
> >>  >>  sec
> >>  >>  >>> <<< FAILURE!
> >>  >>  >>>
> >>  > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)
> Time
> >>  >>  elapsed:
> >>  >>  >>> 2.097 sec  <<< FAILURE!
> >>  >>  >>> junit.framework.AssertionFailedError
> >>  >>  >>>         at
> > junit.framework.Assert.fail(Assert.java:48)
> >>  >>  >>>         at
> > junit.framework.Assert.assertTrue(Assert.java:20)
> >>  >>  >>>         at
> >>  > junit.framework.Assert.assertNotNull(Assert.java:218)
> >>  >>  >>>         at
> >>  > junit.framework.Assert.assertNotNull(Assert.java:211)
> >>  >>  >>>         at
> >>  >>  >>>
> >>  >>
> >>  >
> >>
> >
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
> >>  >>  >>>         at
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>  > Method)
> >>  >>  >>>         at
> >>  >>  >>>
> >>  >>
> >>  >
> >>
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>  >>  >>>         at
> >>  >>  >>>
> >>  >>
> >>  >
> >>
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>  >>  >>>
> >>  >>  >>>
> >>  >>  >>> If I start the test in the debugger, all works fine!
> >>  >>  >>>
> >>  >>  >>> It seems the injection doesn't work.
> >>  >>  >>>
> >>  >>  >>> Any tips?
> >>  >>  >>>
> >>  >>  >>> LieGrue,
> >>  >>  >>> strub
> >>  >>  >>>
> >>  >>  >>
> >>  >>  >
> >>  >>  >
> >>  >>  >
> >>  >>
> >>  >
> >>
> >
>

Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.
There are some commented out lines in ApplicationComposer which preload the classes I have problem with.
But that looks pretty much like a hack and I think the underlying problem is much deeper.

And again: those lines are commented out...


LieGrue,
strub



----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: Mark Struberg <st...@yahoo.de>; dev@openejb.apache.org
> Cc: 
> Sent: Monday, July 30, 2012 11:30 AM
> Subject: Re: stochastic test errors
> 
> I think it was simply preloading this class in Core.
> 
> - Romain
> Le 30 juil. 2012 11:20, "Mark Struberg" <st...@yahoo.de> a 
> écrit :
> 
>>  Do you know what David fixed? I didn't find any corresponding JIRA 
> entry.
>> 
>>  LieGrue,
>>  strub
>> 
>> 
>> 
>>  ----- Original Message -----
>>  > From: Romain Manni-Bucau <rm...@gmail.com>
>>  > To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
>>  > Cc:
>>  > Sent: Monday, July 30, 2012 10:52 AM
>>  > Subject: Re: stochastic test errors
>>  >
>>  > yep but seems you are the only once getting it since David and JL ran 
> it
>>  on
>>  > mac os too i think
>>  >
>>  > I'm not familiar with macos jdk but any idea what could be the 
> diff with
>>  > win or linux jdk? both works
>>  >
>>  > - Romain
>>  >
>>  >
>>  > 2012/7/30 Mark Struberg <st...@yahoo.de>
>>  >
>>  >>  nope, clean 7up on openejb svn trunk...
>>  >>
>>  >>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader 
> issue.
>>  >>  It doesn't happen if I debug it in idea, but breaks if I 
> start mvn test
>>  >>  -Dtest=..
>>  >>
>>  >>
>>  >>  Is there some temp-classloader or other classloader magic 
> involved?
>>  >>
>>  >>
>>  >>  LieGrue,
>>  >>  strub
>>  >>
>>  >>  >________________________________
>>  >>  > From: Romain Manni-Bucau <rm...@gmail.com>
>>  >>  >To: dev@openejb.apache.org; Mark Struberg 
> <st...@yahoo.de>
>>  >>  >Sent: Monday, July 30, 2012 9:56 AM
>>  >>  >Subject: Re: stochastic test errors
>>  >>  >
>>  >>  >
>>  >>  >Hey Mark,
>>  >>  >
>>  >>  >JL got this error too but David fixed it weeks ago...is it 
> possible
>>  > your
>>  >>  are not sync? (do you use github proxy?)
>>  >>  >
>>  >>  >- Romain
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >2012/7/28 Mark Struberg <st...@yahoo.de>
>>  >>  >
>>  >>  >I digged a bit deeper:
>>  >>  >>
>>  >>  >>Caused by: java.lang.LinkageError: loader (instance of
>>  >>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class
>>  definition
>>  >>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
>>  >>  >>        at java.lang.ClassLoader.defineClass1(Native 
> Method)
>>  >>  >>        at
>>  > java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>  >>  >>        at 
> java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>  >>  >>...
>>  >>  >>        at 
> org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>>  >>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown 
> Source)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>>  >>  >>...
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>>  >>  >>        at
>>  >>
>>  >
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>>  >>  >>
>>  >>  >>
>>  >>  >>LieGrue,
>>  >>  >>strub
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >>  >>----- Original Message -----
>>  >>  >>> From: Mark Struberg <st...@yahoo.de>
>>  >>  >>> To: openejb-dev <de...@openejb.apache.org>
>>  >>  >>> Cc:
>>  >>  >>> Sent: Saturday, July 28, 2012 7:48 PM
>>  >>  >>> Subject: stochastic test errors
>>  >>  >>>
>>  >>  >>> Hi folks!
>>  >>  >>>
>>  >>  >>> When doing a full build of the container module, I 
> get the
>>  > following
>>  >>  Exception:
>>  >>  >>>
>>  >>  >>> Test set:
>>  > org.apache.openejb.persistence.ResourceLocalCdiEmTest
>>  >>  >>>
>>  >>
>>  >
>> 
> -------------------------------------------------------------------------------
>>  >>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, 
> Time
>>  > elapsed: 2.192
>>  >>  sec
>>  >>  >>> <<< FAILURE!
>>  >>  >>>
>>  > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time
>>  >>  elapsed:
>>  >>  >>> 2.097 sec  <<< FAILURE!
>>  >>  >>> junit.framework.AssertionFailedError
>>  >>  >>>         at 
> junit.framework.Assert.fail(Assert.java:48)
>>  >>  >>>         at 
> junit.framework.Assert.assertTrue(Assert.java:20)
>>  >>  >>>         at
>>  > junit.framework.Assert.assertNotNull(Assert.java:218)
>>  >>  >>>         at
>>  > junit.framework.Assert.assertNotNull(Assert.java:211)
>>  >>  >>>         at
>>  >>  >>>
>>  >>
>>  >
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>>  >>  >>>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>  > Method)
>>  >>  >>>         at
>>  >>  >>>
>>  >>
>>  >
>> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>  >>  >>>         at
>>  >>  >>>
>>  >>
>>  >
>> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>  >>  >>>
>>  >>  >>>
>>  >>  >>> If I start the test in the debugger, all works fine!
>>  >>  >>>
>>  >>  >>> It seems the injection doesn't work.
>>  >>  >>>
>>  >>  >>> Any tips?
>>  >>  >>>
>>  >>  >>> LieGrue,
>>  >>  >>> strub
>>  >>  >>>
>>  >>  >>
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>
>>  >
>> 
> 

Re: stochastic test errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I think it was simply preloading this class in Core.

- Romain
Le 30 juil. 2012 11:20, "Mark Struberg" <st...@yahoo.de> a écrit :

> Do you know what David fixed? I didn't find any corresponding JIRA entry.
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
> > From: Romain Manni-Bucau <rm...@gmail.com>
> > To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> > Cc:
> > Sent: Monday, July 30, 2012 10:52 AM
> > Subject: Re: stochastic test errors
> >
> > yep but seems you are the only once getting it since David and JL ran it
> on
> > mac os too i think
> >
> > I'm not familiar with macos jdk but any idea what could be the diff with
> > win or linux jdk? both works
> >
> > - Romain
> >
> >
> > 2012/7/30 Mark Struberg <st...@yahoo.de>
> >
> >>  nope, clean 7up on openejb svn trunk...
> >>
> >>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader issue.
> >>  It doesn't happen if I debug it in idea, but breaks if I start mvn test
> >>  -Dtest=..
> >>
> >>
> >>  Is there some temp-classloader or other classloader magic involved?
> >>
> >>
> >>  LieGrue,
> >>  strub
> >>
> >>  >________________________________
> >>  > From: Romain Manni-Bucau <rm...@gmail.com>
> >>  >To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >>  >Sent: Monday, July 30, 2012 9:56 AM
> >>  >Subject: Re: stochastic test errors
> >>  >
> >>  >
> >>  >Hey Mark,
> >>  >
> >>  >JL got this error too but David fixed it weeks ago...is it possible
> > your
> >>  are not sync? (do you use github proxy?)
> >>  >
> >>  >- Romain
> >>  >
> >>  >
> >>  >
> >>  >2012/7/28 Mark Struberg <st...@yahoo.de>
> >>  >
> >>  >I digged a bit deeper:
> >>  >>
> >>  >>Caused by: java.lang.LinkageError: loader (instance of
> >>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class
> definition
> >>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
> >>  >>        at java.lang.ClassLoader.defineClass1(Native Method)
> >>  >>        at
> > java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> >>  >>        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> >>  >>...
> >>  >>        at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
> >>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
> >>  >>        at
> >>
> >
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
> >>  >>...
> >>  >>        at
> >>
> >
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
> >>  >>        at
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
> >>  >>        at
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
> >>  >>        at
> >>
> >
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
> >>  >>        at
> >>
> >
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
> >>  >>        at
> >>
> >
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
> >>  >>
> >>  >>
> >>  >>LieGrue,
> >>  >>strub
> >>  >>
> >>  >>
> >>  >>
> >>  >>
> >>  >>
> >>  >>----- Original Message -----
> >>  >>> From: Mark Struberg <st...@yahoo.de>
> >>  >>> To: openejb-dev <de...@openejb.apache.org>
> >>  >>> Cc:
> >>  >>> Sent: Saturday, July 28, 2012 7:48 PM
> >>  >>> Subject: stochastic test errors
> >>  >>>
> >>  >>> Hi folks!
> >>  >>>
> >>  >>> When doing a full build of the container module, I get the
> > following
> >>  Exception:
> >>  >>>
> >>  >>> Test set:
> > org.apache.openejb.persistence.ResourceLocalCdiEmTest
> >>  >>>
> >>
> >
> -------------------------------------------------------------------------------
> >>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time
> > elapsed: 2.192
> >>  sec
> >>  >>> <<< FAILURE!
> >>  >>>
> > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time
> >>  elapsed:
> >>  >>> 2.097 sec  <<< FAILURE!
> >>  >>> junit.framework.AssertionFailedError
> >>  >>>         at junit.framework.Assert.fail(Assert.java:48)
> >>  >>>         at junit.framework.Assert.assertTrue(Assert.java:20)
> >>  >>>         at
> > junit.framework.Assert.assertNotNull(Assert.java:218)
> >>  >>>         at
> > junit.framework.Assert.assertNotNull(Assert.java:211)
> >>  >>>         at
> >>  >>>
> >>
> >
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
> >>  >>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >>  >>>         at
> >>  >>>
> >>
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>  >>>         at
> >>  >>>
> >>
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>  >>>
> >>  >>>
> >>  >>> If I start the test in the debugger, all works fine!
> >>  >>>
> >>  >>> It seems the injection doesn't work.
> >>  >>>
> >>  >>> Any tips?
> >>  >>>
> >>  >>> LieGrue,
> >>  >>> strub
> >>  >>>
> >>  >>
> >>  >
> >>  >
> >>  >
> >>
> >
>

Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.
Do you know what David fixed? I didn't find any corresponding JIRA entry.

LieGrue,
strub



----- Original Message -----
> From: Romain Manni-Bucau <rm...@gmail.com>
> To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> Cc: 
> Sent: Monday, July 30, 2012 10:52 AM
> Subject: Re: stochastic test errors
> 
> yep but seems you are the only once getting it since David and JL ran it on
> mac os too i think
> 
> I'm not familiar with macos jdk but any idea what could be the diff with
> win or linux jdk? both works
> 
> - Romain
> 
> 
> 2012/7/30 Mark Struberg <st...@yahoo.de>
> 
>>  nope, clean 7up on openejb svn trunk...
>> 
>>  I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader issue.
>>  It doesn't happen if I debug it in idea, but breaks if I start mvn test
>>  -Dtest=..
>> 
>> 
>>  Is there some temp-classloader or other classloader magic involved?
>> 
>> 
>>  LieGrue,
>>  strub
>> 
>>  >________________________________
>>  > From: Romain Manni-Bucau <rm...@gmail.com>
>>  >To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
>>  >Sent: Monday, July 30, 2012 9:56 AM
>>  >Subject: Re: stochastic test errors
>>  >
>>  >
>>  >Hey Mark,
>>  >
>>  >JL got this error too but David fixed it weeks ago...is it possible 
> your
>>  are not sync? (do you use github proxy?)
>>  >
>>  >- Romain
>>  >
>>  >
>>  >
>>  >2012/7/28 Mark Struberg <st...@yahoo.de>
>>  >
>>  >I digged a bit deeper:
>>  >>
>>  >>Caused by: java.lang.LinkageError: loader (instance of
>>  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class definition
>>  for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
>>  >>        at java.lang.ClassLoader.defineClass1(Native Method)
>>  >>        at 
> java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>  >>        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>  >>...
>>  >>        at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>>  >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
>>  >>        at
>> 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>>  >>...
>>  >>        at
>> 
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>>  >>        at
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>>  >>        at
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>>  >>        at
>> 
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>>  >>        at
>> 
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>>  >>        at
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>>  >>
>>  >>
>>  >>LieGrue,
>>  >>strub
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>----- Original Message -----
>>  >>> From: Mark Struberg <st...@yahoo.de>
>>  >>> To: openejb-dev <de...@openejb.apache.org>
>>  >>> Cc:
>>  >>> Sent: Saturday, July 28, 2012 7:48 PM
>>  >>> Subject: stochastic test errors
>>  >>>
>>  >>> Hi folks!
>>  >>>
>>  >>> When doing a full build of the container module, I get the 
> following
>>  Exception:
>>  >>>
>>  >>> Test set: 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest
>>  >>>
>> 
> -------------------------------------------------------------------------------
>>  >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time 
> elapsed: 2.192
>>  sec
>>  >>> <<< FAILURE!
>>  >>> 
> injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time
>>  elapsed:
>>  >>> 2.097 sec  <<< FAILURE!
>>  >>> junit.framework.AssertionFailedError
>>  >>>         at junit.framework.Assert.fail(Assert.java:48)
>>  >>>         at junit.framework.Assert.assertTrue(Assert.java:20)
>>  >>>         at 
> junit.framework.Assert.assertNotNull(Assert.java:218)
>>  >>>         at 
> junit.framework.Assert.assertNotNull(Assert.java:211)
>>  >>>         at
>>  >>>
>> 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>>  >>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
>>  >>>         at
>>  >>>
>> 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>  >>>         at
>>  >>>
>> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>  >>>
>>  >>>
>>  >>> If I start the test in the debugger, all works fine!
>>  >>>
>>  >>> It seems the injection doesn't work.
>>  >>>
>>  >>> Any tips?
>>  >>>
>>  >>> LieGrue,
>>  >>> strub
>>  >>>
>>  >>
>>  >
>>  >
>>  >
>> 
> 

Re: stochastic test errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
yep but seems you are the only once getting it since David and JL ran it on
mac os too i think

I'm not familiar with macos jdk but any idea what could be the diff with
win or linux jdk? both works

- Romain


2012/7/30 Mark Struberg <st...@yahoo.de>

> nope, clean 7up on openejb svn trunk...
>
> I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader issue.
> It doesn't happen if I debug it in idea, but breaks if I start mvn test
> -Dtest=..
>
>
> Is there some temp-classloader or other classloader magic involved?
>
>
> LieGrue,
> strub
>
> >________________________________
> > From: Romain Manni-Bucau <rm...@gmail.com>
> >To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de>
> >Sent: Monday, July 30, 2012 9:56 AM
> >Subject: Re: stochastic test errors
> >
> >
> >Hey Mark,
> >
> >JL got this error too but David fixed it weeks ago...is it possible your
> are not sync? (do you use github proxy?)
> >
> >- Romain
> >
> >
> >
> >2012/7/28 Mark Struberg <st...@yahoo.de>
> >
> >I digged a bit deeper:
> >>
> >>Caused by: java.lang.LinkageError: loader (instance of
> sun/misc/Launcher$ExtClassLoader): attempted  duplicate class definition
> for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
> >>        at java.lang.ClassLoader.defineClass1(Native Method)
> >>        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> >>        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> >>...
> >>        at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
> >>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
> >>        at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
> >>...
> >>        at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
> >>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
> >>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
> >>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
> >>        at
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
> >>        at
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
> >>
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>
> >>
> >>----- Original Message -----
> >>> From: Mark Struberg <st...@yahoo.de>
> >>> To: openejb-dev <de...@openejb.apache.org>
> >>> Cc:
> >>> Sent: Saturday, July 28, 2012 7:48 PM
> >>> Subject: stochastic test errors
> >>>
> >>> Hi folks!
> >>>
> >>> When doing a full build of the container module, I get the following
> Exception:
> >>>
> >>> Test set: org.apache.openejb.persistence.ResourceLocalCdiEmTest
> >>>
> -------------------------------------------------------------------------------
> >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.192
> sec
> >>> <<< FAILURE!
> >>> injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time
> elapsed:
> >>> 2.097 sec  <<< FAILURE!
> >>> junit.framework.AssertionFailedError
> >>>         at junit.framework.Assert.fail(Assert.java:48)
> >>>         at junit.framework.Assert.assertTrue(Assert.java:20)
> >>>         at junit.framework.Assert.assertNotNull(Assert.java:218)
> >>>         at junit.framework.Assert.assertNotNull(Assert.java:211)
> >>>         at
> >>>
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
> >>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>         at
> >>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>>         at
> >>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>
> >>>
> >>> If I start the test in the debugger, all works fine!
> >>>
> >>> It seems the injection doesn't work.
> >>>
> >>> Any tips?
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>
> >
> >
> >
>

Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.
nope, clean 7up on openejb svn trunk...

I'm using OSX-10.7 with jdk-1.6. It seems to be a classloader issue.
It doesn't happen if I debug it in idea, but breaks if I start mvn test -Dtest=..


Is there some temp-classloader or other classloader magic involved?


LieGrue,
strub

>________________________________
> From: Romain Manni-Bucau <rm...@gmail.com>
>To: dev@openejb.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Monday, July 30, 2012 9:56 AM
>Subject: Re: stochastic test errors
> 
>
>Hey Mark,
>
>JL got this error too but David fixed it weeks ago...is it possible your are not sync? (do you use github proxy?)
>
>- Romain
>
>
>
>2012/7/28 Mark Struberg <st...@yahoo.de>
>
>I digged a bit deeper:
>>
>>Caused by: java.lang.LinkageError: loader (instance of  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class definition for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>...
>>        at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>>        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
>>        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>>...
>>        at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>>        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>>        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>>        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>>        at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>>        at org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>> 
>>
>>LieGrue,
>>strub
>>
>>
>>
>>
>>
>>----- Original Message -----
>>> From: Mark Struberg <st...@yahoo.de>
>>> To: openejb-dev <de...@openejb.apache.org>
>>> Cc:
>>> Sent: Saturday, July 28, 2012 7:48 PM
>>> Subject: stochastic test errors
>>>
>>> Hi folks!
>>>
>>> When doing a full build of the container module, I get the following Exception:
>>>
>>> Test set: org.apache.openejb.persistence.ResourceLocalCdiEmTest
>>> -------------------------------------------------------------------------------
>>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.192 sec
>>> <<< FAILURE!
>>> injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time elapsed:
>>> 2.097 sec  <<< FAILURE!
>>> junit.framework.AssertionFailedError
>>>         at junit.framework.Assert.fail(Assert.java:48)
>>>         at junit.framework.Assert.assertTrue(Assert.java:20)
>>>         at junit.framework.Assert.assertNotNull(Assert.java:218)
>>>         at junit.framework.Assert.assertNotNull(Assert.java:211)
>>>         at
>>> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>         at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>         at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>>
>>> If I start the test in the debugger, all works fine!
>>>
>>> It seems the injection doesn't work.
>>>
>>> Any tips?
>>>
>>> LieGrue,
>>> strub
>>>
>>
>
>
>

Re: stochastic test errors

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hey Mark,

JL got this error too but David fixed it weeks ago...is it possible your
are not sync? (do you use github proxy?)

- Romain


2012/7/28 Mark Struberg <st...@yahoo.de>

> I digged a bit deeper:
>
> Caused by: java.lang.LinkageError: loader (instance of
> sun/misc/Launcher$ExtClassLoader): attempted  duplicate class definition
> for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> ...
>         at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
>         at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
>         at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
> ...
>         at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
>         at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
>         at
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
>         at
> org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
>
>
> LieGrue,
> strub
>
>
>
>
> ----- Original Message -----
> > From: Mark Struberg <st...@yahoo.de>
> > To: openejb-dev <de...@openejb.apache.org>
> > Cc:
> > Sent: Saturday, July 28, 2012 7:48 PM
> > Subject: stochastic test errors
> >
> > Hi folks!
> >
> > When doing a full build of the container module, I get the following
> Exception:
> >
> > Test set: org.apache.openejb.persistence.ResourceLocalCdiEmTest
> >
> -------------------------------------------------------------------------------
> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.192 sec
> > <<< FAILURE!
> > injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time
> elapsed:
> > 2.097 sec  <<< FAILURE!
> > junit.framework.AssertionFailedError
> >         at junit.framework.Assert.fail(Assert.java:48)
> >         at junit.framework.Assert.assertTrue(Assert.java:20)
> >         at junit.framework.Assert.assertNotNull(Assert.java:218)
> >         at junit.framework.Assert.assertNotNull(Assert.java:211)
> >         at
> >
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >         at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >
> >
> > If I start the test in the debugger, all works fine!
> >
> > It seems the injection doesn't work.
> >
> > Any tips?
> >
> > LieGrue,
> > strub
> >
>

Re: stochastic test errors

Posted by Mark Struberg <st...@yahoo.de>.
I digged a bit deeper:

Caused by: java.lang.LinkageError: loader (instance of  sun/misc/Launcher$ExtClassLoader): attempted  duplicate class definition for name: &quot;sun/security/pkcs11/SunPKCS11&quot;
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
...
        at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
        at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
...
        at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
        at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
        at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:114)
        at org.apache.openejb.persistence.ResourceLocalCdiEmTest$EMFProducer.em(ResourceLocalCdiEmTest.java:97)
 

LieGrue,
strub




----- Original Message -----
> From: Mark Struberg <st...@yahoo.de>
> To: openejb-dev <de...@openejb.apache.org>
> Cc: 
> Sent: Saturday, July 28, 2012 7:48 PM
> Subject: stochastic test errors
> 
> Hi folks!
> 
> When doing a full build of the container module, I get the following Exception:
> 
> Test set: org.apache.openejb.persistence.ResourceLocalCdiEmTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.192 sec 
> <<< FAILURE!
> injection(org.apache.openejb.persistence.ResourceLocalCdiEmTest)  Time elapsed: 
> 2.097 sec  <<< FAILURE!
> junit.framework.AssertionFailedError
>         at junit.framework.Assert.fail(Assert.java:48)
>         at junit.framework.Assert.assertTrue(Assert.java:20)
>         at junit.framework.Assert.assertNotNull(Assert.java:218)
>         at junit.framework.Assert.assertNotNull(Assert.java:211)
>         at 
> org.apache.openejb.persistence.ResourceLocalCdiEmTest.injection(ResourceLocalCdiEmTest.java:50)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 
> 
> If I start the test in the debugger, all works fine!
> 
> It seems the injection doesn't work.
> 
> Any tips?
> 
> LieGrue,
> strub
>