openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Subject Re: has not been enhanced
Date Wed, 25 Mar 2009 13:09:32 GMT
Your "build" is also executing a main called App, which calls Bill.  So, the
enhancement processing that is being requested is due to the OpenJPA
runtime, not the normal compile, build, and packaging phase.

For optimum performance, OpenJPA uses byte-code weaving, or enhancement, on
the Entity classes.  This process inserts some specific byte-codes into the
Entity classes which help OpenJPA with processing of the Persistence
Contexts and the associated Entities.

The first message in your log indicates that you are not performing the
enhancement process.  Without this enhancement process, we fall back to an
Entity sub-classing approach.  Not only does this approach not perform very
well, there are several known issues with this sub-classing.  The main idea
of sub-classing was to provide an initial, easy out-of-box experience for
OpenJPA users.  Unfortunately, due to some of the limitations of this
approach, our users almost immediately hit a roadblock.

Rick has provided a good write-up on Enhancement on our Persistence blog:

Hopefully this will give a bit more background.  Take a read through this
and then post back when you have more questions.  Thanks for your interest
in OpenJPA!


On Wed, Mar 25, 2009 at 3:41 AM, Rolf Schumacher <>wrote:

> thank you for your answer, Rick
> you'll find the persistence.xml here:
> the highlighted class is that one that netbeans has introduced when it
> generated it from the table TIMESHEET_COMMENT in the database eHour.
> you'll find the Java stack dump here:
> it happens when I try to build the maven project with netbeans build
> you'll find the pom.xml here:
> I mentioned running openjpa:enhance
> the Java stackdump you can find here:
> Rick Curtis wrote:
> > Can we get some more info? Your persistence.xml file along with the
> actual error message would be a good start.
> >
> > -Rick
> >
> >
> > I'm working successfully on my first jpa project,
> > using netbeans, maven and openjpa.
> >
> > Now I added another entity class by applying the generator from the pull
> > down menu of a package "New/Entity Classes from Database ..."
> >
> > It generated two entity classes because the key has multiple colums:
> > Entity and EntityPK.
> >
> > When I built the project again I get the error:
> >
> > "The type "class EntityPK" has not been enhanced."
> >
> > And the build stops.
> >
> > I looked in the documentation for "enhancement" and found it to be an
> > important subject but was not able to understand why a class shall be
> > enhanced in order for the project to get built.
> >
> > Before I added this entity to the other 5 - one with a primary key class
> > as well - I didn't had this problem and everything worked smooth. Now I
> > got stuck.
> >
> > What shall I look into to overcome this problem?
> >
> > Rolf
> >
> > p.s. When I ran the maven goal openjpa:enhance an exception occurs while
> > parsing a non-entity class, telling me that a class can not be found
> > that I provide at runtime. Honestly, I do not know what I was doing here.
> >
> >
> >
> >
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message