[ https://issues.apache.org/jira/browse/OPENJPA-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12911079#action_12911079 ]
Willis Blackburn commented on OPENJPA-1804: ------------------------------------------- Stack trace: Internal error: Errors encountered while resolving metadata. See nested exceptions for details. <openjpa-2.0.1-r422266:989424 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:642) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:385) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:227) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:195) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:317) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:241) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:215) 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 com.signetworks.signs.util.db.Database$.createEntityManager(Database.scala:75) at com.signetworks.signs.util.db.Database$.withEntityManager(Database.scala:72) at com.signetworks.signs.util.db.Database$.unique(Database.scala:40) at com.signetworks.v3.servlet.V3Servlet.dispatchRequestInSession(V3Servlet.scala:63) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.SynchronizedSessionBinder$class.bindSession(SynchronizedSessionBinder.scala:21) at com.signetworks.v3.servlet.V3Servlet.bindSession(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at scala.Option.getOrElse(Option.scala:59) at com.signetworks.dance.http.RequestDispatcher$class.dispatchRequest(RequestDispatcher.scala:30) at com.signetworks.v3.servlet.V3Servlet.dispatchRequest(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$class.handleRequest(RequestDispatcher.scala:22) at com.signetworks.v3.servlet.V3Servlet.handleRequest(V3Servlet.scala:31) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:47) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:46) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply$mcV$sp(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.bindRequest(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply$mcV$sp(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.service(DanceServlet.scala:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:637) Caused by: <openjpa-2.0.1-r422266:989424 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:377) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358) at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1821) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1786) 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:1852) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1786) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:790) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:693) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:617) ... 68 more NestedThrowables: <openjpa-2.0.1-r422266:989424 fatal user error> org.apache.openjpa.persistence.ArgumentException: Unable to resolve type "com.signetworks.signs.model.addressbook.AddressBook" due to previous errors resolving related type "com.signetworks.signs.model.security.Organization". at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:804) at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:693) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:617) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:385) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:227) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:195) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:317) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:241) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:215) 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 com.signetworks.signs.util.db.Database$.createEntityManager(Database.scala:75) at com.signetworks.signs.util.db.Database$.withEntityManager(Database.scala:72) at com.signetworks.signs.util.db.Database$.unique(Database.scala:40) at com.signetworks.v3.servlet.V3Servlet.dispatchRequestInSession(V3Servlet.scala:63) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.SynchronizedSessionBinder$class.bindSession(SynchronizedSessionBinder.scala:21) at com.signetworks.v3.servlet.V3Servlet.bindSession(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at scala.Option.getOrElse(Option.scala:59) at com.signetworks.dance.http.RequestDispatcher$class.dispatchRequest(RequestDispatcher.scala:30) at com.signetworks.v3.servlet.V3Servlet.dispatchRequest(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$class.handleRequest(RequestDispatcher.scala:22) at com.signetworks.v3.servlet.V3Servlet.handleRequest(V3Servlet.scala:31) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:47) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:46) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply$mcV$sp(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.bindRequest(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply$mcV$sp(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.service(DanceServlet.scala:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:637) java.lang.NullPointerException at org.apache.openjpa.jdbc.meta.MappingInfo.mergeJoinColumn(MappingInfo.java:1514) 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:853) at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1791) at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:790) at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:751) at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:631) at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:385) at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:358) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:227) at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:195) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:134) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:317) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:241) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:215) 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 com.signetworks.signs.util.db.Database$.createEntityManager(Database.scala:75) at com.signetworks.signs.util.db.Database$.withEntityManager(Database.scala:72) at com.signetworks.signs.util.db.Database$.unique(Database.scala:40) at com.signetworks.v3.servlet.V3Servlet.dispatchRequestInSession(V3Servlet.scala:63) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3$$anonfun$apply$1.apply(RequestDispatcher.scala:32) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.http.SynchronizedSessionBinder$$anonfun$bindSession$1.apply(SynchronizedSessionBinder.scala:21) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.SynchronizedSessionBinder$class.bindSession(SynchronizedSessionBinder.scala:21) at com.signetworks.v3.servlet.V3Servlet.bindSession(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at com.signetworks.dance.http.RequestDispatcher$$anonfun$dispatchRequest$3.apply(RequestDispatcher.scala:31) at scala.Option.getOrElse(Option.scala:59) at com.signetworks.dance.http.RequestDispatcher$class.dispatchRequest(RequestDispatcher.scala:30) at com.signetworks.v3.servlet.V3Servlet.dispatchRequest(V3Servlet.scala:31) at com.signetworks.dance.http.RequestDispatcher$class.handleRequest(RequestDispatcher.scala:22) at com.signetworks.v3.servlet.V3Servlet.handleRequest(V3Servlet.scala:31) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:47) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1$$anonfun$apply$mcV$sp$1.apply(DanceServlet.scala:46) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply$mcV$sp(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$bindRequest$1.apply(DanceServlet.scala:63) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.bindRequest(DanceServlet.scala:63) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply$mcV$sp(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.http.DanceServlet$$anonfun$service$1.apply(DanceServlet.scala:45) at com.signetworks.dance.util.ThreadBoundValue.withValue(ThreadBoundValue.scala:38) at com.signetworks.dance.http.DanceServlet.service(DanceServlet.scala:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:637) > NPE in MappingInfo.java line 1514 > --------------------------------- > > Key: OPENJPA-1804 > URL: https://issues.apache.org/jira/browse/OPENJPA-1804 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.0.1 > Reporter: Willis Blackburn > > 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.