openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gutostraube <>
Subject Re: Problem with OpenJPA Enhancer on Tomcat 6
Date Sun, 25 Nov 2007 11:24:51 GMT


I'm running directly from Eclipse. (Right click > Run As > Ant Build).

The target for Enhancer on my build.xml looks like this:

<target name="enhance">
  <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"

    <config propertiesFile="classes/META-INF/persistence.xml" />
    <fileset dir="./classes/br/ufpr/notario">
      <include name="**/model/*.class" />
      <exclude name="**/model/JPAServlet.class" />

After adding the classes in the classpath I've run the ant task. Thanks!

The problem now is that an exception is thrown due to encoding of database
be different from the application.

The line of the error is as follows:
org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: character 0xefbfbd
of encoding "UTF8" has no equivalent in "LATIN1"

Now I am looking for a config to solve this problem. I tried to look at
OpenJPA User's Guide, but found nothing related to encoding so far.

I don't want to have to change the database's encoding. This is my only
option? Any hint?

Thanks again,

Gustavo Straube

Patrick Linskey-2 wrote:
> Hi,
> To run the enhancer via ant, you need to have the classes available in
> the classpath used when the ant task is run. How are you invoking the
> ant task?
> -Patrick
> On 11/24/07, gutostraube <> wrote:
>> Hi all!
>> Every time I start the server the following message appears on the
>> console:
>> 718  notario  INFO   [main] openjpa.Enhance - Creating subclass and
>> redefining methods for "[ ... ]". This means that your application will
>> be
>> less efficient than it would if you ran the OpenJPA enhancer.
>> My application is runnig on Apache Tomcat 6.0 and I'm using the JDK 1.6.
>> The version of OpenJPA is 1.0.1.
>> I know that is because I've not enhanced my model classes, but I can't do
>> so, even after reading the documentation.
>> I've tried to use the Enhancer Ant Task, but that didn't work. The task
>> didn't find my classes.
>> I want to know how can I run the Enhancer at the server startup or how
>> can I
>> fix this problem.
>> Thanks,
>> Gustavo Straube
>> --
>> View this message in context:
>> Sent from the OpenJPA Users mailing list archive at
> -- 
> Patrick Linskey
> 202 669 5907

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message