Mike,

thank you for your hint but that doesn't change anything - I already tried that and tried it again now. Perhaps the complete error message
helps to identify the problem:

enhance:
[openjpac] 375  lbsims  INFO   [main] openjpa.Tool - No targets were given.  Running on all classes in your persistent classes list, or all metadata files in classpath directories if you have not listed your persistent classes.  Use -help to display tool usage information.
[openjpac] java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.lbslogics.ims.model.Visit
[openjpac]     at serp.util.Strings.toClass(Strings.java:211)
[openjpac]     at serp.util.Strings.toClass(Strings.java:140)
[openjpac]     at serp.bytecode.BCClass.getType(BCClass.java:565)
[openjpac]     at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:240)
[openjpac]     at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4344)
[openjpac]     at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89)


any Ideas?????

regards,
HANS

Am Freitag, den 08.02.2008, 09:13 -0600 schrieb Michael Dick:
Hi Hans,

I'm not sure when / what caused the change, but I think you need to add your
entities to a nested classpath tag inside <openjpac>. Ex :

    <path id="entity.cp">
        <pathelement location="${classes.location}"/>
    </path>

<target name="enhance" depends="compile">
    <taskdef name="openjpac" classname="
org.apache.openjpa.ant.PCEnhancerTask" classpathref="base.classpath" />
    <!-- invoke enhancer on all .java files below the model directory -->
    <openjpac>
        <classpath>
              <path refid="entities.classpath"/>
        </classpath>
        <fileset dir="${classes.dir}">
            <include name="**/model/*.java" />
        </fileset>
    </openjpac>
</target>



-Mike

On Feb 8, 2008 6:50 AM, Hans J. Prueller <hans.prueller@gmx.net> wrote:

>
> hi there,
>
> currently we are working with openJPA 0.9.7 and using the follwing ant
> task for the enhancer at build time:
>
> <target name="enhance" depends="compile">
> <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"
> classpathref="base.classpath" />
> <!-- invoke enhancer on all .java files below the model directory -->
> <openjpac>
> <fileset dir="${classes.dir}">
> <include name="**/model/*.java" />
> </fileset>
> </openjpac>
> </target>
>
> After upgrading to 1.0.1 release, the ant task above doesn't work any more
> - it permanently throws "ClassNotFoundExceptions" on
> the persistent classes.
>
> Is there anything that has to be changed between those 2 releases?
>
> hans
>