This content has been marked as final.
Show 2 replies
-
1. Re: Can't use MySql under JBOSSWS (Works under JBOSS)
peterj Apr 7, 2009 11:23 AM (in response to cshannon)have added the resource information to the web.xml and the jboss-web.xml files in the jbossws-sar
Try adding it to the WEB-INF directory in your WAR file. (I assume you have a POJO-based web service and not an EJB-based web service.)
If that doesn't work, post the full stack trace and the contents of the web.xml and jboss-web.xml file. And let us know what kind of web service you have. -
2. Re: Can't use MySql under JBOSSWS (Works under JBOSS)
cshannon Apr 7, 2009 8:18 PM (in response to cshannon)Thanks for taking a look at this. The resource ref is in my web.xml file, like I said it works perfectly under JBOSS, the webservice I am doing is just a helloworld, the only difference is that I try to connect to the database. All code that works fine. It is some kind of configuration problem.
web.xml<web-app> <resource-ref> <description>MySql Dataset Definition</description> <res-ref-name>jdbc/MySqlDS</res-ref-name> <jndi-name>java:/MySqlDS</jndi-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <display-name>postSubmission</display-name> </web-app>
and my jboss-web.xml<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd"> <jboss-web> <!-- A security domain that restricts access <security-domain>java:/jaas/JBossWS</security-domain> --> <context-root>jbossws</context-root> <resource-ref> <res-ref-name>jdbc/MySqlDS</res-ref-name> <jndi-name>java:/MySqlDS</jndi-name> </resource-ref> </jboss-web>
It's like JBOSSWS cant find the mysql-ds.xml or something. I tried to copy that into the jbossws deployment folder but then it error-ed out saying that it was already defined.