MS SQL Server 2K JDBC Connection Problem

Hi,
I have installed Sql Server 2000 with mixed mode authentication. I am able to connect to connect through ODBC with both Windows and server authentication.
The same when i try with JDBC, i am not able to connect. I have added the driver jars to the classpath also.
Heres the Code :
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=pubs","sa","");
if(con!=null) System.out.println("Connection Successful!");
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
Here is the error :
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at Connect.main(Connect.java:31)
Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver
Kindly help.
Thanks in Advance

Thanks for the reply.
I am not using any IDE, but the problem exists if i
add the jar files into my classpath. I extracted the
required files as suggested and tried, this time it
works fine.
If anyone could let me know why this problem is
occuring it would be helpful.
Thanks once againIt occured because MS didn't package their jar properly. You could try to re-jar the files or use a driver from another vendor.

Similar Messages

  • Java - MS SQL Server 2005 JDBC connection problem

    Hi all, i tried to set up a connection and tried the following codes and got an exception
    {color:#ff0000}--------------------Configuration: <Default>--------------------
    Got an exception!
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    Process completed.{color}
    part of my codes:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import java.sql.*;
    public class RFIDLogistics extends JFrame{
    //Constructor
    public RFIDLogistics () {
    clock = new SimpleClock();
    try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    String connectionUrl = "jdbc:sqlserver://L31101;" + "databaseName=RFID Logistics;";
    Connection con = DriverManager.getConnection(connectionUrl);
    catch (Exception e) {
    System.err.println("Got an exception! ");
    System.err.println(e.getMessage());
    What does the exception mean? any1 can guide me to set up the connection please.
    Thanks!

    It means that you're an eejit that will never learn to stop soiling himself, let alone write proper Java.
    %

  • Java Web Server 6.1 & Pooled SQL Server 2000 JDBC Connections

    If anyone can shed some light on this problem I would greatly appreciate it.
    I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web Server 6.1 with the SQL Server 2000 JDBC Driver.
    The background:
    1. I have downloaded the SQL Server 2000 JDBC Driver and installed it on the web server.
    2. I used the Administration GUI to add the .jars(namely msbase.jar, msutil.jar, and mssqlserver.jar), to the classpath.
    3. Upon creating a simply JSP to access connection metadata using the direct connect method, ie.,
    Class.forName( com.microsoft.jdbc.sqlserver.SQLServerDriver);
    Connection con = DriverManager.getConnection( "jdbc:microsoft:sqlserver:// ....
    I am shown a successful output of...
    JDBC Test
    Registering JDBC Driver
    driverClass: com.microsoft.jdbc.sqlserver.SQLServerDriver loaded and registered.
    Driver Information
    Driver Name: SQLServer
    Driver Version: 2.2.0037
    Database Information
    Database Name: Microsoft SQL Server
    Database Version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: )
    Avalilable Catalogs
    catalog: master
    catalog: msdb
    catalog: Northwind
    catalog: pubs
    catalog: tempdb
    4. This tells me that the web server has access to the files necessary and the classpath is configured correctly.
    Now the fun begins...
    In order to set up the JDBC Connection Pool I have done the following...
    1. I have created a web.xml file for the web-app which contains the JSP and includes the following entry
    <resource-ref>
    <res-ref-name>jdbc/devjwscp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    2. I have used the "JDBC Connection Pools" link under the "Java" tab in the Administration GUI to create a connection pool.
    "Pool Name:" is "devjwscp"
    "DataSource Classname" is set to "com.microsoft.jdbcx.sqlserver.SQLServerDataSource". All other properties have been left alone.
    3. I have used the "JDBC Resources" link under the "Java" tab in the Administration GUI to create a JNDI resource.
    "JNDI Name" is set to "jdbc/devjwscp"
    "Status" is "true"
    "Pool Name" is "devjwscp"
    The web-app JSP comes back with the following exception.
    JDBC Test
    Exception Thrown
    Cannot create resource instance
    javax.naming.NamingException: Cannot create resource instanceorg.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
    javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
    org.apache.naming.NamingContext.lookup(NamingContext.java:834)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    javax.naming.InitialContext.lookup(InitialContext.java:347)
    _jsps._jdbctest_jsp._jspService(_jdbctest_jsp.java:236)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:667)
    com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
    com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    4. FYI my server.xml <RESOURCE> entry looks as is shown below
    <RESOURCES>
    <JDBCCONNECTIONPOOL name="devjwscp" datasourceclassname="com.microsoft.jdbcx.sqlserver.SQLServerDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
    <PROPERTY name="serverName" value="secret"/>
    <PROPERTY name="portNumber" value="1433"/>
    <PROPERTY name="User" value="secret"/>
    <PROPERTY name="Password" value="secret"/>
    </JDBCCONNECTIONPOOL>
    <JDBCRESOURCE jndiname="jdbc/devjwscp" poolname="devjwscp" enabled="on"/>
    </RESOURCES>
    What gives? Do I need to add anything else to the server.xml? I know the server.xml for JWS differs from Apache. I have done an exhaustive search of the web. Many other individuals have had the same thing happen, buy none of them offered any explaination or remedy.
    Thanks in advance.

    Hi,
    Were you able to get it working.
    I am using
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    I am still getiing the same error. I also suspect that there is something wrong with thr DTD too. It gives me the following when the server comes up.
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    Listening for transport dt_socket at address: 1699
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun M
    icrosystems Inc.]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [acsanet]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [testing]
    failure: WEB0120: XML error parsing deployment descriptor [C:/Sun/WebServer6.1/h
    ttps-AW-NYNY-D609628.nna.wdpr.disy.com/webapps/https-AW-NYNY-D609628.nna.wdp
    r.disy.com/testing/WEB-INF/sun-web.xml]
    Failed to create the XML-DOM Document. Check your XML to make sure it is correc
    t.org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8
    character beginning with 0xa0" (line number may be too low).
    at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
    at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
    at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(Input
    Entity.java:914)
    at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
    .java:185)
    at org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(Grap
    hManager.java:711)
    at org.netbeans.modules.schema2beans.BaseBean.createGraph(BaseBean.java:
    2075)
    at com.iplanet.ias.web.WebContainer.loadWebModule(WebContainer.java:695)
    at com.iplanet.ias.web.WebContainer.loadStandaloneWebModule(WebContainer
    .java:626)
    at com.iplanet.ias.web.WebContainer.loadWebModules(WebContainer.java:600)
    at com.iplanet.ias.web.WebContainer.createVS(WebContainer.java:374)
    at com.iplanet.ias.server.J2EERunner.createVS(J2EERunner.java:223)
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.wdpr.disy.com] at [search]
    config: HTTP4292: flex-init: Log file C:/Sun/WebServer6.1/https-AW-NYNY-D609628.
    nna.wdpr.disy.com/logs/access should be removed before changing its format
    info: HTTP3072: [LS ls1] http://AW-NYNY-D609628.nna.wdpr.disy.com:80 ready to
    accept requests
    startup: server started successfully
    info: CORE3274: successful server startup
    the sun-web.xml is as below:
    <?xml�version="1.0"�encoding="UTF-8"?>
    <!--
         Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    -->
    <!DOCTYPE�sun-web-app�PUBLIC�"-//Sun�Microsystems,�Inc.//DTD�Application�Server�8.0�Servlet�2.4//EN"�"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app>
         <resource-ref>
              <res-ref-name>jdbc/oraclePool</res-ref-name>
              <jndi-name>jdbc/oraclePool</jndi-name>
         </resource-ref>
    </sun-web-app>
    Am I using the right DTD ?
    Please let me know.
    Thank you.
    -- Martin Louis

  • SQL Server 2000 Jdbc connection

    I just have a small question and I was wondering if anyone could help me out with it? I'm using a JSP page to connect up to the database on the server. I have the JDBC driver and am trying to connect from my machine to SQL Server 2000 on our server. The thing is I'm having a little trouble with the connection string.
    (i am using the Microsoft SQL Server 2000 JDBC Driver)
    Can you use Windows Authentication when using the connection string?
    Also i tried using a SQL Server connection but it gave me the error : "com.microsoft.sqlserver.jdbc.SQLServerExcepti on: Login failed for user 'Arun'. The user is not associated with a trusted SQL Server connection. "
    This is the connection string
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Connection connection1 = java.sql.DriverManager.getConnection("jdbc:sqlserver://localhost:1433;Database=BusinessDatabase","Arun","testpass");can you set it up for windows authentication?
    thanks for any help anyone can give me with this! <img src="http://www.java-forums.org/images/smilies/smile.gif" border="0" alt="" title="Smile" width="16" height="16" />

    Hi,
    Yes, it is possible to use Windows Authentication but you will need to make sure the sqljdbc_auth.dll file is in your system path specified with the -Djava.library.path="xxx" option. The dll is included as part of the JDBC Driver download.
    Hope this helps.
    Ben.

  • MS SQL Server and JDBC Connection

    I am doing on MS SQL Server 2000 with JDBC for RMI. I download driver from the Microsoft site, and used a connection statement like
    con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;user=sa;password=");
    unfortunately the connection didn't succeed, it says the server actively refused. connect
    where is the problem? Pls anyone with solution.

    BalusC wrote:
    "Connection refused" roughly means that the remote server is not accessible on the specified port.
    Check the correctness of the port and check if there isn't a firewall/proxy running which blocks that port.What I don't understand about the error messages, and so thought it must be related to MS SQL, rather tthan connections in general, is the phrase actively refused that he used. I take that to menat that the DB accepted a connection attempt, then, after attempting to authenticate, cut it off. But its probably just a misrepresentation of the error message on his part.
    Specific MS SQL information, I don't know though.

  • MS SQL Server 7.0 Connectivity problems

    Hello,
    I am creating applets which display information taken in a MS SQL Server 7.0. My SQL requests are very simple. I program with JBuilder 3.5. As a new Java programer, I have some basic problems:
    -1- Do I have to GET the JDBC/ODBC driver? or is that possible to manage without?
    -2- If it is needed, where can I find it for FREE? The ones proposed by Atinav Inc. are really expensive!
    -3- Why are they not in the installation CD of SQL Server?
    Thank you for answering to a newby.

    The jdbc-odbc bridge comes with all version of sun java back to about 1.1.4.
    ODBC (non-java issue) requires that you set up a DSN on each client machine. This can't be done is java unless you want to use JNI. This might not be ideal for an applet.
    There is a free tds driver (although I can't find the name) for SQL server. It is java only solution and requires no setup on client machine.

  • SQL Server 2005 Express Connection problems

    Hello,
    I have been trying for the past 2 hours to connect CFMX 8 to SQL Server 2005 Express on my windows7 laptop and it is throwing all kinds of errors.
    "Connection verification failed for data source: sqlHPV
    java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Unknown host: SQLExpress
    The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Unknown host: SQLExpress"
    Please I need help.

    Try using an IP address instead of SQLExpress for the host name. If it is on the same box, use 127.0.0.1 and make sure SQLExpress in configured for IP communication.

  • CF8 and SQL Server Express 2005 connection problem

    Hi. I'm new to SQL Server (I'm running Express 2005 SP2 on
    Vista - local machine) and I can't seem to connect to my datasource
    with CF Admin. I submit the following information to CF Admin:
    CF Data Source Name: MySampleDB
    Database: MySampleDB
    Server: MyMachine\MSSMLBIZ Port: 1433
    User name: Me
    Password: **********
    I get the following error:
    Connection verification failed for data source: MySampleDB
    java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]No
    more data available to read.
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]No more data available to read.
    Log On is using built-in account: Local System
    Here's what else i have done so far:
    I have tried using 127.0.0.1 as the server
    I made sure Windows firewall had an exception to allow port
    1433
    I tried ports 1434 and 8500
    I made sure TCP/IP is enabled in SSCM protocols
    I even tried leaving the username and pwd blank and I get the
    following message:
    Connection verification failed for data source: MySampleDB
    java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket to host and port: 127.0.0.1:1433.
    Reason: Connection refused: connect
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]Error establishing socket to
    host and port: 127.0.0.1:1433. Reason: Connection refused: connect
    I'm not sure where I'm going wrong. Thanks in advance for
    your help!
    -Kris

    Hi,
    The port might have been blocked. Try setting a new port for
    your sqlserver. That may work for you.
    (Because SP2 always blocks port 1433)

  • SQL Server 2005 Database connecting problem

    Hi,
    I have installed MDM 5.5 SP06 - 64bit servers,  32bit clients and  SQL server 2005  in Vista 64 bit operating system.
    But I can't able to connect the server...
    I believe sa is reserved user name but in SQL server management studio I couldn't able to connect the server and registered the Server.
    Can you guys please guide me in this regard how to fix this problem ASAP?
    Thanks,
    Pooja

    Hi,
    Thanks for your time and help, but I couldn't able to see the database itself.
    as I know my computer name is database name but SQL Server is not providing that.
    and its showing network data base names.
    If I type the database name and user is sa...but there is no luck in connecting...
    is there any way that we can define server name and user names??? also it doesn't ask for any database name or user name during installation of SQL Server 2005
    I'm not a SQL person so, please help me in this regard.
    Thanks, Pooja

  • Problem using production version of SQL Server 2005 JDBC drivers

    A production version of the Microsoft SQL Server 2005 JDBC driver became available on 1/20/06, and we are having some issues getting it to work with WLS 9.1. The non-XA driver works fine, but when we attempt to use the XA version, we see the error below in our logs. (Note that in the text "status:0 msg:null", the "null" is actually an unprintable character that I was not able to copy/paste.)
    We have successfully tested WLS 9.1 with the beta JDBC drivers that were released by Microsoft a number of months ago, so this appears to be a problem with the prod version only (although we had no trouble using the prod drivers with JBoss). We have actually opened a support case for this, but the response we have received thus far has been negligible at best and we really need to get this issue resolved, so I am posting the problem here as well to see if anyone else has encountered it.
    Regards,
    Sabrina
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: ourpackage.OurDBUtil.openConnection(OurDBUtil.java:130)     
         ... 11 more
    Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XA_OK start() failed on resource 'OurXADataSource': XA_OK
    javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: xp_sqljdbc_xa_init failure, status:0 msg:null.
         at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Ljavax.transaction.xa.Xid;I)V(Unknown Source)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:679)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1160)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1093)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:496)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:428)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1390)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1395)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1327)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)
         ... 12 more

    SabrinaL wrote:
    A production version of the Microsoft SQL Server 2005 JDBC driver became available on 1/20/06, and we are having some issues getting it to work with WLS 9.1. The non-XA driver works fine, but when we attempt to use the XA version, we see the error below in our logs. (Note that in the text "status:0 msg:null", the "null" is actually an unprintable character that I was not able to copy/paste.)
    We have successfully tested WLS 9.1 with the beta JDBC drivers that were released by Microsoft a number of months ago, so this appears to be a problem with the prod version only (although we had no trouble using the prod drivers with JBoss). We have actually opened a support case for this, but the response we have received thus far has been negligible at best and we really need to get this issue resolved, so I am posting the problem here as well to see if anyone else has encountered it.
    Regards,
    SabrinaHi. Have you done all the XA-related install for the new MS driver? (put the XA
    dll in the DBMS environment etc)? Is your DBMS on a 32-bit machine or 64-bit machine?
    Does the driver present a dll for each of those? You can also get good JDBC help
    from MS via their microsoft.public.sqlserver.jdbcdriver newsgroup.
    Joe Weinstein at BEA
    >
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: ourpackage.OurDBUtil.openConnection(OurDBUtil.java:130)     
         ... 11 more
    Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XA_OK start() failed on resource 'OurXADataSource': XA_OK
    javax.transaction.xa.XAException: java.sql.SQLException: Failed to create the XA control connection. Error: xp_sqljdbc_xa_init failure, status:0 msg:null.
         at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Ljavax.transaction.xa.Xid;I)V(Unknown Source)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:679)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1160)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1093)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:496)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:428)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1390)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1395)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1314)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)     
         at ourpackage.OurMDB.onMessage(OurMDB.java:184)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:426)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:332)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:288)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3824)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3738)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4228)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1327)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:436)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:392)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
         at ourpackage.OurDBUtil.openConnection(OurDBUtil.java:125)
         ... 12 more

  • Does Microsoft SQL Server 2k JDBC Driver SP3 support "trusted connections"?

    I get the following error when attempting to connect to a SQL Server instance via JDBC :-
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user '<username>'. Reason: Not associated with a trusted SQL Server connection.
    Does Microsoft SQL Server 2000 JDBC SP3 Driver support "trusted connections"?

    No, the MSDE instance I'm trying to connect to from my J2 application is configured as "Integrated Windows Authentication" ONLY (i.e not "mixed mode" and deliberately so) hence my search for a JDBC driver that supports o/s-based authentication.
    I appear to have found one now however at it appears that DataDirect's JDBC driver supports NTLM and Kerberos authenicaiton on Windows (although I haven't got it working yet).
    Thanks for your reply tho'

  • SQL Server 2005 JDBC Driver

    I am trying to set up the Master Repository with the MS SQL Server 2005 JDBC Driver. I copied the sqljdbc.jar file into the /drivers directory, but it is not appearing in the drop down list. Any ideas? Thanks in advance.
    EDIT: I have solved the problem by looking at the instructions in the Thread: "Not able to estabish connection with SQLServer2005 from the Topology Manage" At first glance I did not think this would relate to my issue.
    Edited by: user9535932 on Nov 12, 2008 3:14 PM

    Hi,
    The driver will not appear in the list, but you can do this way.
    JDBC driver MS SQL Server 2005 :
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL MS SQL Server 2005 :
    jdbc:sqlserver://localhost:1433;selectMethod=cursor;databaseName=xyz;integratedSecurity=false
    Hopefully it solve your problem..
    Regards,
    V13N

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • Errors using weblogic sql driver: "No JDBC connection can be made because the transaction state is marked rollback"

    One of our customers starts to encounter this error message recently.
    We checked our log files. It seems that the error happens when
    to obtain a jdbc connection. Have anyone seen similar problems
    and knows how to fix it? thanks in advance.
    We are using weblogic server 6.1sp2, and weblogic sql type 4 driver.
    The functions that invoke the jdbc calls are stateless session bean
    methods with their transaction attributes marked as Required.
    There is no nested calls of these methods.
    A partial stack trace we obtained is as following:
    java.sql.SQLException: No JDBC connection can be made
    because the transaction state is
    Marked Rollback
         at weblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:586)
         at weblogic.jdbc.jts.Connection.prepareStatement(Connection.java:115)
         at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
         at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
    lixin

    Joseph Weinstein <[email protected]> wrote:
    >
    >
    YuanHui Liu wrote:
    Joe,
    We got the exact same error message. The error came after we got theJDBC connection,
    and trying to create statement off it.
    It occurs intermitently when we are running another standalone JAVAapp to do
    some end of day work, which results in the DB Server being very busy(90+%CPU
    usage) for about 5 minutes. We see a surge of requests to the WLSJDBC Connection
    pool. This would sometimes result in all our subsequent DB requeststo fail and
    lead to a crash.
    We are using WLS6.0SP1. I do not think there's a 30 seconds wait leadingto a
    connection timeout that caused this(rather it is the end effect).
    Can you give us a more detailed explanation? Is there a miscommunicationbetween
    our DB(Sybase12) and WLS?Hi. It looks to you like it's after you get the connection, but really
    it's when the server is
    gettng the pool connection. For performance/synchronization reasons we
    do a clever
    delay: When your code asks for a pool connection we quickly give you
    the pool wrapper,
    but we delay actually reserving the real underlying DBMS connection until
    your first
    real need for a connection, at your first JDBC call, such as createStatement()
    etc.
    It is while waiting for a pool connection long enough for the transaction
    coordinator
    to have timed you out before you ever get a chance. It's nothing to do
    with the
    DBMS or even JDBC, I believe. I think the weblogic server either has
    too few execute-threads
    and/or too few CPU cycles to do the work load.
    Okay, so there's a lazy initialization of the connection.
    From reading our log I believe our failur is immediate rather
    than waiting for 30+ seconds(the default setting) from the DB,
    the timeout occurred later as a result. At the time either because the DB Server
    is very busy.
    Since we are running WLS6.0 we have only one connection pool,
    we have defined a max of 150 threads in the pool. While this
    is happening the DB Server is being pinned by an overnight job,
    but the WLS Server is not busy at all. The DB and WLS resides
    on different physical boxes.
    We also have a thread dump from the WLS console when we rebooted the server, it
    showed that we are hanging on to the thread & jdbc
    connections after these exceptions has occurred instead of releasing them, note
    "16083"(~4.5 hours) seconds has passed:
    142 116222 Retry rollback request for tx: 'transaction=(IdHash=2963855,Name =
    [EJB UserManagerBeanImpl.signalICUserServletHeartBeat()],Xid=30643:8f3838f3709bf53d,Status=Rolling
    Back. [Reason = Unknown],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since
    begin=16083,seconds left=10,ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=started,assigned=server),SCInfo[server]=(state=active),properties=({weblogic.jdbc=t3://159.55.158.25:8005,
    weblogic.transaction.name=[EJB UserManagerBeanImpl.signalICUserServletHeartBeat()]}))'
    Scheduled Trigger
    So I would argue this problem actually chewed up resources on the WLS server.
    -Yuanhui Liu
    >>
    >>
    Thanks.
    -YuanHui Liu
    Joseph Weinstein <[email protected]> wrote:
    lixin wrote:
    One of our customers starts to encounter this error message recently.
    We checked our log files. It seems that the error happens when
    to obtain a jdbc connection. Have anyone seen similar problems
    and knows how to fix it? thanks in advance.
    We are using weblogic server 6.1sp2, and weblogic sql type 4 driver.
    The functions that invoke the jdbc calls are stateless session bean
    methods with their transaction attributes marked as Required.
    There is no nested calls of these methods.
    A partial stack trace we obtained is as following:
    java.sql.SQLException: No JDBC connection can be made
    because the transaction state is
    Marked Rollback
    at weblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:586)Hi. This sounds like a JVM thread starvation issue, and/or a server
    load
    issue. What is
    happening is that the transaction is started, and times out beforethe
    SSB even gets to
    the first JDBC work. I would first verify that the customer is using
    the very latest JVM
    available for the machine.
    Joe Weinstein
    at weblogic.jdbc.jts.Connection.prepareStatement(Connection.java:115)
    at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
    at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
    lixin

  • Is it possible to use Jdeveloper with Other Sql Server using JDBC-ODBC bri

    I have been able to successfully establish connection with Sql server Using JDBC-ODBC bridge, but when i run the application and perform some operations such as insert the following errors occur:
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT ItmUnit.ORG_CODE, ItmUnit.UNIT_CODE, ItmUnit.UNIT_NAME, ItmUnit.ADDRESS1, ItmUnit.ADDRESS2, ItmUnit.ADDRESS3, ItmUnit.CITY_CODE, ItmUnit.USER_ID, ItmUnit.TIME_STAMP FROM ITM_UNIT ItmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [DataDirect][ODBC Sybase Wire Protocol driver]Sybase does not allow more than one active statement when retrieving results without a cursor
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO IMMS.HRM_UNIT(UNIT_CODE,UNIT_NAME) VALUES (?,?)".
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    (oracle.jbo.AttrValException) JBO-27014: Attribute DeptCode in HrmUnitDept is required
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT HrmUnit.UNIT_CODE, HrmUnit.UNIT_NAME FROM IMMS.HRM_UNIT HrmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

    Yes, you can do that. For testing purposes you can also create simple files (with mkfile) and add these to ASM. That way you could also experiment with deleting files and see what happens in ASM
    Bjoern

