2015-07-04 11 views
7

Ich habe Play-Framework-Anwendung (2.3.8), die ich Eclipselink-2.5.1.jar-Agent zur Verfügung stellen. Während des Starts sehe ich in Protokollen:EclipseLink löst ArrayIndexOutOfBoundsException beim Versuch, eine Klasse zu weben

Weaver eine Ausnahme aufgetreten bei dem Versuch, Klasse zu weben [einer meiner JPA-Entitäten Klasse]. Die Ausnahme war: java.lang.ArrayIndexOutOfBoundsException: 30053

  1. Wie kann ich untersuchen, was das Problem verursacht?
  2. Was könnte ein Problem sein?

UPDATE: So ändert die Protokollierung zu feinsten gab mir einen Stack-Trace:

EL Finest]: weaver: 2015-07-16 20:52:31.163--ServerSession(1547425104)--Thread(Thread[application-akka.actor.default-dispatcher-2,5,main])--java.lang.ArrayIndexOutOfBoundsException: 25970 
     at org.eclipse.persistence.internal.libraries.asm.ClassReader.readClass(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.ClassReader.getInterfaces(Unknown Source) 
     at org.eclipse.persistence.internal.jpa.weaving.ComputeClassWriter.typeImplements(ComputeClassWriter.java:143) 
     at org.eclipse.persistence.internal.jpa.weaving.ComputeClassWriter.typeImplements(ComputeClassWriter.java:150) 
     at org.eclipse.persistence.internal.jpa.weaving.ComputeClassWriter.getCommonSuperClass(ComputeClassWriter.java:62) 
     at org.eclipse.persistence.internal.libraries.asm.ClassWriter.getMergedType(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.Frame.merge(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.Frame.merge(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.MethodAdapter.visitMaxs(Unknown Source) 
     at org.eclipse.persistence.internal.jpa.weaving.MethodWeaver.visitMaxs(MethodWeaver.java:152) 
     at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(Unknown Source) 
     at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(Unknown Source) 
     at org.eclipse.persistence.internal.jpa.weaving.PersistenceWeaver.transform(PersistenceWeaver.java:93) 
     at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer$1.transform(JavaSECMPInitializer.java:228) 
     at sun.instrument.TransformerManager.transform(TransformerManager.java:188) 
     at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428) 
     at java.lang.ClassLoader.defineClass1(Native Method) 
     at java.lang.ClassLoader.defineClass(ClassLoader.java:760) 
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) 
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) 
     at java.net.URLClassLoader.access$100(URLClassLoader.java:73) 
     at java.net.URLClassLoader$1.run(URLClassLoader.java:367) 
     at java.net.URLClassLoader$1.run(URLClassLoader.java:361) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.net.URLClassLoader.findClass(URLClassLoader.java:360) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
     at java.lang.Class.forName0(Native Method) 
     at java.lang.Class.forName(Class.java:340) 
     at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:124) 
     at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata.getClass(EntityListenerMetadata.java:224) 
     at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityClassListenerMetadata.process(EntityClassListenerMetadata.java:81) 
     at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processListeners(EntityAccessor.java:1220) 
     at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.addEntityListeners(MetadataProcessor.java:138) 
     at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:591) 
     at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204) 
     at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:304) 
     at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:336) 
     at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:302) 
     at play.db.jpa.DefaultJPAApi.em(DefaultJPAApi.java:71) 
     at play.db.jpa.DefaultJPAApi.withTransaction(DefaultJPAApi.java:123) 
     at play.db.jpa.JPA.withTransaction(JPA.java:159) 
     at play.db.jpa.TransactionalAction.call(TransactionalAction.java:16) 
     at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) 
     at play.core.j.JavaAction$$anonfun$7.apply(JavaAction.scala:94) 
     at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) 
     at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) 
     at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:40) 
     at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:70) 
     at play.core.j.HttpExecutionContext.execute(HttpExecutionContext.scala:32) 
     at scala.concurrent.impl.Future$.apply(Future.scala:31) 
     at scala.concurrent.Future$.apply(Future.scala:485) 
     at play.core.j.JavaAction.apply(JavaAction.scala:94) 
     at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) 
     at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:105) 
     at play.utils.Threads$.withContextClassLoader(Threads.scala:21) 
     at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:104) 
     at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:103) 
     at scala.Option.map(Option.scala:145) 
     at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:103) 
     at play.api.mvc.Action$$anonfun$apply$1.apply(Action.scala:96) 
     at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) 
     at play.api.libs.iteratee.Iteratee$$anonfun$mapM$1.apply(Iteratee.scala:524) 
     at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) 
     at play.api.libs.iteratee.Iteratee$$anonfun$flatMapM$1.apply(Iteratee.scala:560) 
     at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:536) 
     at play.api.libs.iteratee.Iteratee$$anonfun$flatMap$1$$anonfun$apply$13.apply(Iteratee.scala:536) 
     at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) 
     at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) 
     at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) 
     at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) 
     at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 
     at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) 
     at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 
     at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 

Aber es ist nicht viel von einer Hilfe für mich.

+0

Versuchen Sie, die statische Weaver und Anmeldung am besten zu verwenden und sehen, ob Sie die Ausnahme erhalten. siehe https://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving – Chris

+0

Haben Sie dieses Problem in 'dev' (mit' activator run') oder nur in 'prod'? – tomaj

+0

Ist Ihre Konfiguration ähnlich wie hier beschrieben: https://pbaris.wordpress.com/2013/07/29/play-framework-2-jpa-eclipselink-setup/ – tomaj

Antwort

2

Dies sieht wie ein Fehler im ASM-Prozessor aus, der von EclipseLink beim Umgang mit Lambda-Ausdrücken verwendet wird. Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992 ist in EclipseLink 2.6 behoben.

+0

Es scheint, als ob die Aktualisierung von EclipseLink das Problem gelöst hat. Es ist sehr wahrscheinlich, dass das Problem durch den Fehler verursacht wurde, den Sie erwähnt haben (aber ich habe es nicht zu eng angeschaut). – szymond