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] Commented: (OPENJPA-41) transforming classes doesn't work
Date Thu, 28 Sep 2006 23:49:51 GMT
    [ http://issues.apache.org/jira/browse/OPENJPA-41?page=comments#action_12438591 ] 
            
Marc Prud'hommeaux commented on OPENJPA-41:
-------------------------------------------

The problem seems to be coming from reentrant re-use of the same XMLMetaDataParser, which
winds up calling reset() on the parser in the reentrant call, which messes it up when its
continued use is attempted from the parent call. While this could be worked around by just
using a new XMLMetaDataParser, the problem runs deeper: why is the reentrancy happening at
all? Specifically, it looks like there is a reentrant construction of a PCEnhancer(), which
probably shouldn't be happening.


        at org.apache.openjpa.lib.meta.XMLMetaDataParser.reset(XMLMetaDataParser.java:538)
        at org.apache.openjpa.lib.meta.CFMetaDataParser.reset(CFMetaDataParser.java:253)
        at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.reset(XMLPersistenceMetaDataParser.java:409)
        at org.apache.openjpa.persistence.jdbc.XMLPersistenceMappingParser.reset(XMLPersistenceMappingParser.java:116)
        at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:378)
        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:239)
        at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:190)
        at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:428)
        at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
        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:127)
        at org.springframework.orm.jpa.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
        at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:84)
        at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:77)
        at org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader.findResourceInternal(TomcatInstrumentableClassLoader.java:66)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at serp.util.Strings.toClass(Strings.java:209)
        at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:303)
        at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:282)
        at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForName(XMLPersistenceMetaDataParser.java:1638)
        at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass(XMLPersistenceMetaDataParser.java:702)
        at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:103)
        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:239)
        at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:190)
        at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:428)
        at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
        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:127)
        at org.springframework.orm.jpa.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
        at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:84)
        at org.springframework.instrument.classloading.WeavingTransformer.transformIfNecessary(WeavingTransformer.java:77)
        at org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader.findResourceInternal(TomcatInstrumentableClassLoader.java:66)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
        at java.lang.Class.getDeclaredMethods(Class.java:1763)
        at java.beans.Introspector$1.run(Introspector.java:1265)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
        at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
        at java.beans.Introspector.getBeanInfo(Introspector.java:387)
        at java.beans.Introspector.getBeanInfo(Introspector.java:159)
        at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:142)
        at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:83)
        at org.springframework.beans.BeanWrapperImpl.setIntrospectionClass(BeanWrapperImpl.java:239)
        at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:197)
        at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:180)
        at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:133)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:535)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:242)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:239)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:155)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:300)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)


> transforming classes doesn't work
> ---------------------------------
>
>                 Key: OPENJPA-41
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-41
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>         Environment: WinXP, Tomcat 5.5.17, Spring 2.0-RC4
>            Reporter: Costin Leau
>         Assigned To: Marc Prud'hommeaux
>         Attachments: petclinic.zip, spring-tomcat-weaver.jar, stacktrace.txt
>
>
> I've tried several versions of OpenJPA including the most recent one(svn 4409856) to
run Spring's Petclinic with class level LoadTimeWeaver on OpenJPA.
> I have attached the stacktrace that I get. The same example works fine with Toplink.
> I have attached petclinic w/o some of the libs to gain space; basically add the OpenJPA
libs and deploy the war into Tomcat. Note that you'll also have to place spring-tomcat-weaver.jar
under Tomcat's server/lib (this should be enough - if you have problems let me know or take
a look at the Spring reference documentation).
> When the webapp starts, the exception pops up.

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