wood burning stoves 2.0*
The moose likes Web Services and the fly likes Unable to generate war file using jwsc task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Unable to generate war file using jwsc task" Watch "Unable to generate war file using jwsc task" New topic

Unable to generate war file using jwsc task

jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi All,

I am trying to create a webservice using bottom up approach.

So, I gave the implementation file as input to jwsc task and executed the ant script.

The war file is generated and the build script din't throw any errors.

The warnings which were thrown were,

[jwsc] warning: Specified AnnotationProcessorFactory, 'com.sun.istack.ws.AnnotationProcessorFactoryImpl', not found on search path.
[jwsc] warning: No annotation processors found but annotations present.

The build script gives me only the implementation class. The artifacts are not generated.

I am using weblogic jar for jwsc task. I tried with wsgen from command prompt and got the below error,

Problem encountered during annotation processing;
see stacktrace below for more information.
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(Clas
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.b
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.p
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.
at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
at com.sun.tools.apt.main.Main.compile(Main.java:1102)
at com.sun.tools.apt.main.Main.compile(Main.java:964)
at com.sun.tools.apt.Main.processing(Main.java:95)
at com.sun.tools.apt.Main.process(Main.java:85)
at com.sun.tools.apt.Main.process(Main.java:67)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.ja
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:112)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105)
at com.sun.tools.internal.ws.WsGen.main(WsGen.java:41)
error: compilation failed, errors should have been reported

With the weblogic server running and using eclipse I was able to generate those artifacts, but not with ant build or using wsgen.

Please help me out if I have missed out something.

jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi All,

Just to add info.

I googled out and tried out the "apt -XPrintFactoryInfo -XPrintAptRounds -XListAnnotationTypes <mypackage/implementation_file.java>" and it generated all the artifacts as java files in the package mypackage.jaxws.

I am not able to figure out whats happening.

I am trying to get the exact classes(artifacts) using my build script as i mentioned above.

Thanks in advance.
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3817

Have you looked at here?

[How to ask questions] [Twitter]
jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi Vijitha,

I have gone through that link a lot number of times.

The top down aproach works fine for me, wsdlc task generates the necessary artifacts into a jar file.

The problem is when I try the bottom up approach.

Eclipse makes everything easier, I created the java file in a webservice project included it into the ear project and gave run on server which creates those artifacts automatically in the build folder.Also, I am not able to figure out how eclipse creates those classes.

But not while using the build script(jwsc task). Jwsc task creates a war file with deployment descriptors and the implementation class.

How do I generate the Request, Response classes which eclipse creates by default when run on server?

Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3817

Can you show your Ant snippet related to this?
jagan raja
Ranch Hand

Joined: Jan 29, 2010
Posts: 54
Hi Vijitha,

Please find the build snippet,
It is sorta covered in the JavaRanch Style Guide.
subject: Unable to generate war file using jwsc task
Similar Threads
Error while deploying the war file using command "asant deploy"
Compile build.xml with Ant for web service on Weblogic
HandlerChain annotation name attribute deprecated.
WSDL supporting XMLBeans
can't generate web service with jwsc in weblogic 9.2