openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Souza (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-468) PCEnhancer does not find meta data for entities using pure XML annotation
Date Sun, 16 Dec 2007 19:45:43 GMT
PCEnhancer does not find meta data for entities using pure XML annotation
-------------------------------------------------------------------------

                 Key: OPENJPA-468
                 URL: https://issues.apache.org/jira/browse/OPENJPA-468
             Project: OpenJPA
          Issue Type: Bug
         Environment: Windows
            Reporter: Sebastian Souza
             Fix For: 1.1.0


 I had well defined my classes in the orm.xml but the enhancer at build time cant find them
in the metadata

this is part of the trace :
Finding class itsm.framework.persistence.entities.PersistentObject
Class itsm.framework.persistence.entities.PersistentObject loaded from parent loader
    [openjpac] 406  ITSM  TRACE  [Worker-10] openjpa.Tool - Enhancer running on type "class
itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 671  ITSM  TRACE  [Worker-10] openjpa.MetaData - Loading metadata for "class
itsm.framework.persistence.entities.PersistentObject" under mode "[META][QUERY]".
    [openjpac] 671  ITSM  TRACE  [Worker-10] openjpa.MetaData - Scanning resource "META-INF/orm.xml"
for persistent types.
    [openjpac] 687  ITSM  TRACE  [Worker-10] openjpa.MetaData - parsePersistentTypeNames()
found [].
    [openjpac] 687  ITSM  TRACE  [Worker-10] openjpa.MetaData - Found 0 classes with metadata
in 16 milliseconds.
    [openjpac] 780  ITSM  TRACE  [Worker-10] openjpa.MetaData - Parsing class "itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 796  ITSM  TRACE  [Worker-10] openjpa.MetaData - Parsing package "itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 796  ITSM  TRACE  [Worker-10] openjpa.Enhance - Enhancing type "class itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 811  ITSM  WARN   [Worker-10] openjpa.Enhance - Type "class itsm.framework.persistence.entities.PersistentObject"
has no metadata; enhancing as persistence aware. If you intended for "class itsm.framework.persistence.entities.PersistentObject"
to be persistence-capable, then this means that OpenJPA could not find any metadata for "class
itsm.framework.persistence.entities.PersistentObject". This can happen if the directory containing
your metadata is not in your CLASSPATH, or if your metadata files are not named properly.
See the documentation on metadata placement for more information.
    [openjpac] 811  ITSM  TRACE  [Worker-10] openjpa.Tool - The class does not have metadata
- enhanced as persistence-aware.
    [openjpac] java.io.FileNotFoundException: file:C:\Users\Seba\workspace\Persistence\persistence_entities.jar!\itsm\framework\persistence\entities\PersistentObject.class
(The filename, directory name, or volume label syntax is incorrect)

this is my build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="Persistence">
        <target name="enhance">
          <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/>
          <openjpac addDefaultConstructor="false" tmpClassLoader="false">
          <config propertiesFile="./src/META-INF/persistence.xml"/>
          <fileset dir=".">
            <include name="**/entities/*.java"/>
          <exclude name="**/QueryObject.java"/>
          <exclude name="**/Parameter.java"/>
          <exclude name="**/PersistentContext.java"/>
            </fileset>
          </openjpac>
        </target>
</project>


Complete trace:

enhance:
Adding reference: eclipse.progress.monitor
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml.
It could not be found.
Class org.apache.openjpa.ant.PCEnhancerTask loaded from parent loader (parentFirst)
 +Datatype openjpac org.apache.openjpa.ant.PCEnhancerTask
Adding reference: eclipse.progress.monitor
    [openjpac] 16  ITSM  TRACE  [Worker-10] openjpa.Runtime - Setting the following properties
from "file:/C:/Users/Seba/workspace/Persistence/src/META-INF/persistence.xml" into configuration:
{openjpa.ConnectionPassword=12345, openjpa.ConnectionDriverName=org.postgresql.Driver, javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl,
openjpa.jdbc.SchemaFactory=native(ForeignKeys=true), openjpa.Log=DefaultLevel=TRACE, SQL=TRACE,
openjpa.ConnectionUserName=postgres, openjpa.ConnectionURL=jdbc:postgresql:itsm, openjpa.Id=ITSM}
fileset: Setup scanner in dir C:\Users\Seba\workspace\Persistence with patternSet{ includes:
[**/entities/*.java] excludes: [**/QueryObject.java, **/Parameter.java, **/PersistentContext.java]
}

Finding class itsm.framework.persistence.entities.PersistentObject
Class itsm.framework.persistence.entities.PersistentObject loaded from parent loader
    [openjpac] 406  ITSM  TRACE  [Worker-10] openjpa.Tool - Enhancer running on type "class
itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 671  ITSM  TRACE  [Worker-10] openjpa.MetaData - Loading metadata for "class
itsm.framework.persistence.entities.PersistentObject" under mode "[META][QUERY]".
    [openjpac] 671  ITSM  TRACE  [Worker-10] openjpa.MetaData - Scanning resource "META-INF/orm.xml"
