openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lu, Shengyuan" <shengyuan...@wincor-nixdorf.com>
Subject problem:entity could not be instantiated
Date Mon, 12 Apr 2010 09:11:16 GMT
Hi OpenJPA users,

  I have a strange problem about orm.xml configuration, I think only professional OpenJPA
guys can resolve it!
  I use an orm.xml to register an entity-listeners, which is an entity listener when the entity
is updated. The orm.xml is located in META-INFO beside persistence.xml.
  It works fine in Hibernate JPA implementation, but fails on OpenJPA. The exception seems
the system cannot find the model java and instantiate. The model java file is located on other
jar which has been listed on MANIFEST.MF.

Thanks in advance!
Regards,
Michael Lu

Enviroment:
  Jee Server: websphere 7.0
  OpenJPA version: openjpa-1.2.1-SNAPSHOT-r422266

  The exception:

   com.wn.atmp.common.DataAccessException: Exception occurs in getSingleResult; base cause:
<openjpa-1.2.1-SNAPSHOT-r422266:686069 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
org.xml.sax.SAXException: wsjar:file:/D:/WebSphere7/AppServer/profiles/AppSrv01/installedApps/cnshw206Node01Cell/ATMP.ear/DBAccessor.jar!/META-INF/orm.xml
[Location: Line: 5, C: 64]: Type "com.wn.atmp.db.entity.device.WkstDeviceinfo" could not be
instantiated.

         at com.wn.atmp.db.dao.impl.BaseDAO.getSingleResult(BaseDAO.java:193)

         at com.wn.atmp.db.dao.impl.BaseDAO.getWorkstation(BaseDAO.java:167)

         at com.wn.atmp.db.dao.impl.HierarchyDAO.findWkstById(HierarchyDAO.java:84)

         at com.wn.atmp.test.testBean.sayHello(testBean.java:75)

         at com.wn.atmp.test.EJSRemote0SLtestBean_6e6067fa.sayHello(EJSRemote0SLtestBean_6e6067fa.java)

         at com.wn.atmp.test._EJSRemote0SLtestBean_6e6067fa_Tie.sayHello(_EJSRemote0SLtestBean_6e6067fa_Tie.java)

         at com.wn.atmp.test._EJSRemote0SLtestBean_6e6067fa_Tie._invoke(_EJSRemote0SLtestBean_6e6067fa_Tie.java)

         at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)

         at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)

         at com.ibm.rmi.iiop.ORB.process(ORB.java:504)

         at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)

         at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2771)

         at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2640)

         at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)

         at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)

         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

 Caused by: <openjpa-1.2.1-SNAPSHOT-r422266:686069 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
org.xml.sax.SAXException: wsjar:file:/D:/WebSphere7/AppServer/profiles/AppSrv01/installedApps/cnshw206Node01Cell/ATMP.ear/DBAccessor.jar!/META-INF/orm.xml
[Location: Line: 5, C: 64]: Type "com.wn.atmp.db.entity.device.WkstDeviceinfo" could not be
instantiated.

         at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:249)

         at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:198)

         at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:474)

         at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:294)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:170)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:139)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:225)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:195)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:188)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$600(JPQLExpressionBuilder.java:69)

         at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1756)

         at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:56)

         at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:153)

         at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:658)

         at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:639)

         at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:605)

         at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:667)

         at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1492)

         at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)

         at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:243)

         at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:293)

         at com.wn.atmp.db.dao.impl.BaseDAO.getSingleResult(BaseDAO.java:188)

         ... 15 more

 Caused by: java.io.IOException: org.xml.sax.SAXException: wsjar:file:/D:/WebSphere7/AppServer/profiles/AppSrv01/installedApps/cnshw206Node01Cell/ATMP.ear/DBAccessor.jar!/META-INF/orm.xml
[Location: Line: 5, C: 64]: Type "com.wn.atmp.db.entity.device.WkstDeviceinfo" could not be
instantiated.

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:379)

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:318)

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:295)

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:268)

         at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:247)

         ... 36 more

 Caused by: org.xml.sax.SAXException: wsjar:file:/D:/WebSphere7/AppServer/profiles/AppSrv01/installedApps/cnshw206Node01Cell/ATMP.ear/DBAccessor.jar!/META-INF/orm.xml
[Location: Line: 5, C: 64]: Type "com.wn.atmp.db.entity.device.WkstDeviceinfo" could not be
instantiated.

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:656)

         at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:287)

         at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForName(XMLPersistenceMetaDataParser.java:1679)

         at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass(XMLPersistenceMetaDataParser.java:727)

         at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:108)

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:432)

         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

         at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)

         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)

         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

         at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)

         at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:376)

         ... 40 more




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message