You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Florian Schaetz <fl...@optitool.de> on 2009/07/06 11:23:31 UTC

Webservice: WSDL Generations fails

Hi,

I'm trying to deploy a Webservice (stateless bean). It deploys fine, but
the WSDL doesn't get generated. The only error message I get (in console
and in log) is...

2009-07-06 11:17:32,743 ERROR [EjbModuleBuilder]
JAXWSEJBModuleBuilderExtension.addGBeans() failed: Unable to find the
service wsdl file
org.apache.geronimo.common.DeploymentException: Unable to find the
service wsdl file
at
org.apache.geronimo.jaxws.builder.WsdlGenerator.generateWsdl(WsdlGenerator.java:338)
at
org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:222)
etc.

But if I use wsgen to create the WSDL file manually, it works fine and
creates a nice WSDL file. How do I find out, what the real error is (in
other words, why the WSDL doesn't get generated)?

Flo

-- 
OPTITOOL GmbH

Bruderwöhrdstr. 15b
D - 93055 Regensburg

T: +49-941-59578-13

eMail: florian.schaetz@optitool.de
URL: www.optitool.de

Sitz der Gesellschaft: Regensburg
Registergericht Regensburg: HR B 9544

Re: Webservice: WSDL Generations fails

Posted by Florian Schaetz <fl...@optitool.de>.
Jarek Gawor wrote:

> Which class can't be found?

Ok, let me sumarize... I've got three jar-files:

1) Service.jar - containing the stateless EJB/Webservice (with
apropriate META-INF)
2) Biz.jar - simple library .jar, containing the business logic,
including a Session class
3) Common.jar - containing helper classes, etc. - including a simple
interface IProgressMonitor (which just uses java.lang classes, no import
statements) and it's implementation NullPointerMonitor.
Of course, Biz.jar and Common.jar are in the repository and correctly
marked as dependencies in the Service.jar's openejb-jar.xml file.

When deploying the EJB/Webservice, I get the following error message
(but the EJB is deployed correctly, just the WSDL doesn't get generated,
which of course prevents the WebService from being there):

2009-07-06 15:34:15,182 ERROR [WsdlGenerator] WSDL generation process failed
2009-07-06 15:34:15,182 ERROR [WsdlGenerator] Exception in thread "main"
java.lang.NoClassDefFoundError: net/uniopt/util/IProgressMonitor
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
	at java.lang.Class.privateGetPublicMethods(Class.java:2547)
	at java.lang.Class.getMethods(Class.java:1410)
	at
com.sun.xml.ws.modeler.RuntimeModeler.determineWebMethodUse(RuntimeModeler.java:288)
	at
com.sun.xml.ws.modeler.RuntimeModeler.processClass(RuntimeModeler.java:304)
	at
com.sun.xml.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249)
	at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:631)
	at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
	at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.tools.ws.Invoker.main(Invoker.java:41)
	at com.sun.tools.ws.WsGen.main(WsGen.java:28)
Caused by: java.lang.ClassNotFoundException:
net.uniopt.util.IProgressMonitor
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	... 16 more#

The place where this occurs looks like this...

// This first line works fine
Session session = new UserManager().login(entityManager, user, pwd);
// The error occurs if the following line is there:
session.load( entityManager, new NullProgressMonitor() );
// (Session.load takes the EntityManager and an IProgressMonitor as
// parameter)

I really would be grateful if anyone had any idea what my problem could
be...

Flo

Re: Webservice: WSDL Generations fails

Posted by Florian Schaetz <fl...@optitool.de>.
Hi,

> If you do generate the wsdl using the command line with wsgen, notice
> that wsgen also generates a bunch of classes. Include these classes in
> your application too.

That worked fine, I simply didn't see the jaxws package before. Thanks.
Still, it seems strange that Geronimo isn't able to generate the WSDL on
the fly...

Flo

Re: Webservice: WSDL Generations fails

Posted by Jarek Gawor <jg...@gmail.com>.
The wsgen error should be logged in var/log/geronimo.log but if it is
not, see the following:

http://cwiki.apache.org/GMOxDOC21/web-services-issues.html

Which class can't be found?

If you do generate the wsdl using the command line with wsgen, notice
that wsgen also generates a bunch of classes. Include these classes in
your application too.

Jarek

On Mon, Jul 6, 2009 at 8:18 AM, Florian
Schaetz<fl...@optitool.de> wrote:
> Hi again,
>
>> But if I use wsgen to create the WSDL file manually, it works fine and
>> creates a nice WSDL file. How do I find out, what the real error is (in
>> other words, why the WSDL doesn't get generated)?
>
> I don't know, if it's the same error or not, but now it seems, that the
> WSDL generations fails, because it can't find a class. But the jar
> containing the class is in the repository and clearly referenced in the
> openejb-jar.xml file - so why doesn't the generator find it?
>
> Generating a wsdl manually and adding it only leads to different
> problems, then suddenly classes aren't in the context anymore, so I hope
> that someone can help me solving the problem above.
>
> Flo
>

Re: Webservice: WSDL Generations fails

Posted by Florian Schaetz <fl...@optitool.de>.
Hi again,

> But if I use wsgen to create the WSDL file manually, it works fine and
> creates a nice WSDL file. How do I find out, what the real error is (in
> other words, why the WSDL doesn't get generated)?

I don't know, if it's the same error or not, but now it seems, that the
WSDL generations fails, because it can't find a class. But the jar
containing the class is in the repository and clearly referenced in the
openejb-jar.xml file - so why doesn't the generator find it?

Generating a wsdl manually and adding it only leads to different
problems, then suddenly classes aren't in the context anymore, so I hope
that someone can help me solving the problem above.

Flo