openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Prud'hommeaux (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (OPENJPA-40) Testing OpenJPA and Spring integration fails
Date Thu, 07 Sep 2006 16:59:23 GMT
     [ http://issues.apache.org/jira/browse/OPENJPA-40?page=all ]

Marc Prud'hommeaux reopened OPENJPA-40:
---------------------------------------

             
Re-opening.

For the record, the exception I am seeing is:

945  WARN   [main] openjpa.Enhance - An exception was thrown while attempting to perform class
file transformation on "springdeveloper/domain/Manager":
java.lang.ClassCircularityError: springdeveloper/domain/Manager
  at java.lang.Class.getDeclaredFields0(Native Method)
  at java.lang.Class.privateGetDeclaredFields(Class.java:2232)
  at java.lang.Class.getDeclaredFields(Class.java:1715)
  at org.apache.openjpa.meta.AbstractMetaDataDefaults.populateFromReflection(AbstractMetaDataDefaults.java:178)
  at org.apache.openjpa.meta.AbstractMetaDataDefaults.populate(AbstractMetaDataDefaults.java:128)
  at org.apache.openjpa.persistence.PersistenceMetaDataDefaults.populate(PersistenceMetaDataDefaults.java:182)
  at org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:736)
  at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass(XMLPersistenceMetaDataParser.java:720)
  at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:101)
  at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:427)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:708)
  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
  at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
  at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:371)
  at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:312)
  at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:289)
  at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:263)
  at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:237)
  at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:188)
  at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:432)
  at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:287)
  at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:164)
  at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:115)
  at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:132)
  at org.springframework.orm.jpa.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
  at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:102)
  at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:83)
  at org.springframework.instrument.classloading.SimpleInstrumentableClassLoader.transformIfNecessary(SimpleInstrumentableClassLoader.java:56)
  at org.springframework.instrument.classloading.AbstractOverridingClassLoader.loadClass(AbstractOverridingClassLoader.java:95)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:242)
  at org.apache.openjpa.meta.MetaDataRepository.classForName(MetaDataRepository.java:1156)
  at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes(MetaDataRepository.java:1144)
  at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:218)
  at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:175)
  at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:139)
  at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:171)
  at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:124)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntityManagerFactoryInvocationHandler.invoke(AbstractEntityManagerFactoryBean.java:354)
  at $Proxy0.createEntityManager(Unknown Source)
  at springdeveloper.TestApp.run(TestApp.java:60)
  at springdeveloper.TestApp.main(TestApp.java:31)


