openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gokhan Ergul <>
Subject Re: [jira] Commented: (OPENJPA-231) Incorrect handling of cascading bidirectional collections during merge/attach
Date Thu, 03 May 2007 22:03:34 GMT

I must admit I'm quite illiterate when it comes to Eclipse --ditched it 
a long time ago in favor of Idea. You must be right about the build.xml 
being a not-so-straightforward root for Eclipse import, it didn't occur 
to me that it could be used that way. Having said that, here's my 
(purely speculative) comments about the problem you're having:

> [java] javax.persistence.PersistenceException: Invalid or inaccessible
> provider class: org.apache.openjpa.persistence.PersistenceProviderImpl
>     [java] at
That sure looks like a classpath problem to me, and the fact that it's 
coming from ant..ExecuteJava is somewhat telling, the Eclipse-generated 
build.xml is running a <java ..> task instead of an <openjpac> task, 
possibly with a different classpath.

> Is the use of <taskdef name="openjpac" classname="
> org.apache.openjpa.ant.PCEnhancerTask"/>
> the equivalent of what is done for the examples with
> <!--
>                Specifying the openjpa jar as the javaagent argument is
>                necessary in order for automatic class-enhancement to 
> work.
>            -->
>            <jvmarg value="-javaagent:${javaagent}"/>    ?

<openjpac> task performs a build-time class enhancement, whereas the 
"-javaagent" method performs a run-time enhancement, you can use either 
as long as the environment is setup properly. Since the above exception 
is coming from a <java> task, I'm assuming you're using run-time 
enhancement method, then it boils down to setting the correct classpath 

If you can post the relevant parts of your build.xml, it'll be easier to 
spot the problem.


View raw message