[ https://issues.apache.org/jira/browse/OPENJPA-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913780#action_12913780 ]
Donald Woods commented on OPENJPA-1804: --------------------------------------- Updated output using trunk and OPENJPA-1811 (dynamic enhancer working on Mac) - drwoods:target/$ java -cp ./openjpa-all-2.1.0-SNAPSHOT.jar:./h2-1.2.143.jar:./openjpatest-trunk.jar openjpatest.Main -Dopenjpa.Log=DefaultLevel=TRACE 4 db TRACE [main] openjpa.Runtime - Setting the following properties from "jar:file:/private/tmp/openjpatest/target/openjpatest-trunk.jar!/META-INF/persistence.xml" into configuration: {openjpa.BrokerFactory=jdbc, openjpa.ConnectionDriverName=org.h2.Driver, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.MetaDataFactory=jpa(Types=openjpatest.AddressBook;openjpatest.Group;openjpatest.Organization), openjpa.Log=DefaultLevel=TRACE, PersistenceVersion=2.0, openjpa.ConnectionURL=jdbc:h2:mem:test, openjpa.Id=db} 64 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation() _inst:null _dynamicallyInstall:true 66 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- couldn't find default /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar 66 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- found /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar 1 db TRACE [main] openjpa.Runtime - Setting the following properties from "jar:file:/private/tmp/openjpatest/target/openjpatest-trunk.jar!/META-INF/persistence.xml" into configuration: {openjpa.ConnectionDriverName=org.h2.Driver, openjpa.RuntimeUnenhancedClasses=supported, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl, openjpa.MetaDataFactory=jpa(Types=openjpatest.AddressBook;openjpatest.Group;openjpatest.Organization), openjpa.Log=DefaultLevel=TRACE, PersistenceVersion=2.0, openjpa.ConnectionURL=jdbc:h2:mem:test, openjpa.Id=db} 69 db TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance. 130 db TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance. 154 db TRACE [main] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types. 156 db TRACE [main] openjpa.MetaData - The persistent unit root url is "null" 156 db TRACE [main] openjpa.MetaData - parsePersistentTypeNames() found [openjpatest.Group, openjpatest.Organization, openjpatest.AddressBook]. 156 db TRACE [main] openjpa.MetaData - Found 3 classes with metadata in 25 milliseconds. 160 db TRACE [main] openjpa.MetaData - Clearing metadata repository "org.apache.openjpa.meta.metadatareposit...@4e4ee70b". 716 db INFO [main] openjpa.Runtime - OpenJPA dynamically loaded the class enhancer. Any classes that were not enhanced at build time will be enhanced when they are loaded by the JVM. 718 db TRACE [main] openjpa.Runtime - Trying to load javax.validation APIs based on the ValidationMode=AUTO 846 db INFO [main] openjpa.Runtime - OpenJPA dynamically loaded a validation provider. 874 db TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.persistenceprovideri...@7114460 creating org.apache.openjpa.persistence.entitymanagerfactoryi...@7e9ffe3f for PU db. 877 db INFO [main] openjpa.Runtime - Starting OpenJPA 2.1.0-SNAPSHOT 879 db TRACE [main] openjpa.Runtime - Properties: javax.persistence.lock.timeout: 0 javax.persistence.query.timeout: 0 javax.persistence.sharedCache.mode: UNSPECIFIED javax.persistence.validation.group.pre-persist: javax.validation.groups.Default javax.persistence.validation.group.pre-update: javax.validation.groups.Default openjpa.AutoClear: 0 openjpa.AutoDetach: [Ljava.lang.String;@30ff8c74 openjpa.BrokerFactory: jdbc openjpa.BrokerImpl: default openjpa.CacheDistributionPolicy: default openjpa.Callbacks: default openjpa.ClassResolver: default openjpa.Compatibility: default openjpa.ConnectionDriverName: org.h2.Driver openjpa.ConnectionFactoryMode: false openjpa.ConnectionRetainMode: 0 openjpa.ConnectionURL: jdbc:h2:mem:test openjpa.DataCache: false openjpa.DataCacheManager: default openjpa.DataCacheTimeout: -1 openjpa.DetachState: loaded openjpa.DynamicDataStructs: false openjpa.DynamicEnhancementAgent: true openjpa.EntityManagerFactory: default openjpa.FetchBatchSize: -1 openjpa.FetchGroups: [Ljava.lang.String;@595e2ccd openjpa.FlushBeforeQueries: 0 openjpa.Id: db openjpa.IgnoreChanges: false openjpa.InitializeEagerly: false openjpa.InstrumentationManager: default openjpa.InverseManager: false openjpa.LifecycleEventManager: validating openjpa.LockManager: mixed openjpa.Log: true(DefaultLevel=TRACE) openjpa.ManagedRuntime: auto openjpa.MaxFetchDepth: -1 openjpa.MetaDataFactory: jpa(Types=openjpatest.AddressBook;openjpatest.Group;openjpatest.Organization) openjpa.MetaDataRepository: default openjpa.Multithreaded: false openjpa.NontransactionalRead: true openjpa.NontransactionalWrite: true openjpa.Optimistic: true openjpa.OrphanedKeyAction: log openjpa.ProxyManager: default openjpa.QueryCache: false openjpa.QueryCompilationCache: true openjpa.ReadLockLevel: 10 openjpa.RefreshFromDataCache: false openjpa.RestoreState: 1 openjpa.RetainState: true openjpa.RetryClassRegistration: false openjpa.RuntimeUnenhancedClasses: 0 openjpa.SavepointManager: in-mem openjpa.Sequence: table openjpa.TransactionMode: false openjpa.WriteLockLevel: 20 openjpa.jdbc.DriverDataSource: auto openjpa.jdbc.EagerFetchMode: 2 openjpa.jdbc.FetchDirection: 1000 openjpa.jdbc.FinderCache: true openjpa.jdbc.IdentifierUtil: default openjpa.jdbc.LRSSize: 2 openjpa.jdbc.MappingDefaults: jpa openjpa.jdbc.QuerySQLCache: true openjpa.jdbc.ResultSetType: 1003 openjpa.jdbc.SQLFactory: default openjpa.jdbc.SchemaFactory: dynamic openjpa.jdbc.Schemas: [Ljava.lang.String;@30ff8c74 openjpa.jdbc.SubclassFetchMode: 1 openjpa.jdbc.SynchronizeMappings: null openjpa.jdbc.TransactionIsolation: -1 openjpa.jdbc.UpdateManager: default 881 db TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance. 973 db TRACE [main] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.persistencemappingfact...@565bb966". 1024 db INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.H2Dictionary". 1170 db TRACE [main] openjpa.jdbc.JDBC - createConnectionFactory: datasource=org.apache.openjpa.jdbc.schema.autodriverdatasour...@5c6ed322 1260 db TRACE [main] openjpa.jdbc.JDBC - DataSource connection setAutoCommit to "true" CCCCC - using DBCPDriverDataSource 1817 db TRACE [main] openjpa.jdbc.JDBC - catalogSeparator: . catalogTerm: catalog databaseProductName: H2 databaseProductVersion: 1.2.143 (2010-09-18) driverName: H2 JDBC Driver driverVersion: 1.2.143 (2010-09-18) extraNameCharacters: identifierQuoteString: " numericFunctions: ABS,ACOS,ASIN,ATAN,COS,COT,SIN,TAN,ATAN2,BITAND,BITOR,BITXOR,MOD,CEILING,DEGREES,EXP,FLOOR,LOG,LOG10,RADIANS,SQRT,PI,POWER,RAND,RANDOM_UUID,ROUND,ROUNDMAGIC,SECURE_RAND,SIGN,ENCRYPT,DECRYPT,HASH,TRUNCATE,COMPRESS,EXPAND,ZERO procedureTerm: procedure schemaTerm: schema searchStringEscape: \ sqlKeywords: LIMIT,MINUS,ROWNUM,SYSDATE,SYSTIME,SYSTIMESTAMP,TODAY stringFunctions: ASCII,BIT_LENGTH,LENGTH,OCTET_LENGTH,CHAR,CONCAT,DIFFERENCE,HEXTORAW,RAWTOHEX,INSTR,INSERT,LOWER,UPPER,LEFT,RIGHT,LOCATE,POSITION,LPAD,RPAD,LTRIM,RTRIM,TRIM,REGEXP_REPLACE,REPEAT,REPLACE,SOUNDEX,SPACE,STRINGDECODE,STRINGENCODE,STRINGTOUTF8,SUBSTRING,UTF8TOSTRING,XMLATTR,XMLNODE,XMLCOMMENT,XMLCDATA,XMLSTARTDOC,XMLTEXT systemFunctions: ARRAY_GET,ARRAY_LENGTH,AUTOCOMMIT,CANCEL_SESSION,CASEWHEN,CAST,COALESCE,CONVERT,CURRVAL,CSVREAD,CSVWRITE,DATABASE,DATABASE_PATH,FILE_READ,GREATEST,IDENTITY,IFNULL,LEAST,LOCK_MODE,LOCK_TIMEOUT,LINK_SCHEMA,MEMORY_FREE,MEMORY_USED,NEXTVAL,NULLIF,READONLY,ROWNUM,SCHEMA,SCOPE_IDENTITY,SESSION_ID,SET,TABLE,TRANSACTION_ID,USER timeDateFunctions: CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,DATEADD,DATEDIFF,DAYNAME,DAY_OF_MONTH,DAY_OF_WEEK,DAY_OF_YEAR,EXTRACT,FORMATDATETIME,HOUR,MINUTE,MONTH,MONTHNAME,PARSEDATETIME,QUARTER,SECOND,WEEK,YEAR url: jdbc:h2:mem:test userName: defaultTransactionIsolation: 2 driverMajorVersion: 1 driverMinorVersion: 2 maxBinaryLiteralLength: 0 maxCatalogNameLength: 0 maxCharLiteralLength: 0 maxColumnNameLength: 0 maxColumnsInGroupBy: 0 maxColumnsInIndex: 0 maxColumnsInOrderBy: 0 maxColumnsInSelect: 0 maxColumnsInTable: 0 maxConnections: 0 maxCursorNameLength: 0 maxIndexLength: 0 maxProcedureNameLength: 0 maxRowSize: 0 maxSchemaNameLength: 0 maxStatementLength: 0 maxStatements: 0 maxTableNameLength: 0 maxTablesInSelect: 0 maxUserNameLength: 0 isCatalogAtStart: true isReadOnly: false nullPlusNonNullIsNull: true nullsAreSortedAtEnd: false nullsAreSortedAtStart: false nullsAreSortedHigh: false nullsAreSortedLow: true storesLowerCaseIdentifiers: false storesLowerCaseQuotedIdentifiers: false storesMixedCaseIdentifiers: false storesMixedCaseQuotedIdentifiers: true storesUpperCaseIdentifiers: true storesUpperCaseQuotedIdentifiers: false supportsAlterTableWithAddColumn: true supportsAlterTableWithDropColumn: true supportsANSI92EntryLevelSQL: true supportsANSI92FullSQL: false supportsANSI92IntermediateSQL: false supportsCatalogsInDataManipulation: true supportsCatalogsInIndexDefinitions: true supportsCatalogsInPrivilegeDefinitions: true supportsCatalogsInProcedureCalls: false supportsCatalogsInTableDefinitions: true supportsColumnAliasing: true supportsConvert: true supportsCoreSQLGrammar: true supportsCorrelatedSubqueries: true supportsDataDefinitionAndDataManipulationTransactions: false supportsDataManipulationTransactionsOnly: true supportsDifferentTableCorrelationNames: false supportsExpressionsInOrderBy: true supportsExtendedSQLGrammar: false supportsFullOuterJoins: false supportsGroupBy: true supportsGroupByBeyondSelect: true supportsGroupByUnrelated: true supportsIntegrityEnhancementFacility: true supportsLikeEscapeClause: true supportsLimitedOuterJoins: true supportsMinimumSQLGrammar: true supportsMixedCaseIdentifiers: false supportsMixedCaseQuotedIdentifiers: true supportsMultipleResultSets: false supportsMultipleTransactions: true supportsNonNullableColumns: true supportsOpenCursorsAcrossCommit: false supportsOpenCursorsAcrossRollback: false supportsOpenStatementsAcrossCommit: true supportsOpenStatementsAcrossRollback: true supportsOrderByUnrelated: true supportsOuterJoins: true supportsPositionedDelete: true supportsPositionedUpdate: true supportsSchemasInDataManipulation: true supportsSchemasInIndexDefinitions: true supportsSchemasInPrivilegeDefinitions: true supportsSchemasInProcedureCalls: true supportsSchemasInTableDefinitions: true supportsSelectForUpdate: true supportsStoredProcedures: false supportsSubqueriesInComparisons: true supportsSubqueriesInExists: true supportsSubqueriesInIns: true supportsSubqueriesInQuantifieds: true supportsTableCorrelationNames: true supportsTransactions: true supportsUnion: true supportsUnionAll: true usesLocalFilePerTable: false usesLocalFiles: true allProceduresAreCallable: true allTablesAreSelectable: true dataDefinitionCausesTransactionCommit: true dataDefinitionIgnoredInTransactions: false doesMaxRowSizeIncludeBlobs: false supportsBatchUpdates: true 1821 db TRACE [main] openjpa.jdbc.JDBC - Initial connection autoCommit: true, holdability: 1, TransactionIsolation: 2 1833 db TRACE [main] openjpa.jdbc.JDBC - <t 1205573714, conn 569201753> [3 ms] close 1928 db TRACE [main] openjpa.Runtime - Found datasource1: datasource 1550766882 from configuration. StoreContext: org.apache.openjpa.kernel.finalizingbrokeri...@345c98f3 1937 db TRACE [main] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types. 1937 db TRACE [main] openjpa.MetaData - The persistent unit root url is "null" 1938 db TRACE [main] openjpa.MetaData - parsePersistentTypeNames() found [openjpatest.Group, openjpatest.Organization, openjpatest.AddressBook]. 1938 db TRACE [main] openjpa.MetaData - Found 3 classes with metadata in 1 milliseconds. 1385 db TRACE [main] openjpa.Enhance - "openjpatest/Group" requires runtime enhancement: true 1416 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.Group" under mode "[META][QUERY]". 1433 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.Group". 1433 db TRACE [main] openjpa.MetaData - Parsing package "openjpatest.Group". 1469 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.Group". 1469 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1504 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.Group" to "null". 1504 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.gr...@1606871064". 1504 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@1606871064.id". 1511 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@1606871064.name". 1511 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@1606871064.organization". 1511 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.Organization" under mode "[META][QUERY]". 1511 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.Organization". 1513 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.Organization". 1513 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1521 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.Organization" to "null". 1521 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@1606871064.version". 1522 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.organizat...@570110481". 1522 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@570110481.addressbook". 1522 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.AddressBook" under mode "[META][QUERY]". 1522 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.AddressBook". 1523 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.AddressBook". 1523 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1527 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.EmailAddress". 1527 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1527 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.AddressBook" to "null". 1527 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@570110481.hostnames". 1527 db TRACE [main] openjpa.MetaData - Resolving embedded metadata for "java.lang.obj...@1671818348". 1528 db TRACE [main] openjpa.MetaData - Preparing mapping for "openjpatest.Group". 1528 db TRACE [main] openjpa.MetaData - Resolving mapping for "openjpatest.gr...@1606871064". 1528 db WARN [main] openjpa.Enhance - An exception was thrown while attempting to perform class file transformation on "openjpatest/Group": <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.util.MetaDataException: Errors encountered while resolving metadata. See nested exceptions for details. at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:655) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:143) at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:124) at sun.instrument.TransformerManager.transform(TransformerManager.java:169) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1538) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(MetaDataRepository.java:1514) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1492) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:283) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:999559M nonfatal user error> org.apache.openjpa.util.MetaDataException: No metadata was found for type "class java.lang.Object". The class is not enhanced. at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:390) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1822) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:435) at org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1732) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1853) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:809) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) ... 33 more NestedThrowables: <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.util.MetaDataException: Unable to resolve type "openjpatest.AddressBook" due to previous errors resolving related type "openjpatest.Organization". at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:822) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:143) at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:124) at sun.instrument.TransformerManager.transform(TransformerManager.java:169) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1538) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(MetaDataRepository.java:1514) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1492) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:283) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) 1535 db TRACE [main] openjpa.Enhance - "openjpatest/Organization" requires runtime enhancement: true 1537 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.Organization" under mode "[META][QUERY]". 1537 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.Organization". 1538 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.Organization". 1538 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1540 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.Organization" to "null". 1540 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.organizat...@1056794277". 1540 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@1056794277.addressbook". 1541 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.AddressBook" under mode "[META][QUERY]". 1541 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.AddressBook". 1541 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.AddressBook". 1541 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1542 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.EmailAddress". 1542 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1542 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.AddressBook" to "null". 1543 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@1056794277.hostnames". 1543 db TRACE [main] openjpa.MetaData - Resolving embedded metadata for "java.lang.obj...@1851652849". 1543 db WARN [main] openjpa.Enhance - An exception was thrown while attempting to perform class file transformation on "openjpatest/Organization": <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.util.MetaDataException: Errors encountered while resolving metadata. See nested exceptions for details. at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:655) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:143) at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:124) at sun.instrument.TransformerManager.transform(TransformerManager.java:169) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1538) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(MetaDataRepository.java:1514) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1492) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:283) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:999559M nonfatal user error> org.apache.openjpa.util.MetaDataException: No metadata was found for type "class java.lang.Object". The class is not enhanced. at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:390) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1822) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:435) at org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1732) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1853) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:809) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) ... 33 more NestedThrowables: <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.util.MetaDataException: Unable to resolve type "openjpatest.AddressBook" due to previous errors resolving related type "openjpatest.Organization". at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:822) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:143) at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:124) at sun.instrument.TransformerManager.transform(TransformerManager.java:169) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1538) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypesInternal(MetaDataRepository.java:1514) at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1492) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:283) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) 1547 db TRACE [main] openjpa.Enhance - "openjpatest/AddressBook" requires runtime enhancement: true 1549 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.AddressBook" under mode "[META][QUERY]". 1549 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.AddressBook". 1549 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.AddressBook". 1550 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1551 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.EmailAddress". 1551 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1551 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.AddressBook" to "null". 1551 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.addressb...@1543904466". 1551 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.addressb...@1543904466.id". 1551 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.addressb...@1543904466.primaryemailaddress". 1551 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.EmailAddress" under mode "[META][QUERY]". 1551 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.EmailAddress". 1551 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.EmailAddress". 1551 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 1552 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.EmailAddress" to "null". 1552 db TRACE [main] openjpa.MetaData - Resolving embedded metadata for "openjpatest.emailaddr...@357453361". 1552 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.EmailAddress" to "null". 1552 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.emailaddr...@1206877668". 1552 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.emailaddr...@1206877668.email". 1552 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.emailaddr...@357453361.email". 1552 db TRACE [main] openjpa.MetaData - Preparing mapping for "openjpatest.AddressBook". 1552 db TRACE [main] openjpa.MetaData - Preparing mapping for "openjpatest.EmailAddress". 1553 db TRACE [main] openjpa.MetaData - Resolving mapping for "openjpatest.addressb...@1543904466". 1553 db TRACE [main] openjpa.MetaData - Resolving mapping for "openjpatest.emailaddr...@1206877668". 1553 db TRACE [main] openjpa.Enhance - Enhancing type "class openjpatest.AddressBook" loaded by org.apache.openjpa.lib.util.temporaryclassloa...@38ffd135. 2358 db TRACE [main] openjpa.Enhance - org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation() _inst:sun.instrument.instrumentationi...@31d8d237 _dynamicallyInstall:true 2359 db INFO [main] openjpa.Enhance - Creating subclass and redefining methods for "[class openjpatest.Group, class openjpatest.Organization]". This means that your application will be less efficient than it would if you ran the OpenJPA enhancer. 2364 db TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance. 2364 db TRACE [main] openjpa.MetaData - Using metadata factory "org.apache.openjpa.persistence.jdbc.persistencemappingfact...@109b2a51". 2364 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.Group" under mode "[META]". 2364 db TRACE [main] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types. 2364 db TRACE [main] openjpa.MetaData - The persistent unit root url is "null" 2364 db TRACE [main] openjpa.MetaData - parsePersistentTypeNames() found [openjpatest.Group, openjpatest.Organization, openjpatest.AddressBook]. 2365 db TRACE [main] openjpa.MetaData - Found 3 classes with metadata in 0 milliseconds. 2394 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.Group". 2394 db TRACE [main] openjpa.MetaData - Parsing package "openjpatest.Group". 2405 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.Group". 2405 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 2418 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.Group" to "null". 2419 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.gr...@778653458". 2419 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.id". 2419 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.name". 2419 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.organization". 2419 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.Organization" under mode "[META]". 2419 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.Organization". 2420 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.Organization". 2420 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 2424 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.Organization" to "null". 2424 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.version". 2424 db TRACE [main] openjpa.MetaData - Resolving metadata for "openjpatest.organizat...@1546386943". 2424 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@1546386943.addressbook". 2424 db TRACE [main] openjpa.MetaData - Loading metadata for "class openjpatest.AddressBook" under mode "[META]". 2424 db TRACE [main] openjpa.MetaData - Parsing class "openjpatest.AddressBook". 2425 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.AddressBook". 2427 db TRACE [main] openjpa.MetaData - Generating default metadata for type "openjpatest.EmailAddress". 2427 db TRACE [main] openjpa.MetaData - Using reflection for metadata generation. 2427 db TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "openjpatest.AddressBook" to "null". 2427 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.organizat...@1546386943.hostnames". 2427 db TRACE [main] openjpa.MetaData - Resolving embedded metadata for "java.lang.obj...@1691493474". 2428 db TRACE [main] openjpa.MetaData - Preparing mapping for "openjpatest.Group". 2432 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.id". 2437 db TRACE [main] openjpa.MetaData - "id" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy". 2439 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.name". 2439 db TRACE [main] openjpa.MetaData - "name" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy". 2440 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.version". 2440 db TRACE [main] openjpa.MetaData - "version" has mapping strategy "none". 2444 db TRACE [main] openjpa.MetaData - "openjpatest.Group<discriminator>" has mapping strategy "value-map". 2446 db TRACE [main] openjpa.MetaData - "openjpatest.Group<version>" has mapping strategy "version-number". 2446 db TRACE [main] openjpa.MetaData - Resolving mapping for "openjpatest.gr...@778653458". 2447 db TRACE [main] openjpa.MetaData - "openjpatest.Group" has mapping strategy "full". 2447 db TRACE [main] openjpa.MetaData - Resolving field "openjpatest.gr...@778653458.organization". Exception in thread "main" <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.persistence.ArgumentException: Errors encountered while resolving metadata. See nested exceptions for details. at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:655) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:222) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:315) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:999559M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class java.lang.Object". The class is not enhanced. at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:390) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1822) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:435) at org.apache.openjpa.jdbc.meta.ValueMappingImpl.resolve(ValueMappingImpl.java:494) at org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1732) at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:458) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1853) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1787) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:809) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) ... 14 more NestedThrowables: <openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.persistence.ArgumentException: Unable to resolve type "openjpatest.AddressBook" due to previous errors resolving related type "openjpatest.Organization". at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:822) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:706) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:630) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:222) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:315) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) java.lang.NullPointerException at org.apache.openjpa.jdbc.meta.MappingInfo.mergeJoinColumn(MappingInfo.java:1513) at org.apache.openjpa.jdbc.meta.MappingInfo.createJoins(MappingInfo.java:1322) at org.apache.openjpa.jdbc.meta.MappingInfo.createForeignKey(MappingInfo.java:1084) at org.apache.openjpa.jdbc.meta.ValueMappingInfo.getTypeJoin(ValueMappingInfo.java:115) at org.apache.openjpa.jdbc.meta.ValueMappingInfo.getTypeJoin(ValueMappingInfo.java:92) at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.map(RelationFieldStrategy.java:167) at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:146) at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:82) at org.apache.openjpa.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:496) at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:461) at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:854) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1792) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:809) at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:764) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:644) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:398) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:371) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:254) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:222) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:315) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:239) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:213) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at openjpatest.Main.main(Main.java:17) > NPE in MappingInfo.java line 1514 > --------------------------------- > > Key: OPENJPA-1804 > URL: https://issues.apache.org/jira/browse/OPENJPA-1804 > Project: OpenJPA > Issue Type: Bug > Components: Enhance, UnenhancedClasses, usability > Affects Versions: 2.0.1 > Reporter: Willis Blackburn > Assignee: Donald Woods > Fix For: 2.1.0 > > Attachments: openjpatest.tar.gz > > > I am encountering a NPE at MappingInfo.java line 1514. I'm sorry I don't > have time to prepare a test case right now. I'm not even 100% sure what is > causing the problem, but it seems to be something like this: > I have classes Organization, Group, User, and AddressBook. > Group has a reference (many-to-one) to Organization. > I'm using field-level access and the Java 6 runtime enhancer. (NOT the > build-time enhancer or the agent.) > In ManagedClassSubclasser.prepareUnenhancedClasses, the code receives a list > of Class objects--the ones in persistence.xml. They are not in the same > order as they are in persistence.xml, but I don't know if that's important. > The first one is Group. During the processing of Group, the code invokes > ClassMapping.setTable to set the table name, which is "group_table." This > comes from the @Table annotation of Group. So far, so good. Then the code > does some additional processing on the relationship mappings of Group, which > include the reference to Organization. During the processing of that > relationship, the code calls MappingInfo.mergeJoinColumn. On line 1367, the > method calls rel.getTable. The "rel" variable points to the ClassMapping for > Organization. Remember that prepareUnenhancedClasses hasn't gotten to > Organization yet--it's still working on Group--and so I assume that this > Organization mapping was created on-demand. However, rel.getTable returns > null. The Organization class has a @Table attribute, and I can see that the > table name has been loaded in the ClassMappingInfo instance attached to the > ClassMapping for Organization, however the table name has not yet been copied > from ClassMappingInfo to ClassMapping. Later, the mergeJoinColumn method > attempts to dereference the null table name and generates the NPE. > Bottom line: When using the Java 6, runtime enhancer, if class A has a > reference to class B, and both classes have @Table annotations (at least), > and class A is processed first, then it produces a NPE. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.