openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.L. Zeebub" <roger.var...@googlemail.com>
Subject Re: [Newbie] OPenJPA (1.2.1) Enhancement woes
Date Tue, 16 Jun 2009 13:45:02 GMT



Michael Dick wrote:
> 
> Hi Roger,
> 
> The entities are definitely not getting enhanced. Have you tried
> specifying
> the .class files instead of the .java ones?
> 
> ie :
>        <openjpac>
>        <!-- classpath where the tool look for classes to
>               enhance. This is the default location in a NB project
>               directory layout where classes are built -->
>        <classpath>
>            <pathelement location="${basedir}/build/classes"/>
>        </classpath>
>                <!-- I put it in here. See below the persistence.xml file
> -->
>        <config propertiesFile="${basedir}/src/META-INF/persistence.xml"/>
> *       <fileset dir="${basedir}/build/classes">
>            <include name="**/entities/*.class"/>
>        </fileset>
> *   </openjpac>
> 
> 

Ok - I've made the change that you suggested and run "clean & build". There
are no error messages during the build phase.

javap output for the ./build/Ecu.class is now showing
Compiled from "Ecu.java"
public class com.blackbox.flashloader.entities.Ecu extends java.lang.Object
implements
java.io.Serializable,org.apache.openjpa.enhance.PersistenceCapable{

so at least the Ecu.class has been enhanced. I've checked a few others and
they're showing that they've been enhanced as well. Just to double check
I've expanded my .jar file from the dist directory and the classes in there
are showing that they've been enhanced as well. 

However, on running my program, when creating the EntityManagerFactory I'm
still getting the
and the list with all my entity classes in it, and the list contains a
reference to class com.blackbox.flashloader.entities.Ecu 2415  FlashLoaderPU 
INFO   [main] openjpa.Enhance - Creating subclass for "[<list of classes
here>]". This means that your application will be less efficient and will
consume more memory than it would if you ran the OpenJPA enhancer.
Additionally, lazy loading will not be available for one-to-one and
many-to-one persistent attributes in types using field access; they will be
loaded eagerly instead.

I've run find ./ -name Ecu.class in the top level project directory and it
only finds the two I was expecting, the class in the ./build directory and
the class where I expanded my jar file!

Now I'm *really* confused

-- 
View this message in context: http://n2.nabble.com/-Newbie--OPenJPA-%281.2.1%29-Enhancement-woes-tp3085661p3086428.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message