views:

2918

answers:

5

Dears,

I used NetBeans to create a Metro Web service and GlassFish to be deployed on. I get an error when I try to build -but only- if one of the operations in the web service return an Object instead of primitive types or String.

the Error is

Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext
build-impl.xml:569: The module has not been deployed.
BUILD FAILED (total time: 2 seconds)

the contain this

<target if="netbeans.home" name="-run-deploy-nb">
    <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
</target>

help me please

A: 

I found the Solution..

The class I am returning has a public value also, set and get so delete them and worked fine

Sulaiman
+2  A: 

This thread is also a good illustration of your problem:

The problem is that the custom class has public access for the properties and also it has getter/setter methods.
I discover because you can use Netbeans to generate the WSDL files for the Webservice to inspect them. Doing so it returned the detailed error.
If you want to use it, write your Web Service, then go to "Web Services" node, select your Web Service, right click it and select "Generate and Copy WSDL".

You can find some practical advices here on the definition of your object.

And of course you still have the Java Web Service Tutorial exposing the Requirements of a JAX-WS Endpoint.

VonC
A: 

you is the man brother. Solve my problem too. I have a bussiness class whith the properties public end the methods get and set. I change for private and solve. tanks!!!

A: 

Excellent you and your answer !!

Willy
A: 

Worked for me too. I had a public method which wasn't a WebMethod, and which throws SQLException. NetBeans started complaining that SQLException didn't have a default constructor.

cs94njw