Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Unable to generate war file using jwsc task

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
java.lang.NullPointerException
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalType(WebServiceVisitor.java:770)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalMethod(WebServiceVisitor.java:618)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.methodsAreLegal(WebServiceVisitor.java:588)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.isLegalImplementation(WebServiceVisitor.java:506)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.shouldProcessWebService(WebServiceVisitor.java:309)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisi
tor.visitClassDeclaration(WebServiceVisitor.java:112)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(Clas
sDeclarationImpl.java:95)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.b
uildModel(WebServiceAP.java:315)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.p
rocess(WebServiceAP.java:256)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.
process(AnnotationProcessors.java:60)
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
va:204)
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.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
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.

Thanks.
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked at here?
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thanks
 
Vijitha Kumara
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you show your Ant snippet related to this?
 
jagan raja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijitha,

Please find the build snippet,
reply
    Bookmark Topic Watch Topic
  • New Topic