db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JDO-327) JPOX fails to create new instance of PC class via pm.newInstance(PCInterface)
Date Mon, 01 May 2006 15:31:47 GMT
     [ http://issues.apache.org/jira/browse/JDO-327?page=all ]
     
Craig Russell resolved JDO-327:
-------------------------------

    Resolution: Fixed

With the latest JPOX HEAD this issue is resolved.


> JPOX fails to create new instance of PC class via pm.newInstance(PCInterface)
> -----------------------------------------------------------------------------
>
>          Key: JDO-327
>          URL: http://issues.apache.org/jira/browse/JDO-327
>      Project: JDO
>         Type: Bug

>   Components: tck20
>     Versions: JDO 2 rc1
>     Reporter: Craig Russell
>     Assignee: Erik Bengtson
>      Fix For: JDO 2 final
>  Attachments: jpox-1.1.0.jar, jpox-enhancer-1.1.0.jar
>
> This is a new test for persistent interfaces. JPOX fails while obtaining metadata for
the persistent interface IAddress.
> IAddress newAddress() {
>     return (IAddress)pm.newInstance(IAddress.class);
> }
> maven -o -Djdo.tck.cfglist=companyPMInterface.conf runtck.jdori
>     [java] RUN CompletenessTest.test       ERROR
>     [java] Description: Completeness test with standard mapping, basic testdata with
all relationships and embedded objects.
>     [java] Time: 009
>     [java] There was 1 error:
>     [java] 1) test(org.apache.jdo.tck.mapping.CompletenessTest)org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'root' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Can't resolve reference to bean 'company1' while setting property 'constructor argument with
index 0[0]'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'company1' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Can't resolve reference to bean 'addr1' while setting property 'constructor argument with
index 3'; nested exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'addr1' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public org.apache.jdo.tck.pc.company.IAddress org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)]
threw exception; nested exception is javax.jdo.JDOException: Cannot read the JDO Meta-Data
file "<input stream> java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData"
>     [java] org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'company1' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Can't resolve reference to bean 'addr1' while setting property 'constructor argument with
index 3'; nested exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'addr1' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public org.apache.jdo.tck.pc.company.IAddress org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)]
threw exception; nested exception is javax.jdo.JDOException: Cannot read the JDO Meta-Data
file "<input stream> java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData"
>     [java] org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'addr1' defined in class path resource [org/apache/jdo/tck/pc/company/companyAllRelationships.xml]:
Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
Factory method [public org.apache.jdo.tck.pc.company.IAddress org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)]
threw exception; nested exception is javax.jdo.JDOException: Cannot read the JDO Meta-Data
file "<input stream> java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData"
>     [java] org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
[public org.apache.jdo.tck.pc.company.IAddress org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)]
threw exception; nested exception is javax.jdo.JDOException: Cannot read the JDO Meta-Data
file "<input stream> java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData"
>     [java] javax.jdo.JDOException: Cannot read the JDO Meta-Data file "<input stream>
java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData"
>     [java]      at org.jpox.metadata.MetaDataParser.parseMetaDataStream(MetaDataParser.java:174)
>     [java]      at org.jpox.metadata.MetaDataParser.parseMetaData(MetaDataParser.java:107)
>     [java]      at org.jpox.metadata.MetaDataManager.parseFile(MetaDataManager.java:1131)
>     [java]      at org.jpox.metadata.MetaDataManager.loadMetaDataForClass(MetaDataManager.java:1319)
>     [java]      at org.jpox.metadata.MetaDataManager.addORMDataToClass(MetaDataManager.java:644)
>     [java]      at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:429)
>     [java]      at org.jpox.metadata.MetaDataManager.populateClassesInFile(MetaDataManager.java:1211)
>     [java]      at org.jpox.metadata.MetaDataManager.loadMetaDataForClass(MetaDataManager.java:1325)
>     [java]      at org.jpox.metadata.MetaDataManager.getMetaDataForClassOrInterface(MetaDataManager.java:503)
>     [java]      at org.jpox.metadata.MetaDataManager.getMetaDataForInterface(MetaDataManager.java:392)
>     [java]      at org.jpox.AbstractPersistenceManager.newInstance(AbstractPersistenceManager.java:2250)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyFactoryPMInterface.newAddress(CompanyFactoryPMInterface.java:38)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(CompanyFactoryAbstractImpl.java:46)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     [java]      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:102)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:573)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:705)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:486)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:193)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:705)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyModelReader.getRootList(CompanyModelReader.java:101)
>     [java]      at org.apache.jdo.tck.mapping.CompletenessTest.localSetUp(CompletenessTest.java:95)
>     [java]      at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
>     [java] NestedThrowablesStackTrace:
>     [java] java.lang.ClassCastException: org.jpox.metadata.EmbeddedMetaData
>     [java]      at org.jpox.metadata.MetaDataParser.startElement(MetaDataParser.java:466)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:220)
>     [java]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
>     [java]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>     [java]      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>     [java]      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>     [java]      at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>     [java]      at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
>     [java]      at org.jpox.metadata.MetaDataParser.parseMetaDataStream(MetaDataParser.java:162)
>     [java]      at org.jpox.metadata.MetaDataParser.parseMetaData(MetaDataParser.java:107)
>     [java]      at org.jpox.metadata.MetaDataManager.parseFile(MetaDataManager.java:1131)
>     [java]      at org.jpox.metadata.MetaDataManager.loadMetaDataForClass(MetaDataManager.java:1319)
>     [java]      at org.jpox.metadata.MetaDataManager.addORMDataToClass(MetaDataManager.java:644)
>     [java]      at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:429)
>     [java]      at org.jpox.metadata.MetaDataManager.populateClassesInFile(MetaDataManager.java:1211)
>     [java]      at org.jpox.metadata.MetaDataManager.loadMetaDataForClass(MetaDataManager.java:1325)
>     [java]      at org.jpox.metadata.MetaDataManager.getMetaDataForClassOrInterface(MetaDataManager.java:503)
>     [java]      at org.jpox.metadata.MetaDataManager.getMetaDataForInterface(MetaDataManager.java:392)
>     [java]      at org.jpox.AbstractPersistenceManager.newInstance(AbstractPersistenceManager.java:2250)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyFactoryPMInterface.newAddress(CompanyFactoryPMInterface.java:38)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyFactoryAbstractImpl.newAddress(CompanyFactoryAbstractImpl.java:46)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     [java]      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:102)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:573)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:705)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:486)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:193)
>     [java]      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:705)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)
>     [java]      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
>     [java]      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
>     [java]      at org.apache.jdo.tck.pc.company.CompanyModelReader.getRootList(CompanyModelReader.java:101)
>     [java]      at org.apache.jdo.tck.mapping.CompletenessTest.localSetUp(CompletenessTest.java:95)
>     [java]      at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:187)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:120)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:95)
>     [java] FAILURES!!!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message