users@glassfish.java.net

Re: <class> is not found. Have you run APT to generate them?

From: <glassfish_at_javadesktop.org>
Date: Fri, 08 Jun 2007 09:24:11 PDT

So I finally got my web service deployed and started correctly. Thanks Vivek!

The docs misled me to believe that wsgen is only for Java-First web service. So I ended up using wsgen in my jaxws-maven-plugin. At first I got a ClassNotFoundException AnnotationProcessorFactory. After some puttering around I realized it was in the JDK tools.jar and after including it I was able to get the problem to go away. This sounds like a potential bug since it should automatically be a dependency of the jaxws-maven-plugin.

So now I have a separate new problem when I invoke my service method. I will post a separate thread on it but the stack trace is as follows:

java.lang.NullPointerException
        at com.sun.xml.stream.writers.XMLStreamWriterImpl.getProperty(XMLStreamWriterImpl.java:440)
        at com.sun.xml.ws.util.xml.XMLStreamWriterFilter.getProperty(XMLStreamWriterFilter.java:139)
        at com.sun.xml.ws.streaming.XMLStreamWriterUtil.getOutputStream(XMLStreamWriterUtil.java:77)
        at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:308)
        at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
        at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:158)
        at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:265)
        at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
        at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
        at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
        at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
        at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
[Message sent by forum member 'najmi' (najmi)]

http://forums.java.net/jive/thread.jspa?messageID=221233