openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1091) ReverseMappingTool fails for openjpa-examples/reversemapping sample
Date Fri, 15 May 2009 17:55:45 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709922#action_12709922
] 

Donald Woods commented on OPENJPA-1091:
---------------------------------------

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)
. . .

> ReverseMappingTool fails for openjpa-examples/reversemapping sample
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1091
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1091
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: samples, tooling
>    Affects Versions: 2.0.0
>         Environment: Sun 1.5.0_16 on MacOSX
>            Reporter: Donald Woods
>             Fix For: 2.0.0
>
>
> 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>)
>              ^
> . . .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message