Hi Pinaki,

  1. No, they aren't in the same directory. I have 3 orm.xml files, each in
a directory that has persistent classes. I refer to them in persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    version="2.0">
    
    <persistence-unit name="openjpa" transaction-type="RESOURCE_LOCAL">
        <provider>
            org.apache.openjpa.persistence.PersistenceProviderImpl
        </provider>

        <mapping-file>bean/core/orm.xml</mapping-file>
        <mapping-file>bean/system/orm.xml</mapping-file>
        <mapping-file>bean/workflow/orm.xml</mapping-file>
        
       <properties>
            <property name="openjpa.ConnectionUserName" 
                value="xxx"/>
            <property name="openjpa.ConnectionPassword" 
                value="xxx"/>
            <property name="openjpa.ConnectionDriverName" 
                value="com.mysql.jdbc.Driver"/>
            <property name="openjpa.ConnectionURL" 
               
value="jdbc:mysql://de-dev-db2.de-dev.harvard.edu/rute_test"/>
            <property name="openjpa.MetaDataFactory" 
                                value="jpa"/>
            <property name="openjpa.Log" value="Tool=TRACE,Enhance=TRACE"/>
            <!-- This is already the default! -->
            <property name="openjpa.TransactionMode" value="local" />
            <!-- Will re-use Kodo's field JDOLOCKX -->
            <property name="openjpa.jdbc.MappingDefaults"
                
value="VersionStrategy=version-number,VersionColumnName='JDOLOCKX'"/>
        </properties>

    </persistence-unit>
    
</persistence>



  2. Using the direct invocation of PCEnhancer worked fine!!!!! 

        <target name="enhance">

            <java classname="org.apache.openjpa.enhance.PCEnhancer" 
fork="true"> 
                        <classpath>
                                <pathelement location="webroot/WEB-INF/classes" 
/>
                                <fileset dir="webroot/WEB-INF/lib">
                                        <include name="openjpa-all-2.0.0.jar"/>
                                </fileset>
                        </classpath>

                <arg value="-properties" /> 
                <arg value="java/META-INF/persistence.xml#openjpa" /> 
            </java> 

        </target>


  For now, I can use the direct invocation, but I will try to make it work
with the ant task. It's most likely a classpath problem on my side...


  Thanks a lot for your help!

  Rute

-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/ClassNotFoundException-in-PCEnhancerTask-when-class-has-already-been-enhanced-tp5010582p5014661.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to