Verify Error with Java 1.7

com.vaisala.jx.db.gdm.facade.BaseFacadeTest Time elapsed: 0 sec <<< ERROR!
java.lang.VerifyError: Expecting a stackmap frame at branch target 15 in method com.vaisala.jx.db.gdm.model.SourceType.writeObject(Ljava/io/ObjectOutputStream;)V at offset 4
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
at java.lang.Class.getDeclaredField(Class.java:1897)
at com.objectdb.o.UTY.V(UTY.java:416)
at com.objectdb.o.UTY.U(UTY.java:400)
at com.objectdb.o.UTY.T(UTY.java:360)
at com.objectdb.o.TYS.l(TYS.java:168)
at com.objectdb.o.TYM.ae(TYM.java:502)
at com.objectdb.o.TYM.<init>(TYM.java:239)
at com.objectdb.o.OMF.ai(OMF.java:733)
at com.objectdb.jpa.EMF.ai(EMF.java:143)
at com.objectdb.o.OMF.ah(OMF.java:681)
at com.objectdb.jpa.EMF.createEntityManager(EMF.java:160)
at com.vaisala.jx.db.gdm.facade.BaseFacadeTest.setUpClass(BaseFacadeTest.java:176)

note - non-enhanced classes work locally in java 1.7 format (pass jUnit tests), but then give similar error when run under GlassFish ..

steps to reproduce - open your Guestbook sample application in NetBeans, open project properties, change source/binary from 1.6 to 1.7, change compiler to 1.7, clean, build and deploy to GF - see error as below:

Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 15 in method guest.Guest.writeObject(Ljava/io/ObjectOutputStream;)V at offset 4
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.enterprise.deployment.util.TypeUtil.getMethod(TypeUtil.java:399)
at com.sun.enterprise.deployment.MethodDescriptor.getMethod(MethodDescriptor.java:313)
at org.glassfish.ejb.security.application.EJBSecurityManager.convertEJBMethodPermissions(EJBSecurityManager.java:550)
at org.glassfish.ejb.security.application.EJBSecurityManager.loadPolicyConfiguration(EJBSecurityManager.java:256)
at org.glassfish.ejb.security.application.EJBSecurityManager.initialize(EJBSecurityManager.java:317)
at org.glassfish.ejb.security.application.EJBSecurityManager.<init>(EJBSecurityManager.java:190)
at org.glassfish.ejb.security.factory.EJBSecurityManagerFactory.createManager(EJBSecurityManagerFactory.java:209)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:229)
... 32 more

I just upgraded to 2.2.9_11. I am using JDK 1.6.0_24. I'm not planning on upgrading to Java7 right now.

I now get the following exception in my client trying to connect to the server:

java.lang.ClassFormatError: StackMapTable format error: bad class index
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredField(Class.java:1880)
at com.objectdb.o.UTY.V(UTY.java:416)
at com.objectdb.o.UTY.U(UTY.java:400)
at com.objectdb.o.UTY.T(UTY.java:360)
at com.objectdb.o.TYS.l(TYS.java:168)
at com.objectdb.o.TYM.ae(TYM.java:502)
at com.objectdb.o.TYM.<init>(TYM.java:239)
at com.objectdb.o.OMF.ai(OMF.java:733)
at com.objectdb.jpa.EMF.ai(EMF.java:143)
at com.objectdb.o.OMF.ah(OMF.java:681)
at com.objectdb.jpa.EMF.createEntityManager(EMF.java:160)