> Testing OpenJPA and Spring integration fails
> --------------------------------------------
>
>                 Key: OPENJPA-40
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-40
>             Project: OpenJPA
>          Issue Type: Test
>         Environment:      [java] os.name: Mac OS X
>      [java] os.version: 10.4.7
>      [java] os.arch: ppc
>      [java] java.version: 1.5.0_06
>      [java] java.vendor: Apple Computer, Inc.
> OpenJPA built from SVN (revision 440460)
>            Reporter: Thomas Risberg
>         Assigned To: Marc Prud'hommeaux
>         Attachments: testOpenJpa.zip
>
>
> I have attached a test case including jar files and a build script.  src/repository-config.xml
contains the Spring configuration and switching to the TopLink vendor adapter does not show
any issues - the test runs fine.  Using the current OpenJPA vendor adapter (Spring sandbox
source is included in src directory) causes this failure:
> First the version info:
> samoa:~/Projects/testOpenJpa trisberg$ ant openjpa-version
> Buildfile: build.xml
> openjpa-version:
>      [java] OpenJPA 0.9.0-incubating-SNAPSHOT
>      [java] version id: 0.9.0-incubating-SNAPSHOT-r0
>      [java] revision: 0
>      [java] os.name: Mac OS X
>      [java] os.version: 10.4.7
>      [java] os.arch: ppc
>      [java] java.version: 1.5.0_06
>      [java] java.vendor: Apple Computer, Inc.
>      [java] java.class.path:
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/commons-collections-3.2.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/commons-lang-2.1.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/commons-logging-1.0.4.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/commons-pool-1.3.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/hsqldb.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-jdbc-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-jdbc-5-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-kernel-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-kernel-5-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-lib-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-persistence-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-persistence-jdbc-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/openjpa-xmlstore-0.9.0-incubating-SNAPSHOT.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/persistence-api-1.0.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/serp-1.11.0.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/spring-jpa.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/spring-sandbox.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/spring.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/lib/toplink-essentials.jar
>      [java]     /Users/trisberg/Projects/testOpenJpa/classes
>      [java]     /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar
>      [java] user.dir: /Users/trisberg/Projects/testOpenJpa
> BUILD SUCCESSFUL
> Total time: 3 seconds
> And now the runtime error:
> samoa:~/Projects/testOpenJpa trisberg$ ant run-test
> Buildfile: build.xml
> run-test:
>      [java] TestApp!
>      [java] Sep 6, 2006 1:11:02 PM org.springframework.core.CollectionFactory <clinit>
>      [java] INFO: JDK 1.4+ collections available
>      [java] Sep 6, 2006 1:11:02 PM org.springframework.core.CollectionFactory <clinit>
>      [java] INFO: Commons Collections 3.x available
>      [java] Sep 6, 2006 1:11:02 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
>      [java] INFO: Loading XML bean definitions from class path resource [repository-config.xml]
>      [java] Sep 6, 2006 1:11:03 PM org.springframework.context.support.AbstractRefreshableApplicationContext
refreshBeanFactory
>      [java] INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=85537]:
org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [entityManagerFactory,transactionManager,transactionTemplate,dataSource];
root of BeanFactory hierarchy
>      [java] Sep 6, 2006 1:11:03 PM org.springframework.context.support.AbstractApplicationContext
refresh
>      [java] INFO: 4 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=85537]
>      [java] Sep 6, 2006 1:11:03 PM org.springframework.context.support.AbstractApplicationContext
initMessageSource
>      [java] INFO: Unable to locate MessageSource with name 'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@87e9bf]
>      [java] Sep 6, 2006 1:11:03 PM org.springframework.context.support.AbstractApplicationContext
initApplicationEventMulticaster
>      [java] INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster':
using default [org.springframework.context.event.SimpleApplicationEventMulticaster@ad97f5]
>      [java] Sep 6, 2006 1:11:03 PM org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
>      [java] INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [entityManagerFactory,transactionManager,transactionTemplate,dataSource]; root
of BeanFactory hierarchy]
>      [java] Sep 6, 2006 1:11:04 PM org.springframework.jdbc.datasource.DriverManagerDataSource
setDriverClassName
>      [java] INFO: Loaded JDBC driver: org.hsqldb.jdbcDriver
>      [java] Sep 6, 2006 1:11:04 PM org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
createNativeEntityManagerFactory
>      [java] INFO: Allowing redeployment of EntityManagerFactory with name 'main' 
>      [java] Sep 6, 2006 1:11:05 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
>      [java] INFO: Destroying singletons in {org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans [entityManagerFactory,transactionManager,transactionTemplate,dataSource]; root
of BeanFactory hierarchy}
>      [java] Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in class path resource [repository-config.xml]:
Invocation of init method failed; nested exception is <4|true|0.9.0-incubating-SNAPSHOT>
org.apache.openjpa.persistence.ArgumentException: Could not invoke the static newInstance
method on the named factory class "class org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
>      [java] Caused by: <4|true|0.9.0-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException:
Could not invoke the static newInstance method on the named factory class "class org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory".
>      [java]     at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:71)
>      [java]     at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:84)
>      [java]     at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:262)
>      [java]     at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:227)
>      [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:957)
>      [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:924)
>      [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:415)
>      [java]     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:242)
>      [java]     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
>      [java]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:239)
>      [java]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:155)
>      [java]     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:297)
>      [java]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
>      [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
>      [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
>      [java]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
>      [java]     at springdeveloper.TestApp.run(TestApp.java:57)
>      [java]     at springdeveloper.TestApp.main(TestApp.java:31)
>      [java] Caused by: java.lang.NoSuchMethodException: org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newInstance(org.apache.openjpa.lib.conf.ConfigurationProvider)
>      [java]     at java.lang.Class.getMethod(Class.java:1581)
>      [java]     at org.apache.openjpa.kernel.Bootstrap.newBrokerFactory(Bootstrap.java:62)
>      [java]     ... 17 more
> BUILD FAILED
> /Users/trisberg/Projects/testOpenJpa/build.xml:37: Java returned: 1
> Total time: 7 seconds

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