Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.0.0
-
None
-
None
Description
I use OpenJPA and Maven in my project. Up to 27.10.2007 all tests have worked fine.
Then something was changed (surefire or it's dependencies) - and now my simple CRUD test cause OutOfMemory exception!
For enhancing i use ant call plugin:
<configuration>
<tasks>
<taskdef name="openjpac" classpathref="maven.compile.classpath"
classname="org.apache.openjpa.ant.PCEnhancerTask"/>
<openjpac classpath="${project.basedir}/target/classes">
<fileset dir="${project.basedir}/target/classes">
<include name="*/model/.class"/>
</fileset>
</openjpac>
</configuration>
Interesting, that now openjpa javaagent doesn't work (but it has worked in Friday)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>-javaagent:${project.basedir}/../../openjpa_agent/openjpa-1.0.0.jar=jdoEnhance=true
<useSystemClassLoader>true</useSystemClassLoader>
</configuration>
</plugin>
Now it cause -
[INFO] Surefire report directory: E:\java\LANIT\PUBSER\checkout\trunk\dev\modules\registry\target\surefire-rep
orts
[INFO] Building jar: C:\WINDOWS\TEMP\surefirebooter20526.jar
java.lang.reflect.InvocationTargetException
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 sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:141)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
FATAL ERROR in native method: processing of -javaagent failed
at org.apache.openjpa.enhance.PCEnhancerAgent.premain(PCEnhancerAgent.java:61)
... 5 more
By the way - time of tests execution rises from one to another:
Running ru.lanit.ps.registry.service.radministrativelevel.RAdministrativeLevelServiceTe
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.671 sec
Running ru.lanit.ps.registry.service.appeal.AppealServiceTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.749 sec
Running ru.lanit.ps.registry.service.address.AddressServiceTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.155 sec
Running ru.lanit.ps.registry.model.jibx.rpaymenttype.RPaymentTypeBindingTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.093 sec
Running ru.lanit.ps.registry.service.addresstype.RAddressTypeServiceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.64 sec
Running ru.lanit.ps.registry.service.pspassport.PsPassportTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.795 sec
Running ru.lanit.ps.registry.service.functionary.FunctionaryTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.058 sec
Running ru.lanit.ps.registry.service.paymenttype.PaymentTypeServiceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.995 sec
Running ru.lanit.ps.registry.model.jibx.roffdoctype.ROffDocTypeBindingTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.434 sec
Running ru.lanit.ps.registry.service.appealterm.AppealTermServiceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.558 sec
Running ru.lanit.ps.registry.service.rplacesrequirements.RPlacesRequirementsServiceTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.835 sec
Running ru.lanit.ps.registry.service.ractivitydirection.RActivityDirectionServiceTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 25.942 sec <<< FAILURE! - OutOfMem
All tests is very simple CRUD tests