You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Phili <ge...@annee.de> on 2009/03/16 14:35:10 UTC
Problem: WSDL generation for JPA enhanced classes
Hi,
I'm trying to deliver jpa entity classes through a web-service.
It works fine unless I use build-time enhanced classes:
The WSDL generation fails at deploy-time because of missing jpa-classes:
14:22:00,743 ERROR [WsdlGenerator] WSDL generation process failed
14:22:00,743 ERROR [WsdlGenerator] Problem encountered during annotation
processing;
see stacktrace below for more information.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
org.apache.openjpa.enhance.PersistenceCapable not found
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/openjpa/enhance/PersistenceCapable
at java.lang.ClassLoader.defineClass1(Native Method)
[...]
How can I add the required (open)jpa jars for the wsgen-tool - i've tried to
add an dep:dependency to the deployment plan but that doesn't seem to be the
correct way.
Thx in advance & kind regards
Phil
--
View this message in context: http://www.nabble.com/Problem%3A-WSDL-generation-for-JPA-enhanced-classes-tp22538378s134p22538378.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Problem: WSDL generation for JPA enhanced classes
Posted by Phili <ge...@annee.de>.
Jarek Gawor-2 wrote:
>
> One easy thing to do is the pre-generate the wsdl (using the jaxws-tools
> command line tool) and
> attach the wsdl to your service. That way the server won't need to
> generate the wsdl during deployment.
>
Maybe that would work if not I'm too lazy to do this wsdl stuff on my own (I
don't need to "contract first").
And I dont' want to put gernonimo out of work of course ;)
Jarek Gawor-2 wrote:
>
> Another things to try (if possible of course) is to switch to CXF. It
> uses a different way to generate the wsdl and I'm pretty sure it will
> avoid the problem you see with Axis2.
OK, so that works fine.
I must confess that I've neverd heard from cxf before.
Thanks a lot!
--
View this message in context: http://www.nabble.com/Problem%3A-WSDL-generation-for-JPA-enhanced-classes-tp22538378s134p22620135.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Problem: WSDL generation for JPA enhanced classes
Posted by Jarek Gawor <jg...@gmail.com>.
Hmm... can you attach some sample ear or war file that replicates this problem?
There are a couple of work-arounds. One easy thing to do is the
pre-generate the wsdl (using the jaxws-tools command line tool) and
attach the wsdl to your service. That way the server won't need to
generate the wsdl during deployment.
Another things to try (if possible of course) is to switch to CXF. It
uses a different way to generate the wsdl and I'm pretty sure it will
avoid the problem you see with Axis2.
Jarek
On Mon, Mar 16, 2009 at 9:35 AM, Phili <ge...@annee.de> wrote:
>
> Hi,
>
> I'm trying to deliver jpa entity classes through a web-service.
>
> It works fine unless I use build-time enhanced classes:
>
> The WSDL generation fails at deploy-time because of missing jpa-classes:
>
> 14:22:00,743 ERROR [WsdlGenerator] WSDL generation process failed
> 14:22:00,743 ERROR [WsdlGenerator] Problem encountered during annotation
> processing;
> see stacktrace below for more information.
> com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
> org.apache.openjpa.enhance.PersistenceCapable not found
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/openjpa/enhance/PersistenceCapable
> at java.lang.ClassLoader.defineClass1(Native Method)
> [...]
>
> How can I add the required (open)jpa jars for the wsgen-tool - i've tried to
> add an dep:dependency to the deployment plan but that doesn't seem to be the
> correct way.
>
> Thx in advance & kind regards
> Phil
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Problem%3A-WSDL-generation-for-JPA-enhanced-classes-tp22538378s134p22538378.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>
Re: Problem: WSDL generation for JPA enhanced classes
Posted by Phili <ge...@annee.de>.
kevan wrote:
>
>
> Sorry, I'm not much of a jaxws-tools user... Did you try using -
> classpath argument?
>
> Why are you using build-time enhanced classes?
>
> --kevan
>
>
I'm using build-time enhanced classes because of an openjpa-bug(?) which
results in unnecessary UPDATE-statements beeing executed every now and then.
What I'm trying to figure out is *which* classpath to extend (and how :)) to
get the deploytime-WSDL-generator working. Its not the geronimo/tomcat
classpath I suppose?
As I mentioned I want to deliver detached entities through webservices
instead of using distinct transfer objects.
--
View this message in context: http://www.nabble.com/Problem%3A-WSDL-generation-for-JPA-enhanced-classes-tp22538378s134p22582192.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Problem: WSDL generation for JPA enhanced classes
Posted by Kevan Miller <ke...@gmail.com>.
On Mar 16, 2009, at 9:35 AM, Phili wrote:
>
> Hi,
>
> I'm trying to deliver jpa entity classes through a web-service.
>
> It works fine unless I use build-time enhanced classes:
>
> The WSDL generation fails at deploy-time because of missing jpa-
> classes:
>
> 14:22:00,743 ERROR [WsdlGenerator] WSDL generation process failed
> 14:22:00,743 ERROR [WsdlGenerator] Problem encountered during
> annotation
> processing;
> see stacktrace below for more information.
> com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
> org.apache.openjpa.enhance.PersistenceCapable not found
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/openjpa/enhance/PersistenceCapable
> at java.lang.ClassLoader.defineClass1(Native Method)
> [...]
>
> How can I add the required (open)jpa jars for the wsgen-tool - i've
> tried to
> add an dep:dependency to the deployment plan but that doesn't seem
> to be the
> correct way.
Sorry, I'm not much of a jaxws-tools user... Did you try using -
classpath argument?
Why are you using build-time enhanced classes?
--kevan