You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Michael Simons <mi...@optitool.de> on 2009/05/18 18:34:18 UTC
Enhancer problem, using ant
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Running my ant-script to enhance my pc-classes I get these messages:
<snip>
Buildfile: C:\home\sim\dev\otj-domain\src\build.xml
enhance:
[openjpac] Some product derivations are being skipped. For information about product derivation
status, run:
[openjpac] java org.apache.openjpa.lib.conf.ProductDerivations
BUILD FAILED
C:\home\sim\dev\otj-domain\src\build.xml:29: java.lang.NoClassDefFoundError:
javax/transaction/Synchronization
Total time: 922 milliseconds
</snip>
Running the PCEnhancer class directly works.
What might be the problem with the Synchronization interface?
Can anyone please explain that derivations thing to me, because I don't understand it?
<excerpt source="build.xml">
<?xml version="1.0"?>
<project name="..." default="enhance" basedir=".">
<property name="build.dir" value="${basedir}/bin" />
<property name="src" value="${basedir}/src" />
<property name="jpa.lib" value=".../openjpa-1.2.1"/>
<path id="cp">
<pathelement path="${src}"/>
<pathelement path="${build.dir}"/>
<fileset dir="${jpa.lib}" includes="**/*.jar"/>
<pathelement path="${develop.basedir}/uoj-common/bin" />
<pathelement path="${develop.basedir}/uoj-geocode/bin" />
</path>
<!-- 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
classpath="${jpa.lib}/openjpa-1.2.1.jar;${jpa.lib}/commons-lang-2.1.jar;commons-collections-3.2.jar"
name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/>
<target name="enhance" description="Enhance pc classes">
<!-- invoke enhancer on all .class files below the .../domain directory -->
<openjpac>
<fileset dir="${build.dir}">
<include name="**/domain/*.class" />
</fileset>
</openjpac>
</target>
</project>
</excerpt>
kind regards,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFKEY4K5aNR/9BakrgRAtqrAJ97zs/5zEMNKz1Ua0350YpcLWdDvQCfQXZG
RgUpR5XT3lZc9jBVGb7EWbg=
=PHSb
-----END PGP SIGNATURE-----
Re: Enhancer problem, using ant
Posted by Michael Simons <mi...@optitool.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks Rick,
Michael
Rick Curtis schrieb:
> Michael -
>
> When you define your openjpac task, you're missing some of the required
> classes. You could change your
> openjpac taskdef to something like:
>
> <taskdef
> classpath="${jpa.lib}/openjpa-1.2.1.jar;${jpa.lib}/commons-lang-2.1.jar;commons-collections-3.2.jar"
> name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
> <classpath refid="cp"/>
> </taskdef>
>
> -Rick
>
>
> Michael Simons wrote:
> Hello,
>
> Running my ant-script to enhance my pc-classes I get these messages:
> <snip>
> Buildfile: C:\home\sim\dev\otj-domain\src\build.xml
> enhance:
> [openjpac] Some product derivations are being skipped. For information
> about product derivation
> status, run:
> [openjpac] java org.apache.openjpa.lib.conf.ProductDerivations
>
> BUILD FAILED
> C:\home\sim\dev\otj-domain\src\build.xml:29:
> java.lang.NoClassDefFoundError:
> javax/transaction/Synchronization
>
> Total time: 922 milliseconds
> </snip>
>
> Running the PCEnhancer class directly works.
>
> What might be the problem with the Synchronization interface?
> Can anyone please explain that derivations thing to me, because I don't
> understand it?
>
> <excerpt source="build.xml">
> <?xml version="1.0"?>
> <project name="..." default="enhance" basedir=".">
>
> <property name="build.dir" value="${basedir}/bin" />
> <property name="src" value="${basedir}/src" />
> <property name="jpa.lib" value=".../openjpa-1.2.1"/>
>
> <path id="cp">
> <pathelement path="${src}"/>
> <pathelement path="${build.dir}"/>
> <fileset dir="${jpa.lib}" includes="**/*.jar"/>
> <pathelement path="${develop.basedir}/uoj-common/bin" />
> <pathelement path="${develop.basedir}/uoj-geocode/bin" />
> </path>
>
> <!-- 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
> classpath="${jpa.lib}/openjpa-1.2.1.jar;${jpa.lib}/commons-lang-2.1.jar;commons-collections-3.2.jar"
> name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/>
> <target name="enhance" description="Enhance pc classes">
> <!-- invoke enhancer on all .class files below the .../domain directory
> -->
> <openjpac>
> <fileset dir="${build.dir}">
> <include name="**/domain/*.class" />
> </fileset>
> </openjpac>
> </target>
>
> </project>
> </excerpt>
>
> kind regards,
> Michael
>>
>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFKEqQo5aNR/9BakrgRApGgAJ9fPE9TBrIvXfjT4tVrVyG7KGTg8QCfVaAJ
wZezOOO6Qr0yit0Kgz3MXPc=
=5kOn
-----END PGP SIGNATURE-----
Re: Enhancer problem, using ant
Posted by Rick Curtis <cu...@gmail.com>.
Michael -
When you define your openjpac task, you're missing some of the required
classes. You could change your
openjpac taskdef to something like:
<taskdef
classpath="${jpa.lib}/openjpa-1.2.1.jar;${jpa.lib}/commons-lang-2.1.jar;commons-collections-3.2.jar"
name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask">
<classpath refid="cp"/>
</taskdef>
-Rick
Michael Simons wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> Running my ant-script to enhance my pc-classes I get these messages:
> <snip>
> Buildfile: C:\home\sim\dev\otj-domain\src\build.xml
> enhance:
> [openjpac] Some product derivations are being skipped. For information
> about product derivation
> status, run:
> [openjpac] java org.apache.openjpa.lib.conf.ProductDerivations
>
> BUILD FAILED
> C:\home\sim\dev\otj-domain\src\build.xml:29:
> java.lang.NoClassDefFoundError:
> javax/transaction/Synchronization
>
> Total time: 922 milliseconds
> </snip>
>
> Running the PCEnhancer class directly works.
>
> What might be the problem with the Synchronization interface?
> Can anyone please explain that derivations thing to me, because I don't
> understand it?
>
> <excerpt source="build.xml">
> <?xml version="1.0"?>
> <project name="..." default="enhance" basedir=".">
>
> <property name="build.dir" value="${basedir}/bin" />
> <property name="src" value="${basedir}/src" />
> <property name="jpa.lib" value=".../openjpa-1.2.1"/>
>
> <path id="cp">
> <pathelement path="${src}"/>
> <pathelement path="${build.dir}"/>
> <fileset dir="${jpa.lib}" includes="**/*.jar"/>
> <pathelement path="${develop.basedir}/uoj-common/bin" />
> <pathelement path="${develop.basedir}/uoj-geocode/bin" />
> </path>
>
> <!-- 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
> classpath="${jpa.lib}/openjpa-1.2.1.jar;${jpa.lib}/commons-lang-2.1.jar;commons-collections-3.2.jar"
> name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/>
> <target name="enhance" description="Enhance pc classes">
> <!-- invoke enhancer on all .class files below the .../domain directory
> -->
> <openjpac>
> <fileset dir="${build.dir}">
> <include name="**/domain/*.class" />
> </fileset>
> </openjpac>
> </target>
>
> </project>
> </excerpt>
>
> kind regards,
> Michael
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFKEY4K5aNR/9BakrgRAtqrAJ97zs/5zEMNKz1Ua0350YpcLWdDvQCfQXZG
> RgUpR5XT3lZc9jBVGb7EWbg=
> =PHSb
> -----END PGP SIGNATURE-----
>
>
--
View this message in context: http://n2.nabble.com/Enhancer-problem%2C-using-ant-tp2934178p2934625.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Enhancer problem, using ant
Posted by David Beer <da...@googlemail.com>.
On Mon, 18 May 2009 18:34:18 +0200
Michael Simons <mi...@optitool.de> wrote:
> <property name="jpa.lib" value=".../openjpa-1.2.1"/>
I am reckon that ant can't find the library properly as the path is
invalid to the folder. should be ../openjpa-1.2.1.