think i am getting this error because of the jvm i am running. can i use
this driver on a jboss server that only support jvm 1.3?
setup as follows:
mssql.xml in jboss\server\deploy directory -
<?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| ===================================================================== -->
| <!--
-->
| <!-- JBoss Server MSSQL data source Configuration -->
| <!--
-->
| <!--
| ===================================================================== -->
|
| <datasources>
| <local-tx-datasource>
| <!-- This represents customer #1 -->
| <jndi-name>mssql1</jndi-name>
|
<connection-url>jdbc:sqlserver://192.168.0.146:1433;user=user;password=password;DatabaseName=ivr1</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| </local-tx-datasource>
| </datasources>
code:
/**
| * Returns a connection based on a context. Only used in class.
| */
| private static void getConnection() {
| final String METH_NAME = "DbConnection::getConnection() ";
|
| try {
| logger.debug(METH_NAME + ", Trying to get context: " + context);
| Context ctx = new InitialContext();
| DataSource ds = (DataSource) ctx.lookup(context);
| conn = ds.getConnection();
| } catch (SQLException e) {
| errorCount++;
| logger.error(METH_NAME + ", errorCount = " + errorCount);
| logger.error(METH_NAME + ", " + e);
| } catch (NamingException e) {
| errorCount++;
| logger.error(METH_NAME + ", errorCount = " + errorCount);
| logger.error(METH_NAME + ", " + e);
| }
| }
context:
// contexts
| final static String CONTEXT1 = "java:/mssql1";
error from Jboss:
blah blah... , javax.naming.NameNotFoundException: mssql1 not bound
thanks to all!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922308#3922308
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922308
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user