for persistent types.
    [openjpac] 687  ITSM  TRACE  [Worker-10] openjpa.MetaData - parsePersistentTypeNames()
found [].
    [openjpac] 687  ITSM  TRACE  [Worker-10] openjpa.MetaData - Found 0 classes with metadata
in 16 milliseconds.
    [openjpac] 780  ITSM  TRACE  [Worker-10] openjpa.MetaData - Parsing class "itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 796  ITSM  TRACE  [Worker-10] openjpa.MetaData - Parsing package "itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 796  ITSM  TRACE  [Worker-10] openjpa.Enhance - Enhancing type "class itsm.framework.persistence.entities.PersistentObject".
    [openjpac] 811  ITSM  WARN   [Worker-10] openjpa.Enhance - Type "class itsm.framework.persistence.entities.PersistentObject"
has no metadata; enhancing as persistence aware. If you intended for "class itsm.framework.persistence.entities.PersistentObject"
to be persistence-capable, then this means that OpenJPA could not find any metadata for "class
itsm.framework.persistence.entities.PersistentObject". This can happen if the directory containing
your metadata is not in your CLASSPATH, or if your metadata files are not named properly.
See the documentation on metadata placement for more information.
    [openjpac] 811  ITSM  TRACE  [Worker-10] openjpa.Tool - The class does not have metadata
- enhanced as persistence-aware.
    [openjpac] java.io.FileNotFoundException: file:C:\Users\Seba\workspace\Persistence\persistence_entities.jar!\itsm\framework\persistence\entities\PersistentObject.class
(The filename, directory name, or volume label syntax is incorrect)
    [openjpac] at java.io.FileOutputStream.open(Native Method)
    [openjpac] at java.io.FileOutputStream.<init>(Unknown Source)
    [openjpac] at java.io.FileOutputStream.<init>(Unknown Source)
    [openjpac] at serp.bytecode.BCClass.write(BCClass.java:179)
    [openjpac] at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:526)
    [openjpac] at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:512)
    [openjpac] at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4352)
    [openjpac] at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)
    [openjpac] at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)
    [openjpac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [openjpac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [openjpac] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [openjpac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [openjpac] at java.lang.reflect.Method.invoke(Unknown Source)
    [openjpac] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [openjpac] at org.apache.tools.ant.Task.perform(Task.java:348)
    [openjpac] at org.apache.tools.ant.Target.execute(Target.java:357)
    [openjpac] at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [openjpac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [openjpac] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    [openjpac] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [openjpac] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    [openjpac] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [openjpac] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
    [openjpac] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
    [openjpac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [openjpac] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [openjpac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [openjpac] at java.lang.reflect.Method.invoke(Unknown Source)
    [openjpac] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
    [openjpac] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM(AntLaunchDelegate.java:249)
    [openjpac] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:211)
    [openjpac] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
    [openjpac] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
    [openjpac] at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:601)
    [openjpac] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:179)
    [openjpac] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:167)
    [openjpac] at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:86)
    [openjpac] at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
    [openjpac] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    [openjpac] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
    [openjpac] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
    [openjpac] at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246)
    [openjpac] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    [openjpac] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
    [openjpac] at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302)
    [openjpac] at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334)
    [openjpac] at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137)
    [openjpac] at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    [openjpac] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    [openjpac] 843  ITSM  TRACE  [Worker-10] openjpa.MetaData - Clearing metadata repository
"org.apache.openjpa.meta.MetaDataRepository@e26ffd".

BUILD FAILED
C:\Users\Seba\workspace\Persistence\build.xml:5: java.io.FileNotFoundException: file:C:\Users\Seba\workspace\Persistence\persistence_entities.jar!\itsm\framework\persistence\entities\PersistentObject.class
(The filename, directory name, or volume label syntax is incorrect)
        at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:176)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
        at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM(AntLaunchDelegate.java:249)
        at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:211)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:601)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:179)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:167)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:86)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.FileNotFoundException: file:C:\Users\Seba\workspace\Persistence\persistence_entities.jar!\itsm\framework\persistence\entities\PersistentObject.class
(The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at serp.bytecode.BCClass.write(BCClass.java:179)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:526)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:512)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4352)
        at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)
        at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)
        ... 41 more
--- Nested Exception ---
java.io.FileNotFoundException: file:C:\Users\Seba\workspace\Persistence\persistence_entities.jar!\itsm\framework\persistence\entities\PersistentObject.class
(The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at serp.bytecode.BCClass.write(BCClass.java:179)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:526)
        at org.apache.openjpa.enhance.PCEnhancer.record(PCEnhancer.java:512)
        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4352)
        at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)
        at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
        at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
        at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM(AntLaunchDelegate.java:249)
        at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:211)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:601)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:179)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:167)
        at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:86)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Total time: 2 seconds

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message