You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Philippe Alexis <ph...@gmail.com> on 2007/05/01 07:52:04 UTC
java.lang.ClassNotFoundException
Hello Everyone,
Here's what I'm getting when I follow the 5min quick start guide strictly,
under both Eclipse 3.1.1 and 3.2,
and under Ant on Cygwin:
=================================================================================
Buildfile: D:\Programming\Java\openjpa-
project-0.9.7-incubating\examples\hellojpa\build.xml
compile:
run:
[java] java.lang.ClassNotFoundException: D:\Programming\Java\openjpa-
project-0.9.7-incubating\openjpa-0.9.7-incubating.jar
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:236)
[java] FATAL ERROR in native method: processing of -javaagent failed
[java] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
InstrumentationImpl.java:165)
[java] Exception in thread "main"
BUILD FAILED
D:\Programming\Java\openjpa-project-0.9.7-incubating\examples\build.xml:67:Java
returned: 1
Total time: 1 second
=================================================================================
I'm not sure what I'm doing wrong. I'm stuck in the starting block here. How
do you guys do it?
J-Philippe.
Re: java.lang.ClassNotFoundException
Posted by Patrick Linskey <pl...@gmail.com>.
Hi,
> [java] FATAL ERROR in native method: processing of -javaagent failed
> [java] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
> InstrumentationImpl.java:165)
> [java] Exception in thread "main"
It looks like the root cause of the error is being consumed by ant. Do
you get more exceptions by running 'ant -e' instead of just 'ant'? The
'-e' option will tell ant to log errors more verbosely.
Also, it looks like an error is happening while running the OpenJPA
pre-processor on your classes. What happens if you run the
pre-processor before running your java command, rather than via the
-javaagent flag? To do this, run 'java
org.apache.openjpa.enhance.PCEnhancer' with your
META-INF/persistence.xml in the classpath, or specifying the file on
the command line with the '-properties' flag.
-Patrick
On 4/30/07, Philippe Alexis <ph...@gmail.com> wrote:
> Hello Everyone,
>
> Here's what I'm getting when I follow the 5min quick start guide strictly,
> under both Eclipse 3.1.1 and 3.2,
> and under Ant on Cygwin:
>
> =================================================================================
> Buildfile: D:\Programming\Java\openjpa-
> project-0.9.7-incubating\examples\hellojpa\build.xml
> compile:
> run:
> [java] java.lang.ClassNotFoundException: D:\Programming\Java\openjpa-
> project-0.9.7-incubating\openjpa-0.9.7-incubating.jar
> [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> [java] at java.security.AccessController.doPrivileged(Native Method)
> [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:236)
> [java] FATAL ERROR in native method: processing of -javaagent failed
> [java] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
> InstrumentationImpl.java:165)
> [java] Exception in thread "main"
>
> BUILD FAILED
> D:\Programming\Java\openjpa-project-0.9.7-incubating\examples\build.xml:67:Java
> returned: 1
>
> Total time: 1 second
> =================================================================================
>
>
> I'm not sure what I'm doing wrong. I'm stuck in the starting block here. How
> do you guys do it?
>
> J-Philippe.
>
--
Patrick Linskey
202 669 5907