openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: PCEnhancer and java.lang.ClassNotFoundException
Date Tue, 19 Jul 2011 12:08:15 GMT
First off, I'd be interested in hearing about the problems that you
encountered when trying to get PCEnhancer working in eclipse.

Secondly, try something like this : java -classpath
/home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/bin/resourceMgr/model:/home/luzer/tools/apache-openjpa-2.1.0/openjpa-all-2.1.0.jar
org.apache.openjpa.enhance.PCEnhancer -p
/home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/src/META-INF/persistence.xml

Let us know how it goes.

On Tue, Jul 19, 2011 at 3:20 AM, abuwz <abuwarez@googlemail.com> wrote:

> Hi,
>
> I'm trying to enhance my entities at build time. After failing to get the
> ant script for eclipse working, I decided to run the PCEnhancer manually,
> without luck though.
>
> When I run PCEnhacer with the following cmd line:
>
> [luzer@cipoc JpaDemo]$ java -classpath
>
> /home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/bin/resourceMgr/model/Client.class:/home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/bin/resourceMgr/model/Resource.class:/home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/bin/resourceMgr/model/ResourceGroup.class:/home/luzer/tools/apache-openjpa-2.1.0/openjpa-all-2.1.0.jar
> org.apache.openjpa.enhance.PCEnhancer -p
> /home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/src/META-INF/persistence.xml
> bin/resourceMgr/model/Resource.class
>
> I get the following exception:
>
> Exception in thread "main" java.lang.IllegalArgumentException:
> java.lang.ClassNotFoundException: resourceMgr.model.Resource
>        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.enhance.PCEnhancer.run(PCEnhancer.java:4659)
>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4622)
>        at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4592)
>        at
>
> org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:741)
>        at
>
> org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:731)
>        at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4587)
>        at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:4578)
>
> I'm out of ideas. Please help.
>
> Thanks,
> abu
>
> PS:
> 1. environment:
>
> ./bin/resourceMgr/model/Client.class
> ./bin/resourceMgr/model/ResourceGroup.class
> ./bin/resourceMgr/model/Resource.class
>
> 2. persistence.xml
>
> <?xml version="1.0"?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>  <persistence-unit name="Accounts">
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>    <class>resourceMgr.model.Client</class>
>    <class>resourceMgr.model.Resource</class>
>    <class>resourceMgr.model.ResourceGroup</class>
>    <properties>
>      <property name="openjpa.jdbc.SynchronizeMappings"
> value="buildSchema"/>
>      <property name="openjpa.ConnectionURL"
> value="jdbc:mysql://localhost:3306/gamename"/>
>      <property name="openjpa.ConnectionDriverName"
> value="com.mysql.jdbc.Driver"/>
>      <property name="openjpa.ConnectionUserName" value="root"/>
>      <property name="openjpa.ConnectionPassword" value=""/>
>      <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
>    </properties>
>  </persistence-unit>
> </persistence>
>
> --
>


-- 
*Rick Curtis*

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