| Summary: | Bytecode weaving has issues with JDK 7 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mitesh Meswani <mitesh.meswani> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | douglas.clarke, tom.ware | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 240494 | ||||||
| Attachments: |
|
||||||
The fix for this will most probably require an upgrade of antlr shipped with EclipseLink. Lets target the triage for 2.1.1. We can decide about the "target milestone" after the result of the triage. I assume you mean an upgrade to the version of ASM included. Using the latest JDK 7 preview and the JpaBean from your test case attached the GlassFish bug I am not able to reproduce your issue. The most notable difference is that I am trying to reproduce the weaving failure in Java SE 7 on the command line with the -javaagent and not within the GF container. Do you have a reproduction that fails in Java SE? Created attachment 193851 [details]
standlone test case reproducing the issue
Yes. I meant asm :)
Attached a test case that reproduces the issue. To run the test, adjust build.properties and test.properties for your environment and execute "ant agent run"
Here is a log of execution
------------------------------------------
$ java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b132)
Java HotSpot(TM) Client VM (build 21.0-b03, mixed mode, sharing)
mitesh@mitesh-gateway /work/testhelpers/barebonePersistenceApp.temp
$ ant agent run
Buildfile: C:\work\testhelpers\barebonePersistenceApp.temp\build.xml
init:
agent:
init:
compile:
[javac] C:\work\testhelpers\barebonePersistenceApp.temp\build.xml:25: warning: 'includ
eantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatab
le builds
[javac] Compiling 5 source files to C:\work\testhelpers\barebonePersistenceApp.temp\cl
asses
stage:
[copy] Copying 1 file to C:\work\testhelpers\barebonePersistenceApp.temp\classes\META
-INF
[copy] Copying C:\work\testhelpers\barebonePersistenceApp.temp\src\descriptor\persist
ence-javase.xml to C:\work\testhelpers\barebonePersistenceApp.temp\classes\META-INF\persis
tence.xml
run:
[java] [EL Info]: 2011-04-21 08:20:48.631--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.
user should be used instead.
[java] [EL Info]: 2011-04-21 08:20:48.642--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdb
c.driver should be used instead.
[java] [EL Info]: 2011-04-21 08:20:48.642--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.u
rl should be used instead.
[java] [EL Info]: 2011-04-21 08:20:48.643--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.password is deprecated, property javax.persistence.j
dbc.password should be used instead.
[java] [EL Config]: 2011-04-21 08:20:48.813--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The access type for the persistent class [class test.pojo.Project] is set to
[FIELD].
[java] [EL Config]: 2011-04-21 08:20:48.857--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The target entity (reference) class for the many to many mapping element [fi
eld employees] is being defaulted to: class test.pojo.Employee.
[java] [EL Config]: 2011-04-21 08:20:48.858--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The access type for the persistent class [class test.pojo.Employee] is set t
o [FIELD].
[java] [EL Config]: 2011-04-21 08:20:48.859--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The target entity (reference) class for the many to many mapping element [fi
eld projects] is being defaulted to: class test.pojo.Project.
[java] [EL Config]: 2011-04-21 08:20:48.859--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The alias name for the entity class [class test.pojo.Project] is being defau
lted to: Project.
[java] [EL Config]: 2011-04-21 08:20:48.862--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The table name for entity [class test.pojo.Project] is being defaulted to: P
ROJECT.
[java] [EL Config]: 2011-04-21 08:20:48.884--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The column name for element [field id] is being defaulted to: ID.
[java] [EL Config]: 2011-04-21 08:20:48.885--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The column name for element [field name] is being defaulted to: NAME.
[java] [EL Config]: 2011-04-21 08:20:48.886--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The alias name for the entity class [class test.pojo.Employee] is being defa
ulted to: Employee.
[java] [EL Config]: 2011-04-21 08:20:48.887--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The table name for entity [class test.pojo.Employee] is being defaulted to:
EMPLOYEE.
[java] [EL Config]: 2011-04-21 08:20:48.887--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The column name for element [field id] is being defaulted to: ID.
[java] [EL Config]: 2011-04-21 08:20:48.887--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The column name for element [field name] is being defaulted to: NAME.
[java] [EL Config]: 2011-04-21 08:20:48.932--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The join table name for the many to many mapping [class test.pojo.Project] i
s being defaulted to: PROJECT_EMPLOYEE.
[java] [EL Config]: 2011-04-21 08:20:48.934--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The source primary key column name for the many to many mapping [field emplo
yees] is being defaulted to: ID.
[java] [EL Config]: 2011-04-21 08:20:48.934--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The source foreign key column name for the many to many mapping [field emplo
yees] is being defaulted to: projects_ID.
[java] [EL Config]: 2011-04-21 08:20:48.934--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The target primary key column name for the many to many mapping [field emplo
yees] is being defaulted to: ID.
[java] [EL Config]: 2011-04-21 08:20:48.934--ServerSession(19726507)--Thread(Thread[m
ain,5,main])--The target foreign key column name for the many to many mapping [field emplo
yees] is being defaulted to: employees_ID.
[java] Listening for transport dt_socket at address: 8085
[java] [EL Info]: 2011-04-21 08:20:49.048--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.
user should be used instead.
[java] [EL Info]: 2011-04-21 08:20:49.048--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdb
c.driver should be used instead.
[java] [EL Info]: 2011-04-21 08:20:49.048--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.u
rl should be used instead.
[java] [EL Info]: 2011-04-21 08:20:49.048--ServerSession(19726507)--Thread(Thread[mai
n,5,main])--property eclipselink.jdbc.password is deprecated, property javax.persistence.j
dbc.password should be used instead.
[java] Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame a
t branch target 18 in method test.pojo.Employee._persistence_isAttributeFetched(Ljava/lang
/String;)Z at offset 4
[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:264)
[java] at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getCla
ssForName(PrivilegedAccessHelper.java:93)
[java] at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesTo
Classes(ClassDescriptor.java:1289)
[java] at org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Pro
ject.java:367)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(Enti
tyManagerSetupImpl.java:341)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServer
Session(EntityManagerFactoryImpl.java:185)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEnt
ityManagerImpl(EntityManagerFactoryImpl.java:242)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEnt
ityManager(EntityManagerFactoryImpl.java:230)
[java] at test.Client.main(Client.java:18)
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 4 seconds
Please note that using jvm option -XX:-UseSplitVerifier seems to get rid of the issue. I have reproduced the issue in my own test environment and also verified that the -XX:-UseSplitVerifier setting on the JVM does indeed work around the issue. I am going to see if the issue goes away with ASM 3.3.1 which is available from ORBIT. The ASM upgrade in 2.3 appears to address the issue. Ideally, we would not change the antlr version in patch release (e.g. 2.2.x) Is there a strong reason why this needs to be in 2.2.1? Addressed in 2.3 by our ASM upgrade The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
We get following VerifyError while deploying an app compiled with JDK7 onto a VM running JDK 7. Please note that the issue does not happen if the code deployed is compiled using JDK 6. [#|2011-03-08T16:16:12.620-0800|WARNING|glassfish3.1|javax.org.glassfish.persistence.org.glassfish.persistence.jpa|_ThreadID=71;_ThreadName=Thread-1;|Expecting a stackmap frame at branch target 16 in method ejb31.war.servlet.JpaBean._persistence_checkFetched(Ljava/lang/String;)V at offset 5 java.lang.VerifyError: Expecting a stackmap frame at branch target 16 in method ejb31.war.servlet.JpaBean._persistence_checkFetched(Ljava/lang/String;)V at offset 5 at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:93) at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1258) at org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:367) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:338) This issue was originally reported as GlassFish issue http://java.net/jira/browse/GLASSFISH-16174