openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henno Vermeulen <he...@huizemolenaar.nl>
Subject RE: Java 8 support
Date Thu, 27 Mar 2014 09:30:58 GMT
Thank you for the info,

I as a programmer think Java 8 is very cool and useful but it does has not have a huge immediate
business value for us so I think I'll wait. Or perhaps I'll have a quick look in my spare
time.

Henno


-----Oorspronkelijk bericht-----
Van: Kevin Sutter [mailto:kwsutter@gmail.com] 
Verzonden: woensdag 26 maart 2014 17:40
Aan: users@openjpa.apache.org
Onderwerp: Re: Java 8 support

Hi Henno,
The JIRA you referenced is still the one for tracking the work...  Because of the changes
to the class file format with Java 8, we will need a new ASM in order to build and enhance
Entities with Java 8.  Some of the infrastructure work was put in place to support a new version
of ASM, but we haven't moved to it yet.  We now have a dependency on the xbean shaded version
of ASM from the Geronimo project.  And, I just noticed this morning that they are looking
to upgrade their version in support of Java 8.  Once that work is complete, then hopefully
it will be relatively easy to change the OpenJPA enhancement process to take advantage of
the new ASM.

The other open switch is the Serp utility with Java 8.  We're not sure if the class file format
change for Java 8 is going to directly affect Serp or not.  We're hoping that the ASM upgrade
will alleviate necessary changes to Serp.

Not sure of your availability and skills, but any assistance with this activity would be appreciated.
 I see that ASM 5.0.1 was recently released in support of Java 8 [1].  So, skipping the xbean
shading for now, if someone wants to re-package OpenJPA with ASM 5.0.1, we could start to
see how big of an effort this will be.  Do not attempt to build OpenJPA with Java 8.  Stick
with Java 7 for building.  At this point, we are only interested in allowing applications
to be built with Java 8.  Good luck!

Thanks, Kevin


[1]  http://forge.ow2.org/projects/asm/


On Wed, Mar 26, 2014 at 9:59 AM, Henno Vermeulen <henno@huizemolenaar.nl>wrote:

> Yesterday Java 8 was officially released. When I try to compile and 
> run my tests and application that use OpenJPA 2.3.0 with Java 8 I get 
> errors (see
> below) when I try to enhance the entities or use the java agent.
> Are there plans to support Java 8 in the near future?
>
> I did find the following issue which was unfortunately last updated 
> almost half a year ago: 
> https://issues.apache.org/jira/browse/OPENJPA-2386
>
> Regards,
> Henno Vermeulen
>
> Java agent:
>
> 431  olgaPersistenceUnit  WARN   [main] openjpa.Enhance - An exception was
> thrown while attempting to perform class file transformation on 
> "nl/hm/olga/core/entity/AbstractEntity":java.lang.IllegalArgumentException
>                 at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
>                 at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
>                 at org.apache.xbean.asm4.ClassReader.<init>(Unknown Source)
>                 at
> org.apache.openjpa.enhance.AsmAdaptor.toJava7ByteArray(AsmAdaptor.java:93)
>                 at
> org.apache.openjpa.enhance.AsmAdaptor.toByteArray(AsmAdaptor.java:78)
>                 at
> org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:156)
>                 at
> org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:126)
>                 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.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
> nl.hm.oblomow.application.server.OblomowServerStarter.main(OblomowServ
> erStarter.java:32)
>
> Enhancer (through Maven plugin)
> ....
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 8
>                 at
> serp.bytecode.lowlevel.ConstantPoolTable.readByte(ConstantPoolTable.java:81)
>                 at
> serp.bytecode.lowlevel.ConstantPoolTable.readUnsignedShort(ConstantPoolTable.java:88)
>                 at
> serp.bytecode.lowlevel.ConstantPoolTable.<init>(ConstantPoolTable.java:22)
>                 at
> serp.bytecode.lowlevel.ConstantPoolTable.<init>(ConstantPoolTable.java:30)
>                 at
> org.apache.openjpa.lib.meta.ClassArgParser.getFromClass(ClassArgParser.java:324)
>                 at
> org.apache.openjpa.lib.meta.ClassArgParser.getFromClassFile(ClassArgParser.java:308)
>                 at
> org.apache.openjpa.lib.meta.ClassArgParser.parseTypeNames(ClassArgParser.java:217)
>                 ... 30 more
>

Mime
View raw message