openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aabbcc (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2129) Getting WARN messages [main] openjpa.MetaData - Found duplicate metadata or mapping for "class xxx.xxx". Ignoring.
Date Tue, 14 Feb 2012 16:20:00 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207805#comment-13207805
] 

aabbcc commented on OPENJPA-2129:
---------------------------------

I have removed the peoperty "RuntimeUnenhancedClasses " from persistence.xml now

I have creates different spring bean definitions files...XXX below refers to two different
file. You may call one as ABC and other XYZ

INFO: Loading XML bean definitions from class path resource [XXX.xml] 
INFO: Loading XML bean definitions from class path resource [META-INF/spring/XXX.xml] 

Now persistence.xml contain entries of ORM mapping files and jpql xml file.

I am not using annotations, just specifies all configuration in orm.xml files. When I run
maven command "mvn -X -e package" on command line I am getting following error.

On Line 6 there is entry of class name with full package name.

Failed to execute goal org.codehaus.mojo:openjpa-maven-plugin:1.1:enhance (enhancer) on project
cmrs-ecrd-ds: Execution enhancer of goal org.codehaus.mojo:openjpa-maven-plugin:1.1:enhance
failed: org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml [Location:
Line: 6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:openjpa-maven-plugin:1.1:enhance
(enhancer) on project ABCD: Execution enhancer of goal org.codehaus.mojo:openjpa-maven-plugin:1.1:enhance
failed: org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml [Location:
Line: 6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	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:597)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution enhancer of goal org.codehaus.mojo:openjpa-maven-plugin:1.1:enhance
failed: org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml  [Location:
Line: 6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal general error> org.apache.openjpa.util.GeneralException:
org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml  [Location: Line:
6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated.
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:295)
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:228)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:580)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:400)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:384)
	at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:283)
	at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4675)
	at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4622)
	at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4592)
	at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:741)
	at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:731)
	at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4587)
	at org.codehaus.mojo.openjpa.AbstractOpenJpaEnhancerMojo.enhance(AbstractOpenJpaEnhancerMojo.java:136)
	at org.codehaus.mojo.openjpa.AbstractOpenJpaEnhancerMojo.execute(AbstractOpenJpaEnhancerMojo.java:95)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	... 20 more
Caused by: java.io.IOException: org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml
 [Location: Line: 6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated.
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:396)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:334)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:311)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:284)
	at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.parse(XMLPersistenceMetaDataParser.java:365)
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:293)
	... 34 more
Caused by: org.xml.sax.SAXException: file:/Y:/workspaces/********/META-INF/orm/orm.xml  [Location:
Line: 6, C: 79]: Type "xxx.xxx.Dummyclassname" could not be instantiated.
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException(XMLMetaDataParser.java:675)
	at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName(CFMetaDataParser.java:288)
	at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForName(XMLPersistenceMetaDataParser.java:2025)
	at org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass(XMLPersistenceMetaDataParser.java:851)
	at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement(CFMetaDataParser.java:108)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement(XMLMetaDataParser.java:449)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:688)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:393)
	... 39 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
 

                
> Getting WARN messages [main] openjpa.MetaData - Found duplicate metadata or mapping for
"class xxx.xxx".  Ignoring.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2129
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2129
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.1.1
>            Reporter: aabbcc
>
> I am trying to execute Junit test for ORM mapping using OPENJPA2.1.1
> Getting below Duplicate OpenJPA meta data warning     
> [main] openjpa.MetaData - Found duplicate metadata or mapping for "class xxx.xxx".  Ignoring.
> It is not able to execute actual code. There are no two mapping files with same content.
It seems OpenJPA parsing the same orm.xml location twice.
> It seems there is a bug. Please look into this issue and fix it or suggest alternative
solution as soon as possible.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message