You have a few options here.

1) Don't expose jpox enhanced objects in the rpc interface.
2) Have a second set of identical objects, on a different package, that
are exposed via RPC. This would require a set of Copy methods to copy
the JPOX enhanced object values into this second set of objects.
3) Don't use jpox.  Use ibatis instead.

Short answer, you can't use jpox and rpc at the same time, on the same
objects.

I have this same problem with archiva, and my desire to use the Maven
Model and Metadata objects in a DB mapping.  I can't enhance those
objects, so I choose ibatis instead.

- Joakim


Andrew Williams wrote:
> Reverted. Can someone look at fixing this the correct way then? I
> would like to use this code.
>
> Andy
>
> On 26 Feb 2007, at 12:53, Emmanuel Venisse wrote:
>
>> This patch isn't correct because the rpc client doesn't need enhanced
>> classes.
>> We need to generate model classes for the rpc client without
>> enhancement.
>> Please, revert your patch.
>>
>> Emmanuel
>>
>> Andrew Williams a écrit :
>>> The SampleClient fails to run without it.
>>> Caused by: java.lang.NoClassDefFoundError:
>>> javax/jdo/spi/PersistenceCapable
>>>         at java.lang.ClassLoader.defineClass0(Native Method)
>>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>>>         at
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>>>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>>>         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>>>         at java.security.AccessController.doPrivileged(Native Method)
>>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>>         at
>>> org.codehaus.mojo.exec.ExecJavaMojo$IsolatedClassLoader.loadClass(ExecJavaMojo.java:265)
>>>         
>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>>>         at
>>> org.apache.maven.continuum.rpc.ProjectsReader.readProjects(ProjectsReader.java:79)
>>>         
>>> at
>>> org.apache.maven.continuum.rpc.SampleClient.main(SampleClient.java:51)
>>>         ... 23 more
>>> A
>>> On 26 Feb 2007, at 08:49, Emmanuel Venisse wrote:
>>>> Why? we don't use it in the rpc client.
>>>>
>>>> [EMAIL PROTECTED] a écrit :
>>>>> Author: handyande
>>>>> Date: Sun Feb 25 16:07:34 2007
>>>>> New Revision: 511667
>>>>> URL: http://svn.apache.org/viewvc?view=rev&rev=511667
>>>>> Log:
>>>>> rpc client need jdo2 too
>>>>> Modified:
>>>>>     maven/continuum/trunk/continuum-rpc-client/pom.xml
>>>>> Modified: maven/continuum/trunk/continuum-rpc-client/pom.xml
>>>>> URL:
>>>>> http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-rpc-client/pom.xml?view=diff&rev=511667&r1=511666&r2=511667
>>>>>
>>>>> ==============================================================================
>>>>>
>>>>> --- maven/continuum/trunk/continuum-rpc-client/pom.xml (original)
>>>>> +++ maven/continuum/trunk/continuum-rpc-client/pom.xml Sun Feb 25
>>>>> 16:07:34 2007
>>>>> @@ -70,5 +70,9 @@
>>>>>        <artifactId>commons-httpclient</artifactId>
>>>>>        <version>2.0.2</version>
>>>>>      </dependency>
>>>>> +    <dependency>
>>>>> +      <groupId>org.codehaus.plexus</groupId>
>>>>> +      <artifactId>plexus-jdo2</artifactId>
>>>>> +    </dependency>
>>>>>    </dependencies>
>>>>>  </project>
>>>>
>>
>

Reply via email to