Maybe you are looking for

  • My music in my documents won't go away

    I've been trying to clean out all my old things, and I realized that in my My Documents folder is a My Music folder. I already have My Music in a separate place, so I got rid of it. Now my whole Itunes has been cleared of songs, and everytime I open

  • BPM...needing help in a simple test case...

    Hi guys, I'm having some trouble with the creation of an integration process. My idea is to create the following process: Legacy Nº1-->(FILE) -- > XI -> (FILE)> Legacy Nº2, after Legacy Nº2 receives the file (Purchase Order), one of the fields of the

  • IPASCII Object is Broken

    I hadn't used this object since Lookout 6.1 and when I went to code use of it today, I discovered that it is broken in Lookout 6.6 and 6.5 as follows: For both versions of the .cbx, only RequestFormat, ResponseFormat, RQVx, RQVx.logical, RQVx.txt and

  • How to delete a files from MNT using scripting in OSD

    Hi , I am looking a method for deleting a set of files present in virtual drive(MNT). Please let me know scripting methods that can achieve above things and i can add that in OSD FIle. Kindly advise Umeed4u

  • Loss serial input with re install of Labview

    I have an existing VI that is trying to connect through Com 1 to an Emveco testing machine. The hard drive crashed and I am trying to re install LabView on a new hard drive. When I run the VI in the new installation, it does not seem to communicate t