openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Kelm (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-294) Exception while enchnancing the java classes using OpenJPA PCEnhancerTask with build.xml
Date Fri, 29 Feb 2008 22:27:51 GMT

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

Matthew Kelm commented on OPENJPA-294:
--------------------------------------

SeYoul, the example you were referring to needs the classpath defined as below:

<project name="enahnceJPA">
<target name="enhance">
  <!-- define the openjpac task; this can be done at the top of the    -->
  <!-- build.xml file, so it will be available for all targets      -->
  <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/>

  <!-- invoke enhancer on all .jdo files below the current directory -->
  <openjpac>
  	<config propertiesFile="./META-INF/persistence.xml"/>
    <fileset dir=".">
    	<include name="**/com/ibm/persistence/ejb3/order/entity/*.java" />
    	<include name="**/com/ibm/persistence/ejb3/order/facade/*.java" />
    </fileset>
  	<classpath>
  		<path location="${basedir}" />
  	</classpath>
  </openjpac>
</target>

</project>

> Exception while enchnancing  the java classes using OpenJPA PCEnhancerTask  with build.xml
> ------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-294
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-294
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 1.0.0
>         Environment: RSA 7.0 + J2ee environment
>            Reporter: chowdareddy somu
>             Fix For: 1.0.0
>
>
> Hi All,
> While building the project I'm using the following script in build.xml to Enhance the
classes using the openJPA enhancer. I am getting exception while building the script "  [openjpac]
java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: entities.TBLFireResourceDO".
> And doing this in RSA 7.0 environment!. looks like build path and everything is correct.
> here is the build.xml
> <project name="enahnceJPA">
> 	<target name="enhance">
> 		<!-- define the openjpac task; this can be done at the top of the    -->
> 		<!-- build.xml file, so it will be available for all targets      -->
> 		<taskdef name="openjpac"  classname="org.apache.openjpa.ant.PCEnhancerTask" />
> 		<openjpac> 
> 			<config propertiesFile="./META-INF/persistence.xml" />
> 			 <classpath refid="enh.classpath" />
> 			<fileset dir=".">
> 				<include name="**/entities/*.java" /> 
> 			</fileset>  
> 		</openjpac>     
> 	</target>    
> </project>   
> Exception Trace.
> Buildfile: C:\workspaces\FPA_Persistance\InheritancePersistance\src\build.xml
>  +Datatype eclipse.convertPath org.eclipse.core.resources.ant.ConvertPath
>  +Datatype eclipse.incrementalBuild org.eclipse.core.resources.ant.IncrementalBuild
>  +Datatype eclipse.refreshLocal org.eclipse.core.resources.ant.RefreshLocalTask
>  +Datatype emf.XSD2Java org.eclipse.xsd.ecore.importer.taskdefs.XSDGeneratorTask
>  +Datatype emf.Ecore2Java org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask
>  +Datatype http://com.ibm.adapter.j2c:batchImport com.ibm.adapter.j2c.command.internal.ant.tasks.BatchImport
>  +Datatype http://com.ibm.adapter.j2c:generateService com.ibm.adapter.j2c.command.internal.ant.tasks.GenerateInterfaceType
>  +Datatype http://com.ibm.adapter.j2c:importResourceAdapter com.ibm.adapter.j2c.command.internal.ant.tasks.ImportResourceAdapter
>  +Datatype http://com.ibm.adapter.j2c:migrate com.ibm.adapter.j2c.command.internal.ant.tasks.ScriptMigration
>  +Datatype com.ibm.xtools.ras.importAsset com.ibm.xtools.ras.impord.ant.task.internal.ImportAsset
>  +Datatype emf.Rose2Java org.eclipse.emf.importer.rose.taskdefs.RoseGeneratorTask
>  +Datatype ejbDeploy com.ibm.etools.ejb.ant.EJBDeploy
>  +Datatype accessBeanRegeneration com.ibm.etools.accessbean.ant.AccessBeanRegeneration
>  +Datatype autoAppInstall com.ibm.etools.wrd.ant.WRDAutoAppInstall
>  +Datatype com.ibm.xtools.publish.CLModelPublish com.ibm.xtools.publish.uml2.internal.ant.task.CLModelPublish
>  +Datatype com.ibm.xtools.publish.CLReportPublish com.ibm.xtools.publish.uml2.internal.ant.task.CLReportPublish
>  +Datatype com.ibm.xtools.ras.exportManifest com.ibm.xtools.ras.export.ant.task.internal.ExportManifest
>  +Datatype com.ibm.xtools.ras.updateManifest com.ibm.xtools.ras.export.ant.task.internal.UpdateManifest
>  +Datatype http://com.ibm.adapter:discover com.ibm.adapter.command.internal.ant.tasks.GenerateDataType
>  +Datatype http://com.ibm.adapter:displayAll com.ibm.adapter.command.internal.ant.tasks.DisplayProperties
>  +Datatype http://com.ibm.adapter:createProject com.ibm.adapter.command.internal.ant.tasks.CreateProject
>  +Datatype wsgen ws.ant.task.WebServiceGenerationAntTask
>  +Datatype jet.compile org.eclipse.jet.ant.tasks.JETCompileTask
>  +Datatype jet.transform org.eclipse.jet.ant.tasks.JETTransformTask
>  +Datatype help.buildHelpIndex org.eclipse.help.internal.base.ant.BuildHelpIndex
>  +Datatype setDebugInfo com.ibm.etools.ant.extras.SetDebugInfo
>  +Datatype getJavacErrorCount com.ibm.etools.ant.extras.GetJavacErrorCount
>  +Datatype getProjectData com.ibm.etools.ant.extras.GetProjectData
>  +Datatype projectBuild com.ibm.etools.ant.extras.ProjectBuild
>  +Datatype earImport com.ibm.etools.j2ee.ant.EARImport
>  +Datatype earExport com.ibm.etools.j2ee.ant.EARExport
>  +Datatype warExport com.ibm.etools.j2ee.ant.WARExport
>  +Datatype appClientExport com.ibm.etools.j2ee.ant.ApplicationClientExport
>  +Datatype ejbExport com.ibm.etools.ejb.ant.EJBExport
>  +Datatype utilJar com.ibm.etools.j2ee.ant.BuildApplicationUtilJar
>  +Datatype validationPreference com.ibm.etools.validate.ant.ValidationPreference
>  +Datatype targetRuntimeCreate com.ibm.etools.ant.extras.TargetRuntimeCreate
>  +Datatype projectImport com.ibm.etools.ant.extras.ProjectImport
>  +Datatype projectGetErrors com.ibm.etools.ant.extras.ProjectGetErrors
>  +Datatype workspaceBuild com.ibm.etools.ant.extras.WorkspaceBuild
>  +Datatype workspaceGetErrors com.ibm.etools.ant.extras.WorkspaceGetErrors
>  +Datatype workspacePreferenceGet com.ibm.etools.ant.extras.WorkspacePreferenceGet
>  +Datatype workspacePreferenceSet com.ibm.etools.ant.extras.WorkspacePreferenceSet
>  +Datatype workspacePreferenceFile com.ibm.etools.ant.extras.WorkspacePreferenceFile
>  +Datatype captureBuildMessages com.ibm.etools.ant.extras.CaptureBuildMessages
>  +Datatype projectSetImport com.ibm.etools.ant.extras.ProjectSetImport
>  +Datatype projectSetBuild com.ibm.etools.ant.extras.ProjectSetBuild
>  +Datatype com.ibm.xtools.ras.addArtifactType com.ibm.xtools.ras.type.descriptor.ant.task.internal.AddArtifactType
>  +Datatype analysis.analyze com.ibm.xtools.analysis.commandline.ant.AnalyzeTask
>  +Datatype eclipse.checkDebugAttributes org.eclipse.jdt.core.CheckDebugAttributes
>  +Datatype eclipse.brand org.eclipse.pde.internal.build.tasks.BrandTask
>  +Datatype eclipse.fetch org.eclipse.pde.internal.build.tasks.FetchTask
>  +Datatype eclipse.buildScript org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask
>  +Datatype eclipse.generateFeature org.eclipse.pde.internal.build.tasks.FeatureGeneratorTask
>  +Datatype eclipse.buildManifest org.eclipse.pde.internal.build.tasks.BuildManifestTask
>  +Datatype eclipse.assembler org.eclipse.pde.internal.build.tasks.PackagerTask
>  +Datatype eclipse.idReplacer org.eclipse.pde.internal.build.tasks.IdReplaceTask
>  +Datatype eclipse.jnlpGenerator org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask
>  +Datatype eclipse.unzipperBuilder org.eclipse.pde.internal.build.tasks.UnzipperGeneratorTask
>  +Datatype eclipse.fetchFilesGenerator org.eclipse.pde.internal.build.tasks.FetchFileGeneratorTask
>  +Datatype eclipse.versionReplacer org.eclipse.pde.internal.build.tasks.GenericVersionReplacer
>  +Datatype pde.convertSchemaToHTML org.eclipse.pde.internal.core.ant.ConvertSchemaToHTML
>  +Datatype pde.exportPlugins org.eclipse.pde.internal.core.ant.PluginExportTask
>  +Datatype pde.exportFeatures org.eclipse.pde.internal.core.ant.FeatureExportTask
>  +Datatype emf.JETEmitter org.eclipse.emf.ant.taskdefs.codegen.JETEmitterTask
>  +Datatype emf.JMerger org.eclipse.emf.ant.taskdefs.codegen.JMergerTask
>  +Datatype emf.util.RemoveVersion org.eclipse.emf.ant.taskdefs.RemoveVersionTask
>  +Datatype http://com.ibm.adapter.j2c:buildService com.ibm.adapter.j2c.command.internal.ant.types.CreateInterface
>  +Datatype http://com.ibm.adapter.j2c:method com.ibm.adapter.j2c.command.internal.ant.types.MethodElement
>  +Datatype http://com.ibm.adapter.j2c:methodName com.ibm.adapter.j2c.command.internal.ant.types.Name
>  +Datatype http://com.ibm.adapter.j2c:methodInput com.ibm.adapter.j2c.command.internal.ant.types.Input
>  +Datatype http://com.ibm.adapter.j2c:methodOutput com.ibm.adapter.j2c.command.internal.ant.types.Output
>  +Datatype http://com.ibm.adapter.j2c:resourceAdapter com.ibm.adapter.j2c.command.internal.ant.types.ResourceAdapter
>  +Datatype http://com.ibm.adapter.j2c:interactionSpec com.ibm.adapter.j2c.command.internal.ant.types.InteractionSpec
>  +Datatype http://com.ibm.adapter.j2c:connectionSpec com.ibm.adapter.j2c.command.internal.ant.types.ConnectionSpec
>  +Datatype http://com.ibm.adapter.j2c:managedConnectionFactory com.ibm.adapter.j2c.command.internal.ant.types.MCFProperties
>  +Datatype http://com.ibm.adapter.j2c:argumentBinding com.ibm.adapter.j2c.command.internal.ant.types.ArgumentBinding
>  +Datatype ras.builtDeployableArtifact com.ibm.xtools.ras.export.ant.task.internal.BuiltDeployableArtifact
>  +Datatype http://com.ibm.adapter:importResource com.ibm.adapter.command.internal.ant.types.ImportResource
>  +Datatype http://com.ibm.adapter:queryProperties com.ibm.adapter.command.internal.ant.types.QueryProperties
>  +Datatype http://com.ibm.adapter:queryResult com.ibm.adapter.command.internal.ant.types.QueryResult
>  +Datatype http://com.ibm.adapter:performImport com.ibm.adapter.command.internal.ant.types.PerformImport
>  +Datatype http://com.ibm.adapter:writeToWorkspace com.ibm.adapter.command.internal.ant.types.WriteToWorkspace
>  +Datatype http://com.ibm.adapter:selectElement com.ibm.adapter.command.internal.ant.types.NodeElement
>  +Datatype http://com.ibm.adapter:propertyElement com.ibm.adapter.command.internal.ant.types.properties.AntPropertyElement
>  +Datatype http://com.ibm.adapter:propertyGroup com.ibm.adapter.command.internal.ant.types.properties.AntPropertyGroup
>  +Datatype http://com.ibm.adapter:propertyTree com.ibm.adapter.command.internal.ant.types.properties.AntPropertyTree
>  +Datatype http://com.ibm.adapter:propertyNode com.ibm.adapter.command.internal.ant.types.properties.AntPropertyNode
>  +Datatype http://com.ibm.adapter:propertyTable com.ibm.adapter.command.internal.ant.types.properties.AntPropertyTable
>  +Datatype http://com.ibm.adapter:propertyCell com.ibm.adapter.command.internal.ant.types.properties.AntPropertyCell
>  +Datatype http://com.ibm.adapter:propertyArray com.ibm.adapter.command.internal.ant.types.properties.AntPropertyArray
>  +Datatype http://com.ibm.adapter:propertyValue com.ibm.adapter.command.internal.ant.types.properties.AntPropertyValue
>  +Datatype http://com.ibm.adapter:discoveryAgents com.ibm.adapter.command.internal.ant.types.DiscoveryAgents
>  +Datatype http://com.ibm.adapter:resourceWriters com.ibm.adapter.command.internal.ant.types.ResourceWriters
>  +Datatype http://com.ibm.adapter:importConfigurations com.ibm.adapter.command.internal.ant.types.ImportConfigurations
> Adding reference: ant.projectHelper
> Adding reference: ant.parsing.context
> Adding reference: ant.targets
> parsing buildfile C:\workspaces\FPA_Persistance\InheritancePersistance\src\build.xml
with URI = file:///C:/workspaces/FPA_Persistance/InheritancePersistance/src/build.xml
> Setting ro project property: ant.project.name -> enahnceJPA
> Adding reference: enahnceJPA
> Setting ro project property: ant.file.enahnceJPA -> C:\workspaces\FPA_Persistance\InheritancePersistance\src\build.xml
> Project base dir set to: C:\workspaces\FPA_Persistance\InheritancePersistance\src
>  +Target: 
>  +Target: enhance
> Arguments: -verbose -debug -Dbasedir=C:\workspaces\FPA_Persistance\InheritancePersistance\src
-Dorg.eclipse.ant.core.ANT_PROCESS_ID=1185379761082
> Adding reference: eclipse.ant.targetVector
> Build sequence for target(s) `enhance' is [enhance]
> Complete build sequence is [enhance, ]
> enhance:
> Adding reference: eclipse.progress.monitor
> Class org.apache.openjpa.ant.PCEnhancerTask loaded from parent loader (parentFirst)
>  +Datatype openjpac org.apache.openjpa.ant.PCEnhancerTask
> Adding reference: eclipse.progress.monitor
>     [openjpac] 20  fpa  TRACE  [Worker-15] openjpa.Runtime - Setting the following properties
from "file:/C:/workspaces/FPA_Persistance/InheritancePersistance/src/META-INF/persistence.xml"
into configuration: Could not load a dependent class (junit.framework.TestListener) for type
junit
> Could not load a dependent class (jdepend.xmlui.JDepend) for type jdepend
> Could not load a dependent class (com.jcraft.jsch.UserInfo) for type sshexec
> Could not load a dependent class (javax.media.jai.PlanarImage) for type image
> Could not load a dependent class (com.jcraft.jsch.UserInfo) for type scp
> fileset: Setup scanner in dir C:\workspaces\FPA_Persistance\InheritancePersistance\src
with patternSet{ includes: [**/entities/*.java] excludes: [] }
> Couldn't load Resource entities/TBLFireResourceDO.class
>     [openjpac] java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
entities.TBLFireResourceDO
>     [openjpac] 	at serp.util.Strings.toClass(Unknown Source)
>     [openjpac] 	at serp.util.Strings.toClass(Unknown Source)
>     [openjpac] 	at org.apache.openjpa.lib.meta.ClassArgParser.parseTypes(Unknown Source)
>     [openjpac] 	at org.apache.openjpa.enhance.PCEnhancer.run(Unknown Source)
>     [openjpac] 	at org.apache.openjpa.ant.PCEnhancerTask.executeOn(Unknown Source)
>     [openjpac] 	at org.apache.openjpa.lib.ant.AbstractTask.execute(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.UnknownElement.execute(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.Task.perform(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.Target.execute(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.Target.performTasks(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.Project.executeSortedTargets(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.Project.executeTarget(Unknown Source)
>     [openjpac] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Unknown
Source)
>     [openjpac] 	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(Unknown
Source)
>     [openjpac] 	at org.apache.tools.ant.Project.executeTargets(Unknown Source)
>     [openjpac] 	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Unknown Source)
>     [openjpac] 	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Unknown Source)
>     [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(Unknown Source)
>     [openjpac] 	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.runInSameVM(Unknown
Source)
>     [openjpac] 	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(Unknown
Source)
>     [openjpac] 	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown
Source)
>     [openjpac] 	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown
Source)
>     [openjpac] 	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown
Source)
>     [openjpac] 	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(Unknown
Source)
>     [openjpac] 	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(Unknown
Source)
>     [openjpac] 	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(Unknown
Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source)
>     [openjpac] 	at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source)
>     [openjpac] 	at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown
Source)
>     [openjpac] 	at org.eclipse.core.internal.events.BuildManager.build(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.events.AutoBuildJob.run(Unknown Source)
>     [openjpac] 	at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
>     [openjpac] 1463  fpa  TRACE  [Worker-15] openjpa.MetaData - Clearing metadata repository
"org.apache.openjpa.meta.MetaDataRepository@d560d56".
> BUILD FAILED
> ...Any idea

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