abooysen2
asked on
Error Received when Connection to the SQL DB
HI Experts
I am converted a project from a ear file and running the project on my local machine. When running this or getting information from the DB i am getting the following Error.
I check that the ds.xml file is on the \server\default\deploy path.
I am converted a project from a ear file and running the project on my local machine. When running this or getting information from the DB i am getting the following Error.
I check that the ds.xml file is on the \server\default\deploy path.
10:09:51,485 ERROR [STDERR] Debug: Search Query = select * from TicketArchive where UPPER(user_name) like UPPER('%yn%') order by ticket_date desc, deal_id desc
10:10:27,191 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
at web.FindDeal.getSearchDeals(FindDeal.java:170)
at web.FindDeal.doGet(FindDeal.java:72)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:489)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)
... 34 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:474)
... 35 more
10:10:28,519 ERROR [STDERR] org.jboss.util.NestedSQLException: Unable to get managed connection for SqlServerDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SqlServerDS)
10:10:28,519 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
10:10:28,519 ERROR [STDERR] at web.FindDeal.getSearchDeals(FindDeal.java:170)
10:10:28,519 ERROR [STDERR] at web.FindDeal.doGet(FindDeal.java:72)
10:10:28,535 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
10:10:28,535 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
10:10:28,535 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
10:10:28,535 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:10:28,535 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:10:28,535 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:10:28,535 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:10:28,550 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
10:10:28,550 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
10:10:28,550 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
10:10:28,550 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
10:10:28,550 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
10:10:28,550 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
10:10:28,566 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
10:10:28,566 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
10:10:28,566 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
10:10:28,566 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
10:10:28,566 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
10:10:28,566 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
10:10:28,566 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
10:10:28,582 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
10:10:28,582 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
10:10:28,582 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
10:10:28,582 ERROR [STDERR] Caused by: javax.resource.ResourceException: Unable to get managed connection for SqlServerDS
10:10:28,582 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)
10:10:28,597 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
10:10:28,597 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
10:10:28,597 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
10:10:28,597 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
10:10:28,597 ERROR [STDERR] ... 25 more
10:10:28,597 ERROR [STDERR] Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver))
10:10:28,613 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
10:10:28,613 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
10:10:28,613 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
10:10:28,613 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
10:10:28,613 ERROR [STDERR] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
10:10:28,613 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
10:10:28,628 ERROR [STDERR] ... 29 more
10:10:28,628 ERROR [STDERR] Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver)
10:10:28,628 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:489)
10:10:28,628 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)
10:10:28,628 ERROR [STDERR] ... 34 more
10:10:28,628 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
10:10:28,644 ERROR [STDERR] at java.net.URLClassLoader$1.run(Unknown Source)
10:10:28,644 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
10:10:28,644 ERROR [STDERR] at java.net.URLClassLoader.findClass(Unknown Source)
10:10:28,644 ERROR [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
10:10:28,644 ERROR [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
10:10:28,644 ERROR [STDERR] at java.lang.ClassLoader.loadClassInternal(Unknown Source)
10:10:28,644 ERROR [STDERR] at java.lang.Class.forName0(Native Method)
10:10:28,644 ERROR [STDERR] at java.lang.Class.forName(Unknown Source)
10:10:28,644 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:474)
10:10:28,644 ERROR [STDERR] ... 35 more
10:10:30,535 ERROR [STDERR] Debug: Got an exception! org.jboss.util.NestedSQLException: Unable to get managed connection for SqlServerDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for SqlServerDS)
10:10:33,597 ERROR [STDERR] Debug: result.jsp :: dealresult=null
10:10:33,597 ERROR [STDERR] java.lang.NullPointerException
10:10:33,597 ERROR [STDERR] at web.FindDeal.doGet(FindDeal.java:102)
10:10:33,597 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
10:10:33,597 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
10:10:33,597 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
10:10:33,597 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
10:10:33,597 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
10:10:33,597 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
10:10:33,597 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
10:10:33,597 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
10:10:33,597 ERROR [STDERR] Debug: Cannot forward after response has been committedjava.lang.IllegalStateException: Cannot forward after response has been committed
You need to add the driver jar to JBoss
the jdbc driver is not available
where have you put the jars?
where have you put the jars?
Place the driver for - com.microsoft.sqlserver.jd bc.SQLServ erDriver in the server/lib directory of jboss
think the jdbc drivers need to be in put in /server/default/lib of your jboss installation
ASKER
Hi
Check the folder jboss-5.1.0.GA\server\defa ult\lib it is empty.
Question does the download of jboss not come with the *'jars that it needs?
Where can I download the *.jar
Check the folder jboss-5.1.0.GA\server\defa
Question does the download of jboss not come with the *'jars that it needs?
Where can I download the *.jar
That's not part of JBoss. Your db should probably have the jdbc driver you need
no;
http://support.microsoft.com/kb/313100 shows the sort of jars you should be looking for
> Question does the download of jboss not come with the *'jars that it needs?
it does comes with the jars it needs
the jdbc driver is required by your application, not jboss
you can download the driver from MS
it does comes with the jars it needs
the jdbc driver is required by your application, not jboss
you can download the driver from MS
ASKER
Hi
Download the sqljdbc_3.0.1301.101_enu.e xe followed in instructions in enu\help\default.htm documents.
Please noted I extracted the *.exe in
Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu
and updated my environment variables
After this I run a test class and received this Error
java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver:/ /server est:1433;databaseName=MMTi cket;selec tMethod=cu rsor;Error Trace in getConnection() : No suitable driver found for jdbc:microsoft:sqlserver:/ /server1 est:1433;databaseName=DBNA ME;selectM ethod=curs or;
at java.sql.DriverManager.get Connection (DriverMan ager.java: 602)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 185)
at connectionTest.Connect.get Connection (Connect.j ava:26)
at connectionTest.Connect.dis playDbProp erties(Con nect.java: 43)
at connectionTest.Connect.mai n(Connect. java:79)
Error: No active Connection
Download the sqljdbc_3.0.1301.101_enu.e
Please noted I extracted the *.exe in
Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu
and updated my environment variables
After this I run a test class and received this Error
java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver:/
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at connectionTest.Connect.get
at connectionTest.Connect.dis
at connectionTest.Connect.mai
Error: No active Connection
package connectionTest;
public class Connect{
private java.sql.Connection con = null;
private final String url = "jdbc:microsoft:sqlserver://";
private final String serverName= "server\server";
private final String portNumber = "port";
private final String databaseName= "DBNAME";
private final String userName = "USERNAME";
private final String password = "password";
// Informs the driver to use server a side-cursor,
// which permits more than one active statement
// on a connection.
private final String selectMethod = "cursor";
// Constructor
public Connect(){}
private String getConnectionUrl(){
return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
}
private java.sql.Connection getConnection(){
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
}
return con;
}
/*
Display the driver properties, database details
*/
public void displayDbProperties(){
java.sql.DatabaseMetaData dm = null;
java.sql.ResultSet rs = null;
try{
con= this.getConnection();
if(con!=null){
dm = con.getMetaData();
System.out.println("Driver Information");
System.out.println("\tDriver Name: "+ dm.getDriverName());
System.out.println("\tDriver Version: "+ dm.getDriverVersion ());
System.out.println("\nDatabase Information ");
System.out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
System.out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
System.out.println("Avalilable Catalogs ");
rs = dm.getCatalogs();
while(rs.next()){
System.out.println("\tcatalog: "+ rs.getString(1));
}
rs.close();
rs = null;
closeConnection();
}else System.out.println("Error: No active Connection");
}catch(Exception e){
e.printStackTrace();
}
dm=null;
}
private void closeConnection(){
try{
if(con!=null)
con.close();
con=null;
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] args) throws Exception
{
Connect myDbTest = new Connect();
myDbTest.displayDbProperties();
}
}
Did you put the necessary jars in JBOss?
sounds like a problem in your connection string.
make sure its pointing at the correct server and database
make sure its pointing at the correct server and database
> jdbc:microsoft:sqlserver:
don't think microsoft should be in there
don't think microsoft should be in there
ASKER
I placed the sqljdbc4.jar and sqljdbc.jar in the \server\default\lib directory.
I then change
from
jdbc:microsoft:sqlserver:/ /"
to
"jdbc:sqlserver://";
but received Error
02 Aug 2010 11:47:35 AM com.microsoft.sqlserver.jd bc.SQLServ erConnecti on <init>
SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
java.lang.UnsupportedOpera tionExcept ion: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
at com.microsoft.sqlserver.jd bc.SQLServ erConnecti on.<init>( SQLServerC onnection. java:238)
at com.microsoft.sqlserver.jd bc.SQLServ erDriver.c onnect(SQL ServerDriv er.java:84 1)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 582)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 185)
at connectionTest.Connect.get Connection (Connect.j ava:26)
at connectionTest.Connect.dis playDbProp erties(Con nect.java: 43)
at connectionTest.Connect.mai n(Connect. java:79)
Error Trace in getConnection() : Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Error: No active Connection
java version from cmd
java version "1.5.0_20"
I then change
from
jdbc:microsoft:sqlserver:/
to
"jdbc:sqlserver://";
but received Error
02 Aug 2010 11:47:35 AM com.microsoft.sqlserver.jd
SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
java.lang.UnsupportedOpera
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at connectionTest.Connect.get
at connectionTest.Connect.dis
at connectionTest.Connect.mai
Error Trace in getConnection() : Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Error: No active Connection
java version from cmd
java version "1.5.0_20"
> I placed the sqljdbc4.jar and sqljdbc.jar in the \server\default\lib directory.
you don't need to for testing. It was already loading the driver
But you're problem is you have includes both jars, you only want one
If you're using java 5 then use sqljdbc.jar
you don't need to for testing. It was already loading the driver
But you're problem is you have includes both jars, you only want one
If you're using java 5 then use sqljdbc.jar
use sqljdbc4.jar
> use sqljdbc4.jar
only use that if you're running java 6, which you mentioned above that you weren't
only use that if you're running java 6, which you mentioned above that you weren't
ASKER
when I tried using the sqljdbc.jar I get this error
02 Aug 2010 1:09:40 PM com.microsoft.sqlserver.jd bc.SQLServ erConnecti on <init>
SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
java.lang.UnsupportedOpera tionExcept ion: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
at com.microsoft.sqlserver.jd bc.SQLServ erConnecti on.<init>( SQLServerC onnection. java:238)
at com.microsoft.sqlserver.jd bc.SQLServ erDriver.c onnect(SQL ServerDriv er.java:84 1)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 582)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 185)
at connectionTest.Connect.get Connection (Connect.j ava:27)
at connectionTest.Connect.dis playDbProp erties(Con nect.java: 44)
at connectionTest.Connect.mai n(Connect. java:80)
Error Trace in getConnection() : Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Error: No active Connection
02 Aug 2010 1:09:40 PM com.microsoft.sqlserver.jd
SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
java.lang.UnsupportedOpera
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at connectionTest.Connect.get
at connectionTest.Connect.dis
at connectionTest.Connect.mai
Error Trace in getConnection() : Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
Error: No active Connection
>>Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
As i said, use sqljdbc4.jar
As i said, use sqljdbc4.jar
that suggests you are not using 1.5, but are actually running with java 6
In that case use sqljdbc4.jar as I explained earlier
In that case use sqljdbc4.jar as I explained earlier
ASKER
Seems to be getting a other Error now.
I consulted with the SQL DBA and I test a ODBC and it works fine. The port is 5001
com.microsoft.sqlserver.jd bc.SQLServ erExceptio n: The TCP/IP connection to the host SERVERNAME est, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
at com.microsoft.sqlserver.jd bc.SQLServ erExceptio n.makeFrom DriverErro r(SQLServe rException .java:171)
at com.microsoft.sqlserver.jd bc.SQLServ erConnecti on.connect Helper(SQL ServerConn ection.jav a:1033)
at com.microsoft.sqlserver.jd bc.SQLServ erConnecti on.login(S QLServerCo nnection.j ava:817)
at com.microsoft.sqlserver.jd bc.SQLServ erConnecti on.connect (SQLServer Connection .java:700)
at com.microsoft.sqlserver.jd bc.SQLServ erDriver.c onnect(SQL ServerDriv er.java:84 2)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 582)
at java.sql.DriverManager.get Connection (DriverMan ager.java: 185)
at connectionTest.Connect.get Connection (Connect.j ava:27)
at connectionTest.Connect.dis playDbProp erties(Con nect.java: 44)
at connectionTest.Connect.mai n(Connect. java:80)
Error Trace in getConnection() : The TCP/IP connection to the host SERVERNAME est, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
Error: No active Connection
I consulted with the SQL DBA and I test a ODBC and it works fine. The port is 5001
com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at com.microsoft.sqlserver.jd
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at connectionTest.Connect.get
at connectionTest.Connect.dis
at connectionTest.Connect.mai
Error Trace in getConnection() : The TCP/IP connection to the host SERVERNAME est, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
Error: No active Connection
Have you taken all the action suggested in the error message? If so, what were the results?
It cannot access the database where you have specified. check the database is up and running and listening on that port
ASKER
When I test this from my application
Here is the full Error from the console
13:54:34,886 ERROR [STDERR] Debug: Search Query = select * from TicketArchive where UPPER(user_name) like UPPER('%yn%') order by ticket_date desc, deal_id desc
13:54:38,433 WARN [ClassLoaderManager] Unexpected error during load of:com.microsoft.sqlserver .jdbc.SQLS erverDrive r
java.lang.UnsupportedClass VersionErr or: Bad version number in .class file
at java.lang.ClassLoader.defi neClass1(N ative Method)
at java.lang.ClassLoader.defi neClass(Un known Source)
at org.jboss.classloader.spi. base.BaseC lassLoader .access$20 0(BaseClas sLoader.ja va:63)
at org.jboss.classloader.spi. base.BaseC lassLoader $2.run(Bas eClassLoad er.java:57 2)
at org.jboss.classloader.spi. base.BaseC lassLoader $2.run(Bas eClassLoad er.java:53 2)
at java.security.AccessContro ller.doPri vileged(Na tive Method)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass Locally(Ba seClassLoa der.java:5 30)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass Locally(Ba seClassLoa der.java:5 07)
at org.jboss.classloader.spi. base.BaseD elegateLoa der.loadCl ass(BaseDe legateLoad er.java:13 4)
at org.jboss.classloader.spi. filter.Fil teredDeleg ateLoader. loadClass( FilteredDe legateLoad er.java:13 1)
at org.jboss.classloader.spi. base.Class LoadingTas k$ThreadTa sk.run(Cla ssLoadingT ask.java:4 52)
at org.jboss.classloader.spi. base.Class LoaderMana ger.nextTa sk(ClassLo aderManage r.java:251 )
at org.jboss.classloader.spi. base.Class LoaderMana ger.proces s(ClassLoa derManager .java:150)
at org.jboss.classloader.spi. base.BaseC lassLoader Domain.loa dClass(Bas eClassLoad erDomain.j ava:265)
at org.jboss.classloader.spi. base.BaseC lassLoader Domain.loa dClass(Bas eClassLoad erDomain.j ava:1119)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass FromDomain (BaseClass Loader.jav a:798)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass (BaseClass Loader.jav a:441)
at java.lang.ClassLoader.load Class(Unkn own Source)
at java.lang.ClassLoader.load ClassInter nal(Unknow n Source)
at java.lang.Class.forName0(N ative Method)
at java.lang.Class.forName(Un known Source)
at org.jboss.classloader.plug ins.loader .ClassLoad erToLoader Adapter.lo adClass(Cl assLoaderT oLoaderAda pter.java: 172)
at org.jboss.classloader.spi. ClassLoade rDomain.lo adClassFro mParent(Cl assLoaderD omain.java :352)
at org.jboss.classloader.spi. ClassLoade rDomain.lo adClassAft er(ClassLo aderDomain .java:323)
at org.jboss.classloader.spi. base.BaseC lassLoader Domain.loa dClass(Bas eClassLoad erDomain.j ava:275)
at org.jboss.classloader.spi. base.BaseC lassLoader Domain.loa dClass(Bas eClassLoad erDomain.j ava:1119)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass FromDomain (BaseClass Loader.jav a:798)
at org.jboss.classloader.spi. base.BaseC lassLoader .loadClass (BaseClass Loader.jav a:441)
at java.lang.ClassLoader.load Class(Unkn own Source)
at java.lang.ClassLoader.load Class(Unkn own Source)
at java.lang.ClassLoader.load ClassInter nal(Unknow n Source)
at java.lang.Class.forName0(N ative Method)
at java.lang.Class.forName(Un known Source)
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getDrive r(LocalMan agedConnec tionFactor y.java:474 )
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getLocal ManagedCon nection(Lo calManaged Connection Factory.ja va:206)
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.createMa nagedConne ction(Loca lManagedCo nnectionFa ctory.java :195)
at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .createCon nectionEve ntListener (InternalM anagedConn ectionPool .java:633)
at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .getConnec tion(Inter nalManaged Connection Pool.java: 267)
at org.jboss.resource.connect ionmanager .JBossMana gedConnect ionPool$Ba sePool.get Connection (JBossMana gedConnect ionPool.ja va:622)
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.getMan agedConnec tion(BaseC onnectionM anager2.ja va:404)
at org.jboss.resource.connect ionmanager .TxConnect ionManager .getManage dConnectio n(TxConnec tionManage r.java:381 )
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.alloca teConnecti on(BaseCon nectionMan ager2.java :496)
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2$Connec tionManage rProxy.all ocateConne ction(Base Connection Manager2.j ava:941)
at org.jboss.resource.adapter .jdbc.Wrap perDataSou rce.getCon nection(Wr apperDataS ource.java :89)
at web.FindDeal.getSearchDeal s(FindDeal .java:170)
at web.FindDeal.doGet(FindDea l.java:72)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 617)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 717)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:290 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
at org.jboss.web.tomcat.filte rs.ReplyHe aderFilter .doFilter( ReplyHeade rFilter.ja va:96)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:235 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:235)
at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:191)
at org.jboss.web.tomcat.secur ity.Securi tyAssociat ionValve.i nvoke(Secu rityAssoci ationValve .java:190)
at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:433)
at org.jboss.web.tomcat.secur ity.JaccCo ntextValve .invoke(Ja ccContextV alve.java: 92)
at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.pr ocess(Secu rityContex tEstablish mentValve. java:126)
at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.in voke(Secur ityContext Establishm entValve.j ava:70)
at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:127 )
at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:102 )
at org.jboss.web.tomcat.servi ce.jca.Cac hedConnect ionValve.i nvoke(Cach edConnecti onValve.ja va:158)
at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :109)
at org.apache.catalina.connec tor.Coyote Adapter.se rvice(Coyo teAdapter. java:330)
at org.apache.coyote.http11.H ttp11Proce ssor.proce ss(Http11P rocessor.j ava:829)
at org.apache.coyote.http11.H ttp11Proto col$Http11 Connection Handler.pr ocess(Http 11Protocol .java:598)
at org.apache.tomcat.util.net .JIoEndpoi nt$Worker. run(JIoEnd point.java :447)
at java.lang.Thread.run(Unkno wn Source)
13:54:38,464 WARN [JBossManagedConnectionPoo l] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossRe sourceExce ption: Could not create connection; - nested throwable: (org.jboss.resource.JBossR esourceExc eption: Failed to register driver for: com.microsoft.sqlserver.jd bc.SQLServ erDriver; - nested throwable: (java.lang.ClassNotFoundEx ception: com.microsoft.sqlserver.jd bc.SQLServ erDriver))
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getLocal ManagedCon nection(Lo calManaged Connection Factory.ja va:225)
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.createMa nagedConne ction(Loca lManagedCo nnectionFa ctory.java :195)
at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .createCon nectionEve ntListener (InternalM anagedConn ectionPool .java:633)
at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .getConnec tion(Inter nalManaged Connection Pool.java: 267)
at org.jboss.resource.connect ionmanager .JBossMana gedConnect ionPool$Ba sePool.get Connection (JBossMana gedConnect ionPool.ja va:622)
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.getMan agedConnec tion(BaseC onnectionM anager2.ja va:404)
at org.jboss.resource.connect ionmanager .TxConnect ionManager .getManage dConnectio n(TxConnec tionManage r.java:381 )
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.alloca teConnecti on(BaseCon nectionMan ager2.java :496)
at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2$Connec tionManage rProxy.all ocateConne ction(Base Connection Manager2.j ava:941)
at org.jboss.resource.adapter .jdbc.Wrap perDataSou rce.getCon nection(Wr apperDataS ource.java :89)
at web.FindDeal.getSearchDeal s(FindDeal .java:170)
at web.FindDeal.doGet(FindDea l.java:72)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 617)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 717)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:290 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
at org.jboss.web.tomcat.filte rs.ReplyHe aderFilter .doFilter( ReplyHeade rFilter.ja va:96)
at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:235 )
at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:235)
at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:191)
at org.jboss.web.tomcat.secur ity.Securi tyAssociat ionValve.i nvoke(Secu rityAssoci ationValve .java:190)
at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:433)
at org.jboss.web.tomcat.secur ity.JaccCo ntextValve .invoke(Ja ccContextV alve.java: 92)
at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.pr ocess(Secu rityContex tEstablish mentValve. java:126)
at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.in voke(Secur ityContext Establishm entValve.j ava:70)
at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:127 )
at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:102 )
at org.jboss.web.tomcat.servi ce.jca.Cac hedConnect ionValve.i nvoke(Cach edConnecti onValve.ja va:158)
at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :109)
at org.apache.catalina.connec tor.Coyote Adapter.se rvice(Coyo teAdapter. java:330)
at org.apache.coyote.http11.H ttp11Proce ssor.proce ss(Http11P rocessor.j ava:829)
at org.apache.coyote.http11.H ttp11Proto col$Http11 Connection Handler.pr ocess(Http 11Protocol .java:598)
at org.apache.tomcat.util.net .JIoEndpoi nt$Worker. run(JIoEnd point.java :447)
at java.lang.Thread.run(Unkno wn Source)
Caused by: org.jboss.resource.JBossRe sourceExce ption: Failed to register driver for: com.microsoft.sqlserver.jd bc.SQLServ erDriver; - nested throwable: (java.lang.ClassNotFoundEx ception: com.microsoft.sqlserver.jd bc.SQLServ erDriver)
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getDrive r(LocalMan agedConnec tionFactor y.java:489 )
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getLocal ManagedCon nection(Lo calManaged Connection Factory.ja va:206)
... 34 more
Caused by: java.lang.ClassNotFoundExc eption: com.microsoft.sqlserver.jd bc.SQLServ erDriver
at java.net.URLClassLoader$1. run(Unknow n Source)
at java.security.AccessContro ller.doPri vileged(Na tive Method)
at java.net.URLClassLoader.fi ndClass(Un known Source)
at java.lang.ClassLoader.load Class(Unkn own Source)
at java.lang.ClassLoader.load Class(Unkn own Source)
at java.lang.ClassLoader.load ClassInter nal(Unknow n Source)
at java.lang.Class.forName0(N ative Method)
at java.lang.Class.forName(Un known Source)
at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getDrive r(LocalMan agedConnec tionFactor y.java:474 )
... 35 more
13:54:40,308 ERROR [STDERR] org.jboss.util.NestedSQLEx ception: Unable to get managed connection for SqlServerDS; - nested throwable: (javax.resource.ResourceEx ception: Unable to get managed connection for SqlServerDS)
13:54:40,308 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.Wrap perDataSou rce.getCon nection(Wr apperDataS ource.java :95)
13:54:40,308 ERROR [STDERR] at web.FindDeal.getSearchDeal s(FindDeal .java:170)
13:54:40,308 ERROR [STDERR] at web.FindDeal.doGet(FindDea l.java:72)
13:54:40,308 ERROR [STDERR] at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 617)
13:54:40,308 ERROR [STDERR] at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 717)
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:290 )
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.filte rs.ReplyHe aderFilter .doFilter( ReplyHeade rFilter.ja va:96)
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:235 )
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:235)
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:191)
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyAssociat ionValve.i nvoke(Secu rityAssoci ationValve .java:190)
13:54:40,308 ERROR [STDERR] at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:433)
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.JaccCo ntextValve .invoke(Ja ccContextV alve.java: 92)
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.pr ocess(Secu rityContex tEstablish mentValve. java:126)
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.in voke(Secur ityContext Establishm entValve.j ava:70)
13:54:40,339 ERROR [STDERR] at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:127 )
13:54:40,339 ERROR [STDERR] at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:102 )
13:54:40,339 ERROR [STDERR] at org.jboss.web.tomcat.servi ce.jca.Cac hedConnect ionValve.i nvoke(Cach edConnecti onValve.ja va:158)
13:54:40,339 ERROR [STDERR] at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :109)
13:54:40,339 ERROR [STDERR] at org.apache.catalina.connec tor.Coyote Adapter.se rvice(Coyo teAdapter. java:330)
13:54:40,339 ERROR [STDERR] at org.apache.coyote.http11.H ttp11Proce ssor.proce ss(Http11P rocessor.j ava:829)
13:54:40,339 ERROR [STDERR] at org.apache.coyote.http11.H ttp11Proto col$Http11 Connection Handler.pr ocess(Http 11Protocol .java:598)
13:54:40,339 ERROR [STDERR] at org.apache.tomcat.util.net .JIoEndpoi nt$Worker. run(JIoEnd point.java :447)
13:54:40,339 ERROR [STDERR] at java.lang.Thread.run(Unkno wn Source)
13:54:40,339 ERROR [STDERR] Caused by: javax.resource.ResourceExc eption: Unable to get managed connection for SqlServerDS
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.getMan agedConnec tion(BaseC onnectionM anager2.ja va:441)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .TxConnect ionManager .getManage dConnectio n(TxConnec tionManage r.java:381 )
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.alloca teConnecti on(BaseCon nectionMan ager2.java :496)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2$Connec tionManage rProxy.all ocateConne ction(Base Connection Manager2.j ava:941)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.Wrap perDataSou rce.getCon nection(Wr apperDataS ource.java :89)
13:54:40,339 ERROR [STDERR] ... 25 more
13:54:40,339 ERROR [STDERR] Caused by: org.jboss.resource.JBossRe sourceExce ption: Could not create connection; - nested throwable: (org.jboss.resource.JBossR esourceExc eption: Failed to register driver for: com.microsoft.sqlserver.jd bc.SQLServ erDriver; - nested throwable: (java.lang.ClassNotFoundEx ception: com.microsoft.sqlserver.jd bc.SQLServ erDriver))
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getLocal ManagedCon nection(Lo calManaged Connection Factory.ja va:225)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.createMa nagedConne ction(Loca lManagedCo nnectionFa ctory.java :195)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .createCon nectionEve ntListener (InternalM anagedConn ectionPool .java:633)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .InternalM anagedConn ectionPool .getConnec tion(Inter nalManaged Connection Pool.java: 267)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .JBossMana gedConnect ionPool$Ba sePool.get Connection (JBossMana gedConnect ionPool.ja va:622)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect ionmanager .BaseConne ctionManag er2.getMan agedConnec tion(BaseC onnectionM anager2.ja va:404)
13:54:40,339 ERROR [STDERR] ... 29 more
13:54:40,339 ERROR [STDERR] Caused by: org.jboss.resource.JBossRe sourceExce ption: Failed to register driver for: com.microsoft.sqlserver.jd bc.SQLServ erDriver; - nested throwable: (java.lang.ClassNotFoundEx ception: com.microsoft.sqlserver.jd bc.SQLServ erDriver)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getDrive r(LocalMan agedConnec tionFactor y.java:489 )
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getLocal ManagedCon nection(Lo calManaged Connection Factory.ja va:206)
13:54:40,339 ERROR [STDERR] ... 34 more
13:54:40,339 ERROR [STDERR] Caused by: java.lang.ClassNotFoundExc eption: com.microsoft.sqlserver.jd bc.SQLServ erDriver
13:54:40,339 ERROR [STDERR] at java.net.URLClassLoader$1. run(Unknow n Source)
13:54:40,339 ERROR [STDERR] at java.security.AccessContro ller.doPri vileged(Na tive Method)
13:54:40,339 ERROR [STDERR] at java.net.URLClassLoader.fi ndClass(Un known Source)
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load Class(Unkn own Source)
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load Class(Unkn own Source)
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load ClassInter nal(Unknow n Source)
13:54:40,339 ERROR [STDERR] at java.lang.Class.forName0(N ative Method)
13:54:40,339 ERROR [STDERR] at java.lang.Class.forName(Un known Source)
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter .jdbc.loca l.LocalMan agedConnec tionFactor y.getDrive r(LocalMan agedConnec tionFactor y.java:474 )
13:54:40,339 ERROR [STDERR] ... 35 more
13:54:40,339 ERROR [STDERR] Debug: Got an exception! org.jboss.util.NestedSQLEx ception: Unable to get managed connection for SqlServerDS; - nested throwable: (javax.resource.ResourceEx ception: Unable to get managed connection for SqlServerDS)
13:54:40,652 ERROR [STDERR] Debug: result.jsp :: dealresult=null
13:54:40,652 ERROR [STDERR] java.lang.NullPointerExcep tion
13:54:40,652 ERROR [STDERR] at web.FindDeal.doGet(FindDea l.java:102 )
13:54:40,652 ERROR [STDERR] at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 617)
13:54:40,652 ERROR [STDERR] at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 717)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:290 )
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.filte rs.ReplyHe aderFilter .doFilter( ReplyHeade rFilter.ja va:96)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.internal DoFilter(A pplication FilterChai n.java:235 )
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A pplication FilterChai n.doFilter (Applicati onFilterCh ain.java:2 06)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S tandardWra pperValve. invoke(Sta ndardWrapp erValve.ja va:235)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S tandardCon textValve. invoke(Sta ndardConte xtValve.ja va:191)
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyAssociat ionValve.i nvoke(Secu rityAssoci ationValve .java:190)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.authen ticator.Au thenticato rBase.invo ke(Authent icatorBase .java:433)
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.JaccCo ntextValve .invoke(Ja ccContextV alve.java: 92)
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.pr ocess(Secu rityContex tEstablish mentValve. java:126)
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur ity.Securi tyContextE stablishme ntValve.in voke(Secur ityContext Establishm entValve.j ava:70)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S tandardHos tValve.inv oke(Standa rdHostValv e.java:127 )
13:54:40,652 ERROR [STDERR] at org.apache.catalina.valves .ErrorRepo rtValve.in voke(Error ReportValv e.java:102 )
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.servi ce.jca.Cac hedConnect ionValve.i nvoke(Cach edConnecti onValve.ja va:158)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S tandardEng ineValve.i nvoke(Stan dardEngine Valve.java :109)
13:54:40,652 ERROR [STDERR] at org.apache.catalina.connec tor.Coyote Adapter.se rvice(Coyo teAdapter. java:330)
13:54:40,652 ERROR [STDERR] at org.apache.coyote.http11.H ttp11Proce ssor.proce ss(Http11P rocessor.j ava:829)
13:54:40,652 ERROR [STDERR] at org.apache.coyote.http11.H ttp11Proto col$Http11 Connection Handler.pr ocess(Http 11Protocol .java:598)
13:54:40,652 ERROR [STDERR] at org.apache.tomcat.util.net .JIoEndpoi nt$Worker. run(JIoEnd point.java :447)
13:54:40,652 ERROR [STDERR] at java.lang.Thread.run(Unkno wn Source)
13:54:40,652 ERROR [STDERR] Debug: Cannot forward after response has been committedjava.lang.Illegal StateExcep tion: Cannot forward after response has been committed
Here is the full Error from the console
13:54:34,886 ERROR [STDERR] Debug: Search Query = select * from TicketArchive where UPPER(user_name) like UPPER('%yn%') order by ticket_date desc, deal_id desc
13:54:38,433 WARN [ClassLoaderManager] Unexpected error during load of:com.microsoft.sqlserver
java.lang.UnsupportedClass
at java.lang.ClassLoader.defi
at java.lang.ClassLoader.defi
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at java.security.AccessContro
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.Class.forName0(N
at java.lang.Class.forName(Un
at org.jboss.classloader.plug
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at org.jboss.classloader.spi.
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.Class.forName0(N
at java.lang.Class.forName(Un
at org.jboss.resource.adapter
at org.jboss.resource.adapter
at org.jboss.resource.adapter
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.adapter
at web.FindDeal.getSearchDeal
at web.FindDeal.doGet(FindDea
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.jboss.web.tomcat.filte
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.jboss.web.tomcat.secur
at org.apache.catalina.authen
at org.jboss.web.tomcat.secur
at org.jboss.web.tomcat.secur
at org.jboss.web.tomcat.secur
at org.apache.catalina.core.S
at org.apache.catalina.valves
at org.jboss.web.tomcat.servi
at org.apache.catalina.core.S
at org.apache.catalina.connec
at org.apache.coyote.http11.H
at org.apache.coyote.http11.H
at org.apache.tomcat.util.net
at java.lang.Thread.run(Unkno
13:54:38,464 WARN [JBossManagedConnectionPoo
org.jboss.resource.JBossRe
at org.jboss.resource.adapter
at org.jboss.resource.adapter
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.connect
at org.jboss.resource.adapter
at web.FindDeal.getSearchDeal
at web.FindDeal.doGet(FindDea
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.jboss.web.tomcat.filte
at org.apache.catalina.core.A
at org.apache.catalina.core.A
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.jboss.web.tomcat.secur
at org.apache.catalina.authen
at org.jboss.web.tomcat.secur
at org.jboss.web.tomcat.secur
at org.jboss.web.tomcat.secur
at org.apache.catalina.core.S
at org.apache.catalina.valves
at org.jboss.web.tomcat.servi
at org.apache.catalina.core.S
at org.apache.catalina.connec
at org.apache.coyote.http11.H
at org.apache.coyote.http11.H
at org.apache.tomcat.util.net
at java.lang.Thread.run(Unkno
Caused by: org.jboss.resource.JBossRe
at org.jboss.resource.adapter
at org.jboss.resource.adapter
... 34 more
Caused by: java.lang.ClassNotFoundExc
at java.net.URLClassLoader$1.
at java.security.AccessContro
at java.net.URLClassLoader.fi
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.ClassLoader.load
at java.lang.Class.forName0(N
at java.lang.Class.forName(Un
at org.jboss.resource.adapter
... 35 more
13:54:40,308 ERROR [STDERR] org.jboss.util.NestedSQLEx
13:54:40,308 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,308 ERROR [STDERR] at web.FindDeal.getSearchDeal
13:54:40,308 ERROR [STDERR] at web.FindDeal.doGet(FindDea
13:54:40,308 ERROR [STDERR] at javax.servlet.http.HttpSer
13:54:40,308 ERROR [STDERR] at javax.servlet.http.HttpSer
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.filte
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,308 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,308 ERROR [STDERR] at org.apache.catalina.authen
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,308 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,339 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,339 ERROR [STDERR] at org.apache.catalina.valves
13:54:40,339 ERROR [STDERR] at org.jboss.web.tomcat.servi
13:54:40,339 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,339 ERROR [STDERR] at org.apache.catalina.connec
13:54:40,339 ERROR [STDERR] at org.apache.coyote.http11.H
13:54:40,339 ERROR [STDERR] at org.apache.coyote.http11.H
13:54:40,339 ERROR [STDERR] at org.apache.tomcat.util.net
13:54:40,339 ERROR [STDERR] at java.lang.Thread.run(Unkno
13:54:40,339 ERROR [STDERR] Caused by: javax.resource.ResourceExc
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] ... 25 more
13:54:40,339 ERROR [STDERR] Caused by: org.jboss.resource.JBossRe
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] at org.jboss.resource.connect
13:54:40,339 ERROR [STDERR] ... 29 more
13:54:40,339 ERROR [STDERR] Caused by: org.jboss.resource.JBossRe
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] ... 34 more
13:54:40,339 ERROR [STDERR] Caused by: java.lang.ClassNotFoundExc
13:54:40,339 ERROR [STDERR] at java.net.URLClassLoader$1.
13:54:40,339 ERROR [STDERR] at java.security.AccessContro
13:54:40,339 ERROR [STDERR] at java.net.URLClassLoader.fi
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load
13:54:40,339 ERROR [STDERR] at java.lang.ClassLoader.load
13:54:40,339 ERROR [STDERR] at java.lang.Class.forName0(N
13:54:40,339 ERROR [STDERR] at java.lang.Class.forName(Un
13:54:40,339 ERROR [STDERR] at org.jboss.resource.adapter
13:54:40,339 ERROR [STDERR] ... 35 more
13:54:40,339 ERROR [STDERR] Debug: Got an exception! org.jboss.util.NestedSQLEx
13:54:40,652 ERROR [STDERR] Debug: result.jsp :: dealresult=null
13:54:40,652 ERROR [STDERR] java.lang.NullPointerExcep
13:54:40,652 ERROR [STDERR] at web.FindDeal.doGet(FindDea
13:54:40,652 ERROR [STDERR] at javax.servlet.http.HttpSer
13:54:40,652 ERROR [STDERR] at javax.servlet.http.HttpSer
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.filte
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.A
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,652 ERROR [STDERR] at org.apache.catalina.authen
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.secur
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,652 ERROR [STDERR] at org.apache.catalina.valves
13:54:40,652 ERROR [STDERR] at org.jboss.web.tomcat.servi
13:54:40,652 ERROR [STDERR] at org.apache.catalina.core.S
13:54:40,652 ERROR [STDERR] at org.apache.catalina.connec
13:54:40,652 ERROR [STDERR] at org.apache.coyote.http11.H
13:54:40,652 ERROR [STDERR] at org.apache.coyote.http11.H
13:54:40,652 ERROR [STDERR] at org.apache.tomcat.util.net
13:54:40,652 ERROR [STDERR] at java.lang.Thread.run(Unkno
13:54:40,652 ERROR [STDERR] Debug: Cannot forward after response has been committedjava.lang.Illegal
Make sure you're using the correct driver version *for JBoss*
you're using the wrong jar.
see my earlier comments about which jar to use with which version of java
see my earlier comments about which jar to use with which version of java
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am using sqljdbc4.jar?
yes, thats for java 6. you're using java 5
ASKER
Hi
Checked everything and found my Connection Successful log in from the test class. Question now why does the application side not work
jdbc:sqlserver://servernam e\name:500 1;database Name=DBNAM E;selectMe thod=curso r;
Connection Successful!
Driver Information
Driver Name: Microsoft SQL Server JDBC Driver 3.0
Driver Version: 3.0.1301.101
Database Information
Database Name: Microsoft SQL Server
Database Version: 9.00.4053
Checked everything and found my Connection Successful log in from the test class. Question now why does the application side not work
jdbc:sqlserver://servernam
Connection Successful!
Driver Information
Driver Name: Microsoft SQL Server JDBC Driver 3.0
Driver Version: 3.0.1301.101
Database Information
Database Name: Microsoft SQL Server
Database Version: 9.00.4053
because you're using the wrong jar :)
ASKER
ok
I have 2 jars in C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu
sqljdbc4.jar
sqljdbc.jar
I am using sqljdbc4.jar
I have also placed that jar in C:\jboss-5.1.0.GA\server\d efault\lib
What am I missing
Please advise
THanks
Anthonio
I have 2 jars in C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu
sqljdbc4.jar
sqljdbc.jar
I am using sqljdbc4.jar
I have also placed that jar in C:\jboss-5.1.0.GA\server\d
What am I missing
Please advise
THanks
Anthonio
you need to remove sqljdbc4.jar, and replace it with sqljdbc.jar
ASKER
Do i need to place that jar in the C:\jboss-5.1.0.GA\server\d efault\lib folder or the C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu
Thanks
Anthonio
Thanks
Anthonio
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much fro the assistance it working 100 %
ASKER
Excellent !!!!!!!!!!!!!1
:-)