This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot deploy simple WS in eclipse

 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to add one additional line like this:
<jndi-name>T2Datasource</jndi-name>
<use-java-context>false</use-java-context>
...
 
Bobby Anderson
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic