openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vic neiman <lostvick...@gmail.com>
Subject MappingTool ClassNotFoundException
Date Fri, 25 Jan 2013 09:02:58 GMT
Hi all,

I'm having trouble with the MappingTool, it keeps on throwing
java.lang.ClassNotFoundException when I run it on a Java source file. It
feels like it's a classpath issue but I am not certain. Please have  a look
below:

I run it like this:
java -cp .:openjpa-2.2.1.jar:openjpa-all-2.2.1.jar:/home/vic/tmp/test/src
org.apache.openjpa.jdbc.meta.MappingTool -p ~/tmp/test/persistence.xml
~/tmp/test/src/java/org/mag/Magazine.java

It returns this:
Exception in thread "main" java.lang.IllegalArgumentException:
java.lang.ClassNotFoundException: org.mag.Magazine
    at serp.util.Strings.toClass(Strings.java:164)
    at serp.util.Strings.toClass(Strings.java:108)
    at
org.apache.openjpa.lib.meta.ClassArgParser.parseTypes(ClassArgParser.java:164)
    at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1035)
    at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1001)
    at org.apache.openjpa.jdbc.meta.MappingTool$1.run(MappingTool.java:937)
    at
org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:748)
    at
org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:738)
    at org.apache.openjpa.jdbc.meta.MappingTool.main(MappingTool.java:932)

The Magazine.java looks like this:
package org.mag;

@Entity
@IdClass(Magazine.MagazineId.class)
public class Magazine {


    public static class MagazineId {

    }
}

Regards
Victor

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