Home > Archive > SQL Server JDBC > February 2006 > mssql jdbc 2005 driver and Jboss 3.2.1 w/ jvm 1.3.1_12









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mssql jdbc 2005 driver and Jboss 3.2.1 w/ jvm 1.3.1_12
Tharon LeBlanc

2006-02-08, 9:23 am

i 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;p
assword=password;Dat
abaseName=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::getCon
nection() ";

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. NameNotFoundExceptio
n: mssql1 not bound

thanks to all!



Angel Saenz-Badillos[MS]

2006-02-08, 1:23 pm

Tharon,
You are correct, this driver only supports jvm 1.4 and up:
http://www.microsoft.com/downloads/...&displaylang=en

System Requirement:
Java Development Kit: 1.4 or later

--
Angel Saenz-Badillos [MS] DataWorks
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging: http://weblogs.asp.net/angelsb/




"Tharon LeBlanc" <tleblanc@milsoft.com> wrote in message
news:%23SokG7LLGHA.1124@TK2MSFTNGP10.phx.gbl...
>i 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
> -->
>
> -->
> <!--
> ====================
====================
====================
========= -->
>
> <datasources>
> <local-tx-datasource>
> <!-- This represents customer #1 -->
> <jndi-name>mssql1</jndi-name>
>
> <connection-url>jdbc:sqlserver://192.168.0. 146:1433;user=user;p
assword=password;Dat
abaseName=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::getCon
nection() ";
>
> 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. NameNotFoundExceptio
n: mssql1 not bound
>
> thanks to all!
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com