NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Error with Web Service Deployment

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jason88



Joined: 27 Apr 2009
Posts: 2

PostPosted: Mon Apr 27, 2009 4:53 pm    Post subject: Error with Web Service Deployment Reply with quote

Hi I'm a little new to netbeans in terms of using it for web based operations so I was following a tutorial on web services and I'm having trouble deploying a web service on GlassFish V2.

The error states:
Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext
C:\...(path to file)....\nbproject\build-impl.xml:546: The module has not been deployed.

which links to this line:
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>

The tutorial I was following is: http://blogs.sun.com/jonasdias/entry/webservices_with_jsp_on_netbeans

My code is exactly the same as the source on the site, I even copied and pasted the exact code to test and make sure I didn't make an error myself. Netbeans also doesn't show any errors except when I try to run the service.

Any help would be greatly appreciated. Thanks
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Mon Apr 27, 2009 9:19 pm    Post subject: Error with Web Service Deployment Reply with quote

Can you please check if the tutorial you're using has a feedback? If so, please post a feedback there and someone will certainly get in touch. Thanks.


From: jason88 <address-removed>
To: address-removed
Sent: Monday, April 27, 2009 11:53:24 AM
Subject: [nbj2ee] Error with Web Service Deployment

Hi I'm a little new to netbeans in terms of using it for web based operations so I was following a tutorial on web services and I'm having trouble deploying a web service on GlassFish V2.



The error states:

Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext

C:\...(path to file)....\nbproject\build-impl.xml:546: The module has not been deployed.



which links to this line:

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>



The tutorial I was following is: http://blogs.sun.com/jonasdias/entry/webservices_with_jsp_on_netbeans



My code is exactly the same as the source on the site, I even copied and pasted the exact code to test and make sure I didn't make an error myself. Netbeans also doesn't show any errors except when I try to run the service.



Any help would be greatly appreciated. Thanks
Back to top
Jeff Rubinoff
Posted via mailing list.





PostPosted: Mon Apr 27, 2009 11:19 pm    Post subject: Error with Web Service Deployment Reply with quote

jason,
What JDK are you using? There is a problem with wsgen if you are using NetBeans with JDK 6 older than Update 7. NetBeans uses a newer JAXB than what is on your JDK. To solve that problem, update your JDK (Update 13 works fine).

I've just gone through the "tutorial" on NetBeans 6.5.1, and I got it to work, but I have some experience in writing simple JAX-WS services and clients.
(Note: Jason was using a blog entry from a campus ambassador, not an official NetBeans tutorial, so he has no feedback button...)
The blogger has written an interesting article, but he's left out a lot of steps. If you are new to web services on NetBeans, I strongly suggest you first try some of the NetBeans tutorials, available at http://www.netbeans.org/kb/trails/java-ee.html. Getting Started With JAX-WS Web Services, http://www.netbeans.org/kb/docs/websvc/jax-ws.html, covers almost exactly the same material as the blog entry.
Jason, what version of NB are you using? I see that the blog entry was written for 6.1. If you have to use NetBeans 6.1, those tutorials are archived at http://www.netbeans.org/kb/61/javaee/index.html.

Jeff

Melongo Annabel wrote:
Quote:
Can you please check if the tutorial you're using has a feedback? If so, please post a feedback there and someone will certainly get in touch. Thanks.


From: jason88 <address-removed> ([email]address-removed[/email])
To: address-removed ([email]address-removed[/email])
Sent: Monday, April 27, 2009 11:53:24 AM
Subject: [nbj2ee] Error with Web Service Deployment

Hi I'm a little new to netbeans in terms of using it for web based operations so I was following a tutorial on web services and I'm having trouble deploying a web service on GlassFish V2.



The error states:

Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext

C:\...(path to file)....\nbproject\build-impl.xml:546: The module has not been deployed.



which links to this line:

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>



The tutorial I was following is: http://blogs.sun.com/jonasdias/entry/webservices_with_jsp_on_netbeans



My code is exactly the same as the source on the site, I even copied and pasted the exact code to test and make sure I didn't make an error myself. Netbeans also doesn't show any errors except when I try to run the service.



Any help would be greatly appreciated. Thanks








Back to top
mkuchtiak
Posted via mailing list.





PostPosted: Tue Apr 28, 2009 12:06 pm    Post subject: Error with Web Service Deployment Reply with quote

I've gone through the tutorial as well (with Netbeans 6.7). No problem.
Please make sure there is no additional library added to project
(project properties | Libraries section)
GlassFish V2 should work fine.

Milan

Jeff Rubinoff wrote:
Quote:
jason,
What JDK are you using? There is a problem with wsgen if you are using
NetBeans with JDK 6 older than Update 7. NetBeans uses a newer JAXB
than what is on your JDK. To solve that problem, update your JDK
(Update 13 works fine).

I've just gone through the "tutorial" on NetBeans 6.5.1, and I got it
to work, but I have some experience in writing simple JAX-WS services
and clients.
(Note: Jason was using a blog entry from a campus ambassador, not an
official NetBeans tutorial, so he has no feedback button...)
The blogger has written an interesting article, but he's left out a
lot of steps. If you are new to web services on NetBeans, I strongly
suggest you first try some of the NetBeans tutorials, available at
http://www.netbeans.org/kb/trails/java-ee.html. Getting Started With
JAX-WS Web Services,
http://www.netbeans.org/kb/docs/websvc/jax-ws.html, covers almost
exactly the same material as the blog entry.
Jason, what version of NB are you using? I see that the blog entry was
written for 6.1. If you have to use NetBeans 6.1, those tutorials are
archived at http://www.netbeans.org/kb/61/javaee/index.html.

Jeff

Melongo Annabel wrote:
Quote:
Can you please check if the tutorial you're using has a feedback? If
so, please post a feedback there and someone will certainly get in
touch. Thanks.

------------------------------------------------------------------------
*From:* jason88 <address-removed>
*To:* address-removed
*Sent:* Monday, April 27, 2009 11:53:24 AM
*Subject:* [nbj2ee] Error with Web Service Deployment

Hi I'm a little new to netbeans in terms of using it for web based
operations so I was following a tutorial on web services and I'm
having trouble deploying a web service on GlassFish V2.



The error states:

Deploying application in domain failed; Deployment Error -- Exception
occured in the wsgen process javax.xml.ws
<http://javax.xml.ws>.WebServiceException: Unable to create JAXBContext

C:\...(path to file)....\nbproject\build-impl.xml:546: The module has
not been deployed.



which links to this line:

<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false"
forceRedeploy="${forceRedeploy}"/>



The tutorial I was following is:
http://blogs.sun.com/jonasdias/entry/webservices_with_jsp_on_netbeans



My code is exactly the same as the source on the site, I even copied
and pasted the exact code to test and make sure I didn't make an
error myself. Netbeans also doesn't show any errors except when I
try to run the service.



Any help would be greatly appreciated. Thanks





Back to top
sbanda



Joined: 19 Nov 2009
Posts: 5
Location: donotknow

PostPosted: Thu Nov 19, 2009 4:02 pm    Post subject: Can we NOT return a java.sql.Connection type Object from a Webservice? Reply with quote

Hi,

I am using Netbeans IDE 6.5.1 with Glass Fish V2. I am trying to write a webservice which can be used to
1. connect to the MySQL database
2. return the java.sql.Connection object back

However I am getting the below shown error while I am trying to "deploy" the webservice into GF 2. The webservice is being built successfully, though.

Error I am getting:
---------------------
Deploying application in domain failed; Deployment Error -- Exception occured in the wsgen process javax.xml.ws.WebServiceException: Unable to create JAXBContext
E:\Interstate\Academic Projects\IWDM\Java\iwdm\nbproject\build-impl.xml:546: The module has not been deployed.
BUILD FAILED (total time: 2 seconds)

Here is the code given below.

/**
* Web service operation
*/
@WebMethod(operationName = "opConnect")
public Connection opConnect(@WebParam(name = "strDriver")
String strDriver, @WebParam(name = "strURL")
String strURL, @WebParam(name = "intPort")
String intPort, @WebParam(name = "strHost")
String strHost, @WebParam(name = "strUserName")
String strUserName, @WebParam(name = "strPasscode")
String strPasscode)
{

// MySQL database connection handle
java.sql.Connection connMysqlHandle = null;
try
{
// Get an instance of the database driver - "com.mysql.jdbc.Driver"
Class.forName(strDriver).newInstance();

// Should be jdbc:mysql://localhost:3306 by now
strURL = strURL + strHost + ":" + intPort;

// Try connecting to the database
connMysqlHandle = DriverManager.getConnection(strURL,strUserName,strPasscode);
}
catch (Exception e)
{
System.out.println("Error Connecting to database. Bye");
e.printStackTrace();
}
return connMysqlHandle;
}

Please note that if I replace the return type of opConnect to any primitive data type like java.lang.String or java.lang.Int or anything like that, the deployment is going through. It is therefore proved that the deployment is failing only and only when I try to return an object of type java.sql.Connection. Any clue on this is highly appreciated.

Thanks
Suresh
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo