Details

      Description

      A few different aspects exist for the support of Java 8. The first being tolerance of the Java 8 runtime. If OpenJPA and the application are built and enhanced with Java 7 (or Java 6), then will these class files execute in a Java 8 environment? My assumption is "yes" since this would be consistent with our initial experiences with Java 7. But, some testing will be required to verify this.

      The next aspect is the building of the application Entities with Java 8. Building and enhancing Java Entity class files with Java 8 looks to be hazardous... The first indication is that ASM doesn't seem to handle the Java 8 class file format. And, if ASM doesn't handle it, then I'm sure that Serp doesn't handle it either. Now, whether our use of ASM as a post-processor for Serp will suffice this time around, I have no idea.

      This brings back the question of dropping Serp support altogether and going the ASM route (http://openjpa.208410.n2.nabble.com/DISCUSS-Java7-and-Serp-td6951682.html). I know there's been some interest in this in the past.

      A longer-term aspect is when do we actually build OpenJPA with Java 8 and take advantage (exploit) of the new features. I think we have a long ways before we have to cross that hurdle. When we start developing JPA 2.1, we'll probably have to upgrade our build process to use Java 7. So, we're probably on the same type of cycle for Java 8 for building OpenJPA (when it's required by Java EE 8).

        Issue Links

          Activity

          Hide
          struberg Mark Struberg added a comment -

          +1.

          I've just created a new shade of ASM4 in xbean-asm4-shaded which we will release shortly. we can use this to prevent classpath clashes. The shade creates a package org.apache.xbean.asm4.* which we will only use for ASM4 binary compatible releases.

          Con: on an ASM upgrade we need to update our sources to the new import
          Pro: we effectively prevent classpath clashes with other projects who need different versions of ASM

          Show
          struberg Mark Struberg added a comment - +1. I've just created a new shade of ASM4 in xbean-asm4-shaded which we will release shortly. we can use this to prevent classpath clashes. The shade creates a package org.apache.xbean.asm4.* which we will only use for ASM4 binary compatible releases. Con: on an ASM upgrade we need to update our sources to the new import Pro: we effectively prevent classpath clashes with other projects who need different versions of ASM
          Hide
          mspiro Michael Spiro added a comment -

          I think one more aspect would be support for the new date/time classes in Java 8 - wouldn't it?

          Show
          mspiro Michael Spiro added a comment - I think one more aspect would be support for the new date/time classes in Java 8 - wouldn't it?
          Hide
          curtisr7 Rick Curtis added a comment -

          > I think one more aspect would be support for the new date/time classes in Java 8 - wouldn't it?
          I don't think we would worry about that until the new date/time classes are added to the JPA spec.

          Show
          curtisr7 Rick Curtis added a comment - > I think one more aspect would be support for the new date/time classes in Java 8 - wouldn't it? I don't think we would worry about that until the new date/time classes are added to the JPA spec.
          Hide
          romain.manni-bucau Romain Manni-Bucau added a comment -

          Yep, it is important to stay aligned on spec.

          Show
          romain.manni-bucau Romain Manni-Bucau added a comment - Yep, it is important to stay aligned on spec.
          Hide
          karlkilden Karl Kildén added a comment -

          Hi,
          Not sure if related but I just checked out trunk and built with mvn install. It did not compile for me.

          Windows 7 Enterprise x64 with Java 8 as java runtime:

          util\concurrent\NullSafeConcurrentHashMap.java:[305,15] error: keySet() in NullSafeConcurrentHashMap cannot override keySet() in ConcurrentHashMap

          Show
          karlkilden Karl Kildén added a comment - Hi, Not sure if related but I just checked out trunk and built with mvn install. It did not compile for me. Windows 7 Enterprise x64 with Java 8 as java runtime: util\concurrent\NullSafeConcurrentHashMap.java: [305,15] error: keySet() in NullSafeConcurrentHashMap cannot override keySet() in ConcurrentHashMap
          Hide
          kwsutter Kevin Sutter added a comment -

          Building with OpenJPA with Java 8 is not on the horizon yet... Currently, this JIRA is concerned with building and running customer applications (and JPA Entities) with Java 8. OpenJPA will continue to be built with Java 7 (in trunk).

          Show
          kwsutter Kevin Sutter added a comment - Building with OpenJPA with Java 8 is not on the horizon yet... Currently, this JIRA is concerned with building and running customer applications (and JPA Entities) with Java 8. OpenJPA will continue to be built with Java 7 (in trunk).
          Hide
          ebourg Emmanuel Bourg added a comment -

          Even if OpenJPA is built with Java 7, isn't NullSafeConcurrentHashMap.keySet() going to break at runtime with Java 8?

          Show
          ebourg Emmanuel Bourg added a comment - Even if OpenJPA is built with Java 7, isn't NullSafeConcurrentHashMap.keySet() going to break at runtime with Java 8?
          Hide
          romain.manni-bucau Romain Manni-Bucau added a comment -

          actually this class and its child could be deleted so should work.

          Show
          romain.manni-bucau Romain Manni-Bucau added a comment - actually this class and its child could be deleted so should work.
          Hide
          puntogil gil cattaneo added a comment -

          hi,
          used:
          OpenJDK version "1.8.0_11"
          OpenJDK Runtime Environment (build 1.8.0_11-b12)
          OpenJDK Zero VM (build 25.11-b02, interpreted mode)

          applied the patch for java 8 problems (OPENJPA-2441), but now i have still this problem:

          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project openjpa-persistence: Compilation failure: Compilation failure:
          [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java:[164,64] cannot find symbol
          [ERROR] symbol: method booleanValue()
          [ERROR] location: class java.lang.Object
          [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java:[167,43] cannot find symbol
          [ERROR] symbol: method booleanValue()
          [ERROR] location: class java.lang.Object
          [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java:[217,13] cannot find symbol
          [ERROR] symbol: method booleanValue()
          [ERROR] location: class java.lang.Object
          [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java:[239,44] cannot find symbol
          [ERROR] symbol: method booleanValue()
          [ERROR] location: class java.lang.Object
          [ERROR] -> [Help 1]

          thanks in advance

          Show
          puntogil gil cattaneo added a comment - hi, used: OpenJDK version "1.8.0_11" OpenJDK Runtime Environment (build 1.8.0_11-b12) OpenJDK Zero VM (build 25.11-b02, interpreted mode) applied the patch for java 8 problems ( OPENJPA-2441 ), but now i have still this problem: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project openjpa-persistence: Compilation failure: Compilation failure: [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java: [164,64] cannot find symbol [ERROR] symbol: method booleanValue() [ERROR] location: class java.lang.Object [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java: [167,43] cannot find symbol [ERROR] symbol: method booleanValue() [ERROR] location: class java.lang.Object [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java: [217,13] cannot find symbol [ERROR] symbol: method booleanValue() [ERROR] location: class java.lang.Object [ERROR] /builddir/build/BUILD/apache-openjpa-2.2.2-source/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceXMLMetaDataParser.java: [239,44] cannot find symbol [ERROR] symbol: method booleanValue() [ERROR] location: class java.lang.Object [ERROR] -> [Help 1] thanks in advance
          Hide
          kwsutter Kevin Sutter added a comment -

          This JIRA was never meant to support the building of OpenJPA with Java 8. The intent of this JIRA was to (1) allow the use of the Java 8 runtime with OpenJPA, and (2) allow the building of customer Entity POJOs with Java 8 to be used with OpenJPA. Building OpenJPA with Java 8 is long term future goal, and is not part of this JIRA.

          Show
          kwsutter Kevin Sutter added a comment - This JIRA was never meant to support the building of OpenJPA with Java 8. The intent of this JIRA was to (1) allow the use of the Java 8 runtime with OpenJPA, and (2) allow the building of customer Entity POJOs with Java 8 to be used with OpenJPA. Building OpenJPA with Java 8 is long term future goal, and is not part of this JIRA.
          Hide
          curtisr7 Rick Curtis added a comment -

          Also, no code has been committed to the 2.2.x branch. This work has been done in trunk.

          Show
          curtisr7 Rick Curtis added a comment - Also, no code has been committed to the 2.2.x branch. This work has been done in trunk.
          Hide
          tcharl Charlie Mordant added a comment -

          Don't forget to shade asm5 to support J8 as a runtime as Mark mentionned in the first comment

          Show
          tcharl Charlie Mordant added a comment - Don't forget to shade asm5 to support J8 as a runtime as Mark mentionned in the first comment
          Hide
          curtisr7 Rick Curtis added a comment -

          We have already updated trunk's dependency to asm5.

          Show
          curtisr7 Rick Curtis added a comment - We have already updated trunk's dependency to asm5.
          Hide
          curtisr7 Rick Curtis added a comment -

          Updating fix versions... please correct them if I missed something.

          I have wanted to mark this item as fixed for a while now to avoid some of the confusion that it creates. There are still some outstanding intermittent test issues, but we can resolve those as followup work as they show up.

          Show
          curtisr7 Rick Curtis added a comment - Updating fix versions... please correct them if I missed something. I have wanted to mark this item as fixed for a while now to avoid some of the confusion that it creates. There are still some outstanding intermittent test issues, but we can resolve those as followup work as they show up.
          Hide
          cameron.hinkel Cameron Hinkel added a comment - - edited

          Hi, what is the anticipated date that this fix will be available in the maven repo so that projects can readily consume it? There are only four published versions here: http://mvnrepository.com/artifact/org.apache.openjpa/openjpa-maven-plugin

          Show
          cameron.hinkel Cameron Hinkel added a comment - - edited Hi, what is the anticipated date that this fix will be available in the maven repo so that projects can readily consume it? There are only four published versions here: http://mvnrepository.com/artifact/org.apache.openjpa/openjpa-maven-plugin
          Hide
          struberg Mark Struberg added a comment -

          We are currently voting on a 2.4.0 release. Should hit maven.central soon
          http://search.maven.org/#search|gav|1|g%3A%22org.apache.openjpa%22%20AND%20a%3A%22openjpa-maven-plugin%22

          Show
          struberg Mark Struberg added a comment - We are currently voting on a 2.4.0 release. Should hit maven.central soon http://search.maven.org/#search |gav|1|g%3A%22org.apache.openjpa%22%20AND%20a%3A%22openjpa-maven-plugin%22
          Hide
          diogogmt Diogo Monteiro added a comment - - edited

          Still keep getting the same problem with openjpa 2.4.0 even after setting converters.
          Here is the stack track:
          <openjpa-2.4.0-r422266:1674604 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class java.time.LocalDateTime" is not a valid query parameter.
          at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1534)
          at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1462)
          at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:608)
          at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:163)
          at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1055)
          at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:866)
          at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:903)
          at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:597)
          at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:370)
          at com.clouddynamics.heliotime.api.meter.helper.ResourceMeterQuery.stopMeter(ResourceMeterQuery.java:56)
          at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.create(StartMeterCmd.java:100)
          at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.execute(StartMeterCmd.java:85)
          at com.clouddynamics.heliotime.api.BaseApi.execute(BaseApi.java:41)
          at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.restEndPoint(StartMeterCmd.java:78)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:483)

          Show
          diogogmt Diogo Monteiro added a comment - - edited Still keep getting the same problem with openjpa 2.4.0 even after setting converters. Here is the stack track: <openjpa-2.4.0-r422266:1674604 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class java.time.LocalDateTime" is not a valid query parameter. at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1534) at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1462) at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:608) at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeUpdate(SQLStoreQuery.java:163) at org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1055) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:866) at org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:903) at org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:597) at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:370) at com.clouddynamics.heliotime.api.meter.helper.ResourceMeterQuery.stopMeter(ResourceMeterQuery.java:56) at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.create(StartMeterCmd.java:100) at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.execute(StartMeterCmd.java:85) at com.clouddynamics.heliotime.api.BaseApi.execute(BaseApi.java:41) at com.clouddynamics.heliotime.api.meter.command.StartMeterCmd.restEndPoint(StartMeterCmd.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483)
          Hide
          romain.manni-bucau Romain Manni-Bucau added a comment -

          Diogo Monteiro LocalDateTime is nto supported by JPA

          Show
          romain.manni-bucau Romain Manni-Bucau added a comment - Diogo Monteiro LocalDateTime is nto supported by JPA
          Hide
          diogogmt Diogo Monteiro added a comment -

          Romain Manni-Bucau Any plans on supporting in the near future?

          Show
          diogogmt Diogo Monteiro added a comment - Romain Manni-Bucau Any plans on supporting in the near future?
          Hide
          romain.manni-bucau Romain Manni-Bucau added a comment -

          Not yet sure but guess we will wait for the spec that said we have plans for jpa 2.1 and it will support converter or today using a listener to convert a Date in Local version should be easily doable

          Show
          romain.manni-bucau Romain Manni-Bucau added a comment - Not yet sure but guess we will wait for the spec that said we have plans for jpa 2.1 and it will support converter or today using a listener to convert a Date in Local version should be easily doable

            People

            • Assignee:
              curtisr7 Rick Curtis
              Reporter:
              kwsutter Kevin Sutter
            • Votes:
              8 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development