jdbc sql server connection problem

I have this code in one of my services. The same connection

string and supporting lines are also in a java program that

works from the unix command line. In my log I see made it here

1 and made it here 2.2 but not made it here 3. Nothing is

getting caught in the catch. If I change the database name or

any of the other values a sql exception is thrown telling me

that the value I changed is incorrect. I put in a piece of code

to display the classpath and the sqljdbc.jar is in the path.

Why is this not working in caps like it is on the command line?

log_it( "MADE IT HERE 1" );

// Class.forName(

"com.SeeBeyond.jdbcx.sqlserver.SQLServerDataSource" );

Class.forName(

"com.microsoft.sqlserver.jdbc.SQLServerDriver" );

log_it( "MADE IT HERE 2.2" );

// log_it( "class path=" +

System.getProperty( "java.class.path" ) );

Connection con = DriverManager.getConnection(

"jdbc:sqlserver://chs_apps_3:1433;databaseName=EgateMonitor1;use

r=egate;password=egate" );

// Connection con =

DriverManager.getConnection(

"jdbc:sqlserver://chs_apps_31:1433", "egate", "egate" );

log_it( "MADE IT HERE 3" );

Statement stmt = con.createStatement();

ResultSet rs = stmt.executeQuery( "SELECT

COUNT(*) AS Expr1 FROM caps_threshold WHERE (component_name='" +

collabName + "')" );

rs.next();

int query_count = rs.getInt( "Expr1" );

[1493 byte] By [bgollifer2105] at [2007-11-26 8:42:21]
# 1

I also found this error in the server.log that I dont understand.

[#|2006-07-14T07:08:34.365-0500|INFO|IS5.1|AlertTest.CMap1_Service1.AlertTest_R untime_Handler|_ThreadID=173; ThreadName=JMS Async S82041; Context=prjTCPIP_u002F_AlertTest2091233776/tpNOTIFICATION_CMap1_Service1_ejb;| -- Transaction will be rolled back--|#]

[#|2006-07-14T07:08:34.402-0500|SEVERE|IS5.1|AlertTest.CMap1_Service1.AlertTest _Runtime_Handler|_ThreadID=173; ThreadName=JMS Async S82041; Context=prjTCPIP_u002F_AlertTest2091233776/tpNOTIFICATION_CMap1_Service1_ejb;|c om.stc.codegen.framework.runtime.RequestException: java/nio/charset/Charset

(Duplicate stacktrace omitted; refer to previous log record identified by stacktrace-id=0)

|#]

[#|2006-07-14T07:08:34.404-0500|SEVERE|IS5.1|AlertTest.CMap1_Service1.AlertTest _Runtime_Handler|_ThreadID=173; ThreadName=JMS Async S82041; Context=prjTCPIP_u002F_AlertTest2091233776/tpNOTIFICATION_CMap1_Service1_ejb;|j ava/nio/charset/Charset

(Duplicate stacktrace omitted; refer to previous log record identified by stacktrace-id=1)

|#]

bgollifer2105 at 2007-7-6 22:21:48 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...