• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Configure to MS SQL Server 6.5

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm new to JBoss, and attempting to connect it to our MS SQL Server 6.5 database. I'm following the great examples from the O'Reilly JBoss Workbook, appendix A (simple example).
JBoss: jboss-3.2.1_tomcat-4.1.24
OS: Win2K
JDBC Driver: JSQLConnect 2_26
I modified the titandb-ds.xml file, using the examples\jca mssql-ds.xml example, as below, and deployed to the deploy directory:
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://QA_DATABASE:1433;DatabaseName=qa_customers</connection-url>
<driver-class>com.jnetdirect.jsql.JSQLDriver</driver-class>
<user-name>uname</user-name>
<password>pw</password>
</local-tx-datasource>
</datasources>

And finally, my jbosscmp-jdbc.xml stuff (I don't know what to put for the datasource-mapping tag, thus the -???- here):
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSSQLDS</datasource>
<datasource-mapping> -???- </datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
</defaults>
<enterprise-beans>
<entity>
(snip)
</entity>
</enterprise-beans>
</jbosscmp-jdbc>
I have copied the JDBC driver jar (JSQLConnect.jar) into jboss\server\default\lib directory. And this jar file is in my classpath too.
Other than the table definition and the JDBC driver, everything else is as in the O'Reilly Appendix A example. The -ds.xml file has also been copied to the deploy directory.
When deploying my application jar, JBoss throws the following exception:
[ObjectName: jboss.j2ee:jndiName=StatesHomeRemote,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc
.xml : datasource-mapping -???- not found]
Of course, -???- is just for this post. I've tried several different values (MSSQL, MS SQLServer, etc.), to no avail. The O'Reilly example just puts "Oracle8" there, without explaining why (simple example).
I'm sure I'm missing some step, some linking XML file between JBoss and my JDBC driver, or something. I just don't know what, yet.
Thanks in advance,
Rick
 
Rick Feenstr
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it working, see https://coderanch.com/t/88393/JBoss/jbosscmp-jdbc-xml-datasource-mapping
 
reply
    Bookmark Topic Watch Topic
  • New Topic