OpenJPA
  1. OpenJPA
  2. OPENJPA-1951

missing key "cant-set-value" in localizer properties org.apache.openjpa.jdbc.meta.strats

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2, 2.1.0, 2.2.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      Key cant-set-value is missing in properties file org.apache.openjpa.jdbc.meta.strats in openjpa-jdbc-2.0.1.jar so we don't get descriptive message in case this exception occurs.
      To reproduce it set some field as not nullable in jpa and try to update it with null value.

        Activity

        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Vedran Vidović added a comment -

        For now I temporarily copied a properties file in our project to override one in a jar package (and added a missing key, copied from 2.1.0 version). We will switch to 2.0.2 when it becomes available from a maven2 repo.

        Thanks for a quick fix

        Show
        Vedran Vidović added a comment - For now I temporarily copied a properties file in our project to override one in a jar package (and added a missing key, copied from 2.1.0 version). We will switch to 2.0.2 when it becomes available from a maven2 repo. Thanks for a quick fix
        Hide
        Kevin Sutter added a comment -

        You are correct, Vedran. My mistake. All of my testing and experimentation was with OpenJPA 2.0.x. The OpenJPA 2.1.x (and beyond) binaries require Java 6 for the runtime. Thanks for the clarification.

        Show
        Kevin Sutter added a comment - You are correct, Vedran. My mistake. All of my testing and experimentation was with OpenJPA 2.0.x. The OpenJPA 2.1.x (and beyond) binaries require Java 6 for the runtime. Thanks for the clarification.
        Hide
        Michael Dick added a comment -

        OpenJPA 2.0.2 should work for you - when it's released. I can give you a patch for the openjpa jar if you need something in the mean time (or you can grab a snapshot build for 2.0.2).

        Show
        Michael Dick added a comment - OpenJPA 2.0.2 should work for you - when it's released. I can give you a patch for the openjpa jar if you need something in the mean time (or you can grab a snapshot build for 2.0.2).
        Hide
        Vedran Vidović added a comment - - edited

        Unfortunately an OpenJPA 2.1.x can't be used with jdk 1.5, here is a simple test which can prove that:
        java -cp openjpa-jdbc-2.1.0.jar org.apache.openjpa.jdbc.meta.MappingTool
        The java class could not be loaded. java.lang.UnsupportedClassVersionError: (org/apache/openjpa/jdbc/meta/MappingTool) bad major version at offset=6

        And this stops us from using new version in a current project

        Show
        Vedran Vidović added a comment - - edited Unfortunately an OpenJPA 2.1.x can't be used with jdk 1.5, here is a simple test which can prove that: java -cp openjpa-jdbc-2.1.0.jar org.apache.openjpa.jdbc.meta.MappingTool The java class could not be loaded. java.lang.UnsupportedClassVersionError: (org/apache/openjpa/jdbc/meta/MappingTool) bad major version at offset=6 And this stops us from using new version in a current project
        Michael Dick made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Michael Dick [ mikedd ]
        Fix Version/s 2.0.2 [ 12315257 ]
        Fix Version/s 2.2.0 [ 12315910 ]
        Fix Version/s 2.1.0 [ 12314542 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael Dick added a comment -

        This issue was originally reported on the users mailing list:
        http://markmail.org/message/mfsloxguhitlrrsn

        This issue has already been fixed in

        2.0.x: revision 1068004
        2.1.x: revision 1068002
        trunk: revision 1067989

        Show
        Michael Dick added a comment - This issue was originally reported on the users mailing list: http://markmail.org/message/mfsloxguhitlrrsn This issue has already been fixed in 2.0.x: revision 1068004 2.1.x: revision 1068002 trunk: revision 1067989
        Hide
        Kevin Sutter added a comment -

        Hi. Even though OpenJPA 2.1.x is built with Java 6, it should still run okay with Java 5. You won't have access to the MetaModel annotation processor (code generation), but that wouldn't be new for your environment. I am in the process of updating this old article [1] to explain how to use OpenJPA 2.x in WebSphere v6.1 environment (non-managed, of course) and I have not had any problems running the samples and tests in this environment. The updated article should be posted soon on Developer Works.

        I'm not trying to justify not fixing this in OpenJPA 2.0.x, but I thought I would let you know that I think the OpenJPA 2.1.x driver would work for you as well.

        [1] http://www.ibm.com/developerworks/websphere/techjournal/0612_barcia/0612_barcia.html

        Show
        Kevin Sutter added a comment - Hi. Even though OpenJPA 2.1.x is built with Java 6, it should still run okay with Java 5. You won't have access to the MetaModel annotation processor (code generation), but that wouldn't be new for your environment. I am in the process of updating this old article [1] to explain how to use OpenJPA 2.x in WebSphere v6.1 environment (non-managed, of course) and I have not had any problems running the samples and tests in this environment. The updated article should be posted soon on Developer Works. I'm not trying to justify not fixing this in OpenJPA 2.0.x, but I thought I would let you know that I think the OpenJPA 2.1.x driver would work for you as well. [1] http://www.ibm.com/developerworks/websphere/techjournal/0612_barcia/0612_barcia.html
        Hide
        Vedran Vidović added a comment -

        This key is present in 2.1.0 version (4 days ago) but this version is compiled with java 1.6 and we can't use it in our environment (WebSphere 6.1).

        Show
        Vedran Vidović added a comment - This key is present in 2.1.0 version (4 days ago) but this version is compiled with java 1.6 and we can't use it in our environment (WebSphere 6.1).
        Vedran Vidović created issue -

          People

          • Assignee:
            Michael Dick
            Reporter:
            Vedran Vidović
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development