Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ms sql server2000 and jboss

 
alec stewart stewart
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am encountring the following problem
org.jboss.deployment.DeploymentException: Error: can't find data
source: SQLServerPool; - nested throwable: (javax.naming.NameNotFoundException:
SQLServerPool not bound)]


here are my following jbosscmp-jdbc.xml and mssql-ds.xml in the meta-inf folder

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC
"-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">
<jbosscmp-jdbc>
<defaults>
<datasource>SQLServerPool</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<pk-constraint>true</pk-constraint>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>Story</ejb-name>
<table-name>story</table-name>
<cmp-field>
<field-name>storyId</field-name>
<column-name>story_id</column-name>
<not-null/>
</cmp-field>
<cmp-field>
<field-name>pubDate</field-name>
<column-name>pub_date</column-name>
<not-null/>
</cmp-field>
</entity>
</enterprise-beans>
</jbosscmp-jdbc>





<?xml version="1.0" encoding="UTF-8"?>
<!-- ========================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ========================================================== -->
<!-- $Id: mysql-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ -->
<!-- ========================================================== -->
<!-- Datasource config for MySQL using 2.0.11 driver -->
<!-- ========================================================== -->

<datasources>
<local-tx-datasource>
<jndi-name>java:/SQLServerPool</jndi-name>
<connection-url>jdbc:JSQLConnect://localhost:1433;DatabaseName=jbossdb</connection-url>
<driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->

<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->

</local-tx-datasource>

</datasources>
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense. You seem to have named your DataSource "java:/SQLServerPool". Try "SQLServerPool" instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic