Hi Mike,

yes, I had to switch to the agent now, as the Dynamic Enhancer did not work for 
me in all cases even with the symlink workaround (probably because some Entity 
classes were loaded before the EMF was created, but I'm using the Spring Test 
Context, and I can't really control what's going on behind the scenes in 
Spring.)

I need my entity classes to work with multiple providers, so I can't use Build 
Time enhancement.

Using the agent is a bit inconvenient when running JUnit tests from Eclipse, 
and I don't really want to enable it globally.

Regarding, the java.home issue:  I'm really talking about the system property 
java.home, not about the environment variable JAVA_HOME. I tried setting both, 
but that didn't work.

Regards,
Harald

-------- Original-Nachricht --------
> Datum: Thu, 16 Jun 2011 08:50:33 -0500
> Von: Michael Dick <[email protected]>
> An: [email protected]
> Betreff: Re: Dynamic Enhancement not working on Oracle JDK/Linux

> Hi Harald,
> 
> I don't think the VirtualMachine class (the class we're looking for in
> tools.jar) has moved. I compared 1.6.0_22 and 1.6.0_25 and it's in the
> same
> location - JDK_HOME/lib/tools.jar.
> 
> The problem here is that java.home is pointing to the JRE location instead
> of the JDK location (which is what we've been doing in developing
> OpenJPA).
> 
> This looks like something we can fix by swizzling the classpath, but the
> documentation does indicate that you need a JDK, or SDK to run :
>  2.4.  Enhancing Dynamically at Runtime
> 
> If a javaagent is not provided via the command line and OpenJPA is running
> on the Oracle 1.6 SDK or IBM 1.6 JDK (SR8+), OpenJPA will attempt to
> dynamically load the Enhancer that was mentioned in the previous section.
> This support is provided as an ease of use feature and it is not
> recommended
> for use in a production system. Using this method of enhancement has the
> following caveats:
> 
> <snip>
> 
> It doesn't mention the issue about JAVA_HOME though - we'll have to get
> that
> updated.
> 
> In the mean time, can you use a javaagent instead?
> 
> -mike
> 
> 

-- 
NEU: FreePhone - kostenlos mobil telefonieren!                  
Jetzt informieren: http://www.gmx.net/de/go/freephone

Reply via email to