openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angel Vera <>
Subject Re: can I run without enhancements?
Date Wed, 01 Oct 2008 01:07:15 GMT

Ops.. Yahoo send my email before I paste the exception lines:

SEVERE: Exception sending context initialized event to listener instance of class org.apache.roller.weblogger.ui.core.RollerContext
java.lang.RuntimeException: <0.9.7-incubating fatal user error> org.apache.openjpa.persistence.ArgumentException:
The type "class org.apache.roller.weblogger.pojos.TaskLock" has not been enhanced.
    at org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(

----- Original Message ----
From: Angel Vera <>
Sent: Tuesday, September 30, 2008 9:04:10 PM
Subject: Re: can I run without enhancements?

HI Kevin,

I am running inside of the JEE container, I am running "Roller" (which has a a fair amount
of JPA objects), but the enhacement is not happening on the fly.

Perhaps you can fill me in in option 2.

I tried to use the -javaagent but I didn't find a way of passing this argument to the JVM
that Eclipse/WTP is using to launch tomcat.

Here are the first 3 lines of my exception, if that helps:

----- Original Message ----
From: Kevin Sutter <>
Sent: Tuesday, September 30, 2008 9:12:11 AM
Subject: Re: can I run without enhancements?

There is a "fallback enhancement" process that uses sub-classing, but
previous appends to the forums indicate that this is not a production-ready
process.  This is really meant for the simple "out of the box" applications
for demonstration purposes.  Real applications should use some type of byte
code enhancement to get the best results.

Methods of performing the byte code enhancement:

o  If running within a Java EE Container environment, let the OpenJPA
provider tie into the container's classloading mechanism and the enhancement
will happen on the fly when the entity classes are loaded into memory.

o  Run the PCEnhancer process on your entity classes during your
build/packaging step.  Running this within Eclipse is not that difficult --
I do this quite often.  I just setup a separate Run definition to run the
PCEnhancer against the project that contains my entity classes and I pass in
the persistence.xml file that defines my persistence unit.  If you don't
have a large number of classes to enhance, you could also just pass in the
names of the entity classes that you want enhanced.

o  Another alternative is to use the -javaagent option on the JVM invocation
and pass in the OpenJPA jar file.  This ties into the JVM's classloading
mechanism much like the Java EE Container described above.  When the entity
classes are loaded into the JVM, they will be enhanced on the fly.  I use
this mechanism within Eclipse as well.

Hope this helps,

On Mon, Sep 29, 2008 at 8:35 PM, Angel Vera <> wrote:

> I am trying to debug an roller (a blog application) which I am running
> inside of eclipse, but I have no easy way of running the JPAEnhancer.
> ----- Original Message ----
> From: Andrei Tchijov <>
> To:
> Sent: Monday, September 29, 2008 8:50:58 PM
> Subject: Re: can I run without enhancements?
> Just curious, are you trying to figure out the way to profile JPA
> Application?
> I was wondering about the same question when I was trying
> (unsuccessfully) to profile my JPA App.
> On Sep 29, 2008, at 20:36 , Angel Vera wrote:
> > Is it possible to run a JPA application wihtout the JPA enhancer and
> > wihtout enhancing the classes?
> >
> >
> >
> >
> > __________________________________________________________________
> > Get the name you've always wanted or! Go
> > to
>      __________________________________________________________________
> Looking for the perfect gift? Give the gift of Flickr!

Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger

Looking for the perfect gift? Give the gift of Flickr!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message