aspose file tools*
The moose likes JBoss/WildFly and the fly likes Binding problem to a remote SQL2000 Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Binding problem to a remote SQL2000 Server" Watch "Binding problem to a remote SQL2000 Server" New topic
Author

Binding problem to a remote SQL2000 Server

Vinod Kumar D
Greenhorn

Joined: Apr 02, 2004
Posts: 3
Im a newbie and Ive a problem when i try to connect to a SQL2000 server from my bean in jboss. I get the error that the datasource is not bound.
My jbosscmp-jdbc.xml is as follows :
<jbosscmp-jdbc>
<defaults>
<datasource>MSSQLDS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>Plant</ejb-name>
<table-name>PLANT</table-name>
<cmp-field>
<field-name>PLANTID</field-name>
<column-name>PLANTID</column-name>
</cmp-field>
.
.
.
.
.
</entity>
</enterprise-beans>
</jbosscmp-jdbc>
Am I missing something here. Im not sure if the tag value is fully qualified MSSQLDS.
In the jboss-3.2.3\server\default\deploy\mssql-ds.xml I have,
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://servername:1433;DatabaseName=somedb</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
Isnt that definition complete?
What more do I need to do ?
Any help would be greatly appreciated !
Thanx.
-Vinod
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Try "java:/MSSQLDS" as the JNDI name
Vinod Kumar D
Greenhorn

Joined: Apr 02, 2004
Posts: 3
Thanx Norman !
Now things work. Was it because the jndi was not able to resolve 'java' as the default namespace?
 
Don't get me started about those stupid light bulbs.
 
subject: Binding problem to a remote SQL2000 Server