You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Łukasz Budnik <lu...@gmail.com> on 2008/03/31 15:28:02 UTC

Enhacing classes with Ant - MissingResourceException

Hi All,

I'm getting very strange exception:

C:\Studia\PhD\workspace\Nuntius\build.xml:89: java.util.MissingResourceException
: C:\Studia\PhD\workspace\NuntiusEJB\build\classes\META-INF\persistence.xml

of course C:\Studia\PhD\workspace\NuntiusEJB\build\classes\META-INF\persistence.xml
file exists.

and this is my target:

<target name="enhance">
	<path id="enhancer-path">
		<pathelement location="${GERONIMO_HOME}\repository\org\apache\openjpa\openjpa\1.0.1\openjpa-1.0.1.jar"
/>
		<pathelement location="${GERONIMO_HOME}\repository\commons-lang\commons-lang\2.3\commons-lang-2.3.jar"
/>
		<pathelement location="${GERONIMO_HOME}\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar"
/>
		<pathelement location="C:\lib\serp\serp-1.13.1.jar" />
	</path>
	
	<taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
		<classpath refid="enhancer-path" />
	</taskdef>
	
	<openjpac>
		<classpath refid="enhancer-path" />
		<fileset dir="${ejb-build}/classes">
			<include name="**/model/*.class" />
		</fileset>
		<config propertiesFile="${ejb-build}/classes/META-INF/persistence.xml"/>
	</openjpac>
</target>

any ideas?

best regards
Łukasz

Re: Enhacing classes with Ant - MissingResourceException

Posted by Andy Schlaikjer <ha...@cs.cmu.edu>.
Hi there,

I've had some issues with classpaths and the openjpac ant task as well. 
The following ticket talks about these, as well as a work-around I'd found:

https://issues.apache.org/jira/browse/OPENJPA-482

Cheers,
Andy

Łukasz Budnik wrote:
> Hi All,
> 
> I'm getting very strange exception:
> 
> C:\Studia\PhD\workspace\Nuntius\build.xml:89: java.util.MissingResourceException
> : C:\Studia\PhD\workspace\NuntiusEJB\build\classes\META-INF\persistence.xml
> 
> of course C:\Studia\PhD\workspace\NuntiusEJB\build\classes\META-INF\persistence.xml
> file exists.
> 
> and this is my target:
> 
> <target name="enhance">
> 	<path id="enhancer-path">
> 		<pathelement location="${GERONIMO_HOME}\repository\org\apache\openjpa\openjpa\1.0.1\openjpa-1.0.1.jar"
> />
> 		<pathelement location="${GERONIMO_HOME}\repository\commons-lang\commons-lang\2.3\commons-lang-2.3.jar"
> />
> 		<pathelement location="${GERONIMO_HOME}\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar"
> />
> 		<pathelement location="C:\lib\serp\serp-1.13.1.jar" />
> 	</path>
> 	
> 	<taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
> 		<classpath refid="enhancer-path" />
> 	</taskdef>
> 	
> 	<openjpac>
> 		<classpath refid="enhancer-path" />
> 		<fileset dir="${ejb-build}/classes">
> 			<include name="**/model/*.class" />
> 		</fileset>
> 		<config propertiesFile="${ejb-build}/classes/META-INF/persistence.xml"/>
> 	</openjpac>
> </target>
> 
> any ideas?
> 
> best regards
> Łukasz