OpenJPA
  1. OpenJPA
  2. OPENJPA-1091

ReverseMappingTool fails for openjpa-examples/reversemapping sample

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.0.0-M2
    • Fix Version/s: 1.2.3, 1.3.0, 2.0.0
    • Component/s: samples, tooling
    • Labels:
      None
    • Environment:
      Sun 1.5.0_16 on MacOSX
    • Patch Info:
      Patch Available

      Description

      The openjpa-examples/reversemapping sample works on 1.3.x, but fails on trunk.

      Output from 1.3.x -
      2228 none INFO [main] openjpa.Tool - ReverseMappingTool : generating classes.
      2228 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Airlines": will rename as "reversemapping.Airline".
      2355 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Cities": will rename as "reversemapping.City".
      2356 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Countries": will rename as "reversemapping.Country".
      2357 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Flightavailability": will rename as "reversemapping.Availability".
      2358 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Flights": will rename as "reversemapping.Flight".
      2382 none INFO [main] openjpa.MetaData - Customized name found for field "citys" in type "reversemapping.Country": will rename as "reversemapping.Country".
      2390 none INFO [main] openjpa.MetaData - Customized name found for field "availabilitys" in type "reversemapping.Flight": will rename as "reversemapping.Flight".
      2392 none INFO [main] openjpa.MetaData - Customized name found for field "airline" in type "reversemapping.Airline": will rename as "reversemapping.Airline".
      2392 none INFO [main] openjpa.MetaData - Customized name found for field "airlineFull" in type "reversemapping.Airline": will rename as "reversemapping.Airline".
      2393 none INFO [main] openjpa.MetaData - Customized name found for field "departTime" in type "reversemapping.Flight": will rename as "reversemapping.Flight".
      2393 none INFO [main] openjpa.MetaData - Customized name found for field "arriveTime" in type "reversemapping.Flight": will rename as "reversemapping.Flight".
      2393 none WARN [main] openjpa.MetaData - Column "FLIGHTS.MEAL" is type CHAR(1), but OpenJPA cannot reverse map it into a Java char because OpenJPA is currently configured to store Java chars into numeric database columns. To configure OpenJPA to store Java chars into CHAR(1) columns, set the following property:
      openjpa.jdbc.DBDictionary: StoreCharsAsNumbers=false
      2399 none INFO [main] openjpa.MetaData - Table "APP.FLIGHTS_HISTORY" could not be reverse mapped. This means that the table does not have a primary key (primary keys are required to establish unique identifiers for all persistent objects) and does not match a known pattern for a table used for cross-reference or value collections.
      2399 none INFO [main] openjpa.MetaData - Table "APP.MAPS" could not be reverse mapped. This means that the table does not have a primary key (primary keys are required to establish unique identifiers for all persistent objects) and does not match a known pattern for a table used for cross-reference or value collections.
      2404 none INFO [main] openjpa.Tool - Writing generated class source code.
      2404 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.Airline".
      2408 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.Availability".
      2418 none INFO [main] openjpa.Enhance - Generating an application id for type "class reversemapping.Availability".
      2421 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.City".
      2422 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.Country".
      2423 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.Flight".
      2423 none INFO [main] openjpa.Enhance - Generating an application id for type "class reversemapping.Flight".
      2424 none INFO [main] openjpa.Tool - Writing generated metadata.
      2440 none INFO [main] openjpa.MetaData - Writing to file "orm.xml".
      2571 none INFO [main] openjpa.MetaData - Writing class "reversemapping.Airline".
      2579 none INFO [main] openjpa.MetaData - Writing class "reversemapping.Availability".
      2582 none INFO [main] openjpa.MetaData - Writing class "reversemapping.City".
      2583 none INFO [main] openjpa.MetaData - Writing class "reversemapping.Country".
      2585 none INFO [main] openjpa.MetaData - Writing class "reversemapping.Flight".

      Failing output from trunk -
      2272 none INFO [main] openjpa.Tool - ReverseMappingTool : generating classes.
      2273 none INFO [main] openjpa.MetaData - Customized name found for class "reversemapping.Airlines": will rename as "reversemapping.Airline".
      2497 none INFO [main] openjpa.MetaData - Customized name found for field "airline" in type "reversemapping.Airline": will rename as "reversemapping.Airline".
      2513 none INFO [main] openjpa.MetaData - Customized name found for field "airlineFull" in type "reversemapping.Airline": will rename as "reversemapping.Airline".
      2517 none WARN [main] openjpa.MetaData - Column "AIRLINES.MEAL" is type CHAR(1), but OpenJPA cannot reverse map it into a Java char because OpenJPA is currently configured to store Java chars into numeric database columns. To configure OpenJPA to store Java chars into CHAR(1) columns, set the following property:
      openjpa.jdbc.DBDictionary: StoreCharsAsNumbers=false
      2522 none INFO [main] openjpa.MetaData - Table "SYS.AIRLINES" could not be reverse mapped. This means that the table does not have a primary key (primary keys are required to establish unique identifiers for all persistent objects) and does not match a known pattern for a table used for cross-reference or value collections.
      2522 none INFO [main] openjpa.MetaData - Table "SYSIBM.AIRLINES" could not be reverse mapped. This means that the table does not have a primary key (primary keys are required to establish unique identifiers for all persistent objects) and does not match a known pattern for a table used for cross-reference or value collections.
      2526 none INFO [main] openjpa.Tool - Writing generated class source code.
      2526 none INFO [main] openjpa.MetaData - Writing java code for generated type "reversemapping.Airline".
      2531 none INFO [main] openjpa.Tool - Writing generated metadata.
      2550 none INFO [main] openjpa.MetaData - Writing to file "orm.xml".
      2567 none INFO [main] openjpa.MetaData - Writing class "reversemapping.Airline".
      /Users/drwoods/openjpa/trunk/openjpa-integration/examples/target/examples/apache-openjpa-2.0.0-SNAPSHOT/examples/reversemapping/Main.java:52: cannot find symbol
      symbol : class Availability
      location: class reversemapping.Main
      List<Availability> schedule = (List<Availability>)
      ^
      . . .

      1. OPENJPA-1091-12x.diff
        6 kB
        Donald Woods
      2. OPENJPA-1091.1.2.x.diff.txt
        0.7 kB
        Michael Dick

        Issue Links

          Activity

          Hide
          Donald Woods added a comment -

          Can recreate the above by:
          1) building trunk -
          mvn clean install
          2) running the integration examples build -
          cd openjpa-integration
          mvn integration-test -Pexamples-profile

          Show
          Donald Woods added a comment - Can recreate the above by: 1) building trunk - mvn clean install 2) running the integration examples build - cd openjpa-integration mvn integration-test -Pexamples-profile
          Hide
          Donald Woods added a comment -

          Get even worse results on trunk if Java 1.6.0_07 is used (with Derby 10.2.2.0 or 10.4.2.0) -
          [INFO] ------------------------------------------------------------------------
          [INFO] Building OpenJPA Examples Integration Tests
          [INFO] task-segment: [integration-test]
          [INFO] ------------------------------------------------------------------------
          [INFO] [checkstyle:checkstyle

          {execution: default}

          ]
          [INFO] Source directory does not exist - skipping report.
          [INFO] [site:attach-descriptor]
          [INFO] [antrun:run

          {execution: run-examples}

          ]
          [INFO] Executing tasks
          [echo] Running OpenJPA Examples
          [mkdir] Created dir: /Users/drwoods/openjpa/trunk/openjpa-integration/examples/target/examples
          [unzip] Expanding: /Users/drwoods/openjpa/trunk/openjpa-project/target/site/downloads/apache-openjpa-2.0.0-SNAPSHOT-binary.zip into /Users/drwoods/openjpa/trunk/openjpa-integration/examples/target/examples

          pre-compile:

          compile:
          [javac] Compiling 2 source files

          run:
          [java] Exception in thread "main" <openjpa-2.0.0-SNAPSHOT-r422266:775185M nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'.
          [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
          [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453)
          [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159)
          [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:163)
          [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:119)
          [java] at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:204)
          [java] at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:160)
          [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:212)
          [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:165)
          [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:64)
          [java] at hellojpa.Main.main(Main.java:43)
          [java] Caused by: java.sql.SQLException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'.
          [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
          [java] at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQueryUsingSystemTables(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.doGetCols(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getColumns(Unknown Source)
          [java] at org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:145)
          [java] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingDatabaseMetaData.getColumns(LoggingConnectionDecorator.java:751)
          [java] at org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:145)
          [java] at org.apache.openjpa.jdbc.sql.DBDictionary.getColumns(DBDictionary.java:3818)
          [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateTables(SchemaGenerator.java:459)
          [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchema(SchemaGenerator.java:335)
          [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchemas(SchemaGenerator.java:284)
          [java] at org.apache.openjpa.jdbc.schema.SchemaTool.getDBSchemaGroup(SchemaTool.java:1143)
          [java] at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:344)
          [java] at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:321)
          [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:501)
          [java] ... 10 more
          [java] Caused by: java.sql.SQLException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'.
          [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
          [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
          [java] ... 40 more
          [java] Caused by: java.lang.LinkageError: loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11"
          [java] at java.lang.ClassLoader.defineClass1(Native Method)
          [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
          [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
          [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
          [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
          [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
          [java] at java.security.AccessController.doPrivileged(Native Method)
          [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
          [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
          [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
          [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
          [java] at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:234)
          [java] at java.security.AccessController.doPrivileged(Native Method)
          [java] at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225)
          [java] at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205)
          [java] at sun.security.jca.ProviderList.getProvider(ProviderList.java:215)
          [java] at sun.security.jca.ProviderList.getService(ProviderList.java:313)
          [java] at sun.security.jca.GetInstance.getInstance(GetInstance.java:140)
          [java] at java.security.Security.getImpl(Security.java:659)
          [java] at java.security.MessageDigest.getInstance(MessageDigest.java:129)
          [java] at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1759)
          [java] at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:52)
          [java] at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:205)
          [java] at java.security.AccessController.doPrivileged(Native Method)
          [java] at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:202)
          [java] at java.io.ObjectStreamClass.writeNonProxy(ObjectStreamClass.java:667)
          [java] at java.io.ObjectOutputStream.writeClassDescriptor(ObjectOutputStream.java:640)
          [java] at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1245)
          [java] at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203)
          [java] at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1282)
          [java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
          [java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
          [java] at org.apache.derby.iapi.services.io.FormatIdOutputStream.writeObject(Unknown Source)
          [java] at org.apache.derby.iapi.services.io.FormatableHashtable.writeExternal(Unknown Source)
          . . .

          Show
          Donald Woods added a comment - Get even worse results on trunk if Java 1.6.0_07 is used (with Derby 10.2.2.0 or 10.4.2.0) - [INFO] ------------------------------------------------------------------------ [INFO] Building OpenJPA Examples Integration Tests [INFO] task-segment: [integration-test] [INFO] ------------------------------------------------------------------------ [INFO] [checkstyle:checkstyle {execution: default} ] [INFO] Source directory does not exist - skipping report. [INFO] [site:attach-descriptor] [INFO] [antrun:run {execution: run-examples} ] [INFO] Executing tasks [echo] Running OpenJPA Examples [mkdir] Created dir: /Users/drwoods/openjpa/trunk/openjpa-integration/examples/target/examples [unzip] Expanding: /Users/drwoods/openjpa/trunk/openjpa-project/target/site/downloads/apache-openjpa-2.0.0-SNAPSHOT-binary.zip into /Users/drwoods/openjpa/trunk/openjpa-integration/examples/target/examples pre-compile: compile: [javac] Compiling 2 source files run: [java] Exception in thread "main" <openjpa-2.0.0-SNAPSHOT-r422266:775185M nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'. [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553) [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:453) [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159) [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:163) [java] at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:119) [java] at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:204) [java] at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:160) [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:212) [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:165) [java] at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:64) [java] at hellojpa.Main.main(Main.java:43) [java] Caused by: java.sql.SQLException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'. [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) [java] at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) [java] at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) [java] at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) [java] at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source) [java] at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQueryUsingSystemTables(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.doGetCols(Unknown Source) [java] at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getColumns(Unknown Source) [java] at org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:145) [java] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingDatabaseMetaData.getColumns(LoggingConnectionDecorator.java:751) [java] at org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData.getColumns(DelegatingDatabaseMetaData.java:145) [java] at org.apache.openjpa.jdbc.sql.DBDictionary.getColumns(DBDictionary.java:3818) [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateTables(SchemaGenerator.java:459) [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchema(SchemaGenerator.java:335) [java] at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchemas(SchemaGenerator.java:284) [java] at org.apache.openjpa.jdbc.schema.SchemaTool.getDBSchemaGroup(SchemaTool.java:1143) [java] at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:344) [java] at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:321) [java] at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:501) [java] ... 10 more [java] Caused by: java.sql.SQLException: Java exception: 'loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11": java.lang.LinkageError'. [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) [java] at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) [java] ... 40 more [java] Caused by: java.lang.LinkageError: loader (instance of sun/misc/Launcher$ExtClassLoader): attempted duplicate class definition for name: "sun/security/pkcs11/SunPKCS11" [java] at java.lang.ClassLoader.defineClass1(Native Method) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:675) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:56) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:316) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288) [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [java] at sun.security.jca.ProviderConfig$3.run(ProviderConfig.java:234) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:225) [java] at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:205) [java] at sun.security.jca.ProviderList.getProvider(ProviderList.java:215) [java] at sun.security.jca.ProviderList.getService(ProviderList.java:313) [java] at sun.security.jca.GetInstance.getInstance(GetInstance.java:140) [java] at java.security.Security.getImpl(Security.java:659) [java] at java.security.MessageDigest.getInstance(MessageDigest.java:129) [java] at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1759) [java] at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:52) [java] at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:205) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:202) [java] at java.io.ObjectStreamClass.writeNonProxy(ObjectStreamClass.java:667) [java] at java.io.ObjectOutputStream.writeClassDescriptor(ObjectOutputStream.java:640) [java] at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1245) [java] at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203) [java] at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1282) [java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) [java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) [java] at org.apache.derby.iapi.services.io.FormatIdOutputStream.writeObject(Unknown Source) [java] at org.apache.derby.iapi.services.io.FormatableHashtable.writeExternal(Unknown Source) . . .
          Hide
          Donald Woods added a comment -

          Also, looks like the reversemapping example never worked on Windows (at least it doesn't for 1.3.x) due to an invalid path being passed in dburl.

          Show
          Donald Woods added a comment - Also, looks like the reversemapping example never worked on Windows (at least it doesn't for 1.3.x) due to an invalid path being passed in dburl.
          Hide
          David M. Karr added a comment -

          Concerning the last comment, I believe that's the problem that I've noticed. I noticed the following in the log when I tried to run it on WinXP.

          <openjpa-1.2.1-r752877:753278 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "org.apache.derby.jdbc.EmbeddedDriver" and URL "jdbc:derby:c:\frameworks\apache-openjpa-1.2.1\examples\reversemapping/reversemapping-database;create=true". You may have specified an invalid URL.
          ...
          Caused by: java.sql.SQLException: Failed to start database 'c:\frameworks\apache-openjpa-1.2.1\examples\reversemapping/reversemapping-database', see the next exception for details.

          Show
          David M. Karr added a comment - Concerning the last comment, I believe that's the problem that I've noticed. I noticed the following in the log when I tried to run it on WinXP. <openjpa-1.2.1-r752877:753278 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "org.apache.derby.jdbc.EmbeddedDriver" and URL "jdbc:derby:c:\frameworks\apache-openjpa-1.2.1\examples\reversemapping/reversemapping-database;create=true". You may have specified an invalid URL. ... Caused by: java.sql.SQLException: Failed to start database 'c:\frameworks\apache-openjpa-1.2.1\examples\reversemapping/reversemapping-database', see the next exception for details.
          Hide
          Leilei Zhou added a comment -

          I met the same issue as David M. What's wrong with it?

          Show
          Leilei Zhou added a comment - I met the same issue as David M. What's wrong with it?
          Hide
          Xiaoqin Feng added a comment -

          I am on vacation from 12/20/2009  to 12/26/2009.

          If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.

          For emergency, contact me at 925-209-5517.

          Show
          Xiaoqin Feng added a comment - I am on vacation from 12/20/2009  to 12/26/2009. If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu. For emergency, contact me at 925-209-5517.
          Hide
          Michael Dick added a comment -

          It looks like a simple path conversion problem. The attached patch should resolve the issue. I don't have a windows install handy to try it out though.

          Show
          Michael Dick added a comment - It looks like a simple path conversion problem. The attached patch should resolve the issue. I don't have a windows install handy to try it out though.
          Hide
          Donald Woods added a comment -

          Thanks Mike. I'll give it a try tomorrow.

          Show
          Donald Woods added a comment - Thanks Mike. I'll give it a try tomorrow.
          Hide
          Donald Woods added a comment -

          Patch <OPENJPA-1091-12x.diff> that fixes the reversemapping example by splitting the SQL out into a separate exec, as the Derby driver was locked (at lest with ANT 1.7.1 and 1.8.0RC1.)

          Show
          Donald Woods added a comment - Patch < OPENJPA-1091 -12x.diff> that fixes the reversemapping example by splitting the SQL out into a separate exec, as the Derby driver was locked (at lest with ANT 1.7.1 and 1.8.0RC1.)
          Hide
          Donald Woods added a comment -

          Patch fixed 1.3.x.
          Patch corrected the SQL problem on trunk, but now exposes the failure to create all the Java classes from the DB schema (only creates Airline.java and not the other entities.)

          Show
          Donald Woods added a comment - Patch fixed 1.3.x. Patch corrected the SQL problem on trunk, but now exposes the failure to create all the Java classes from the DB schema (only creates Airline.java and not the other entities.)
          Hide
          Jeremy Bauer added a comment -

          OPENJPA-1605 is the cause of this failing example on 2.0.x and trunk. Will be integrating a fix shortly.

          Show
          Jeremy Bauer added a comment - OPENJPA-1605 is the cause of this failing example on 2.0.x and trunk. Will be integrating a fix shortly.
          Hide
          Jeremy Bauer added a comment -

          The commits for OPENJPA-1605 fix the reverse mapping example on branch 2.0.x and trunk.

          Show
          Jeremy Bauer added a comment - The commits for OPENJPA-1605 fix the reverse mapping example on branch 2.0.x and trunk.
          Hide
          Donald Woods added a comment -

          Don't need Fix Version of 2.1.0 since 2.0.0 hasn't been released yet....

          Show
          Donald Woods added a comment - Don't need Fix Version of 2.1.0 since 2.0.0 hasn't been released yet....

            People

            • Assignee:
              Jeremy Bauer
              Reporter:
              Donald Woods
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development