File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes Cannot deploy simple WS in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Cannot deploy simple WS in eclipse" Watch "Cannot deploy simple WS in eclipse" New topic
Author

Cannot deploy simple WS in eclipse

Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
I am trying to deploy a simple web service using eclipse v3.4. I am running into a problem with hibernate I think.

When I deploy I get the following error:
10:29:41,398 FATAL [DatasourceConnectionProvider] Could not find datasource: java:/T2Datasource
javax.naming.NameNotFoundException: T2Datasource not bound

Here is ds.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>

<local-tx-datasource>
<jndi-name>T2Datasource</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>admin</password>
<!--
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
-->
</local-tx-datasource>

</datasources>

I can do a successful test connection to the test DB using eclipse and that works, so I am not really sure what my problem is.

I have found a ton of posts on this error throughout the web but none of them explain what the problem is.

Any ideas would be greatly appreciated!

Thanks
Billy
David Young
Greenhorn

Joined: Apr 01, 2005
Posts: 4
Try to add one additional line like this:
<jndi-name>T2Datasource</jndi-name>
<use-java-context>false</use-java-context>
...
Bobby Anderson
Ranch Hand

Joined: Oct 28, 2008
Posts: 114
Crossed my fingers and tried it out, but no luck same exact error message. I am very new to java and I have been hitting my head against the wall on this one for over 2 weeks.

I am using eclipse to create a dynamic web project but cannot even publish the default project with no changes without this error. One of my problems stems from the fact the eclipse FORCES me to choose a DB connection when I create a dynamic web project. Well that just seems wrong becuase I do not even need a DB to create a simple hello world web service. Regardless even with the DB setup I cannot deploy.

Anyone else run into this or have any other ideas.

Again I am using eclipse 3.4, with JBOSS 4.2.x, and mySQL 5.1

Thanks again, and please help I am STUCK!

Billy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot deploy simple WS in eclipse