Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver

Hi,
i am doing a forum application.
i am trying to connect database connection through javax.sql.DataSource.
I am using Eclipse editor for developing this application and i am using sql server 2000 database.
i have create a servlet file.
here is the coding.
DatabaseGetConnection.java
`````````````````````````````````````````
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
public class DatabaseGetConnection extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
private Connection con=null;
private DataSource ds=null;
public DatabaseGetConnection() throws ServletException {
super();               
public DatabaseGetConnection(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
this.doPost(req, res);          
public void init() throws ServletException {
try
final Context initContext = new InitialContext();
final Context envContext = (Context)initContext.lookup("java:/comp/env");
this.ds = (DataSource)initContext.lookup("jdbc/mySQLServer");
}catch(final NamingException ne)
ne.printStackTrace();
}catch(final Exception e)
e.printStackTrace();
public DataSource getDS()
System.out.println("Datasource method calling");
if (this.ds!=null)
System.out.println("Datasource not null");
}else
System.out.println("Datasource null");
return this.ds;
public Connection getCon()
try
this.con=this.getDS().getConnection();
if (this.con!=null)
System.out.println("Connection Successfull");
}catch(final SQLException se)
System.out.print("Connection Establishment Error : ");
se.printStackTrace();
return this.con;
I have configured server.xml. here is the configuration
server.xml
````````````````
<GlobalNamingResources>
<Resource name="jdbc/mySQLServer" global="jdbc/mySQLServer" auth="Container"
type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=forum;SelectMethod=cursor"
username="sa" password="sa" maxActive="20" maxIdle="10"
maxWait="-1"/>
</GlobalNamingResources>
here is the web.xml file
``````````````````````````````````
<resource-ref>
<res-ref-name>jdbc/mySQLServer</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
is this configuration correct? plz help me about the configuration and coding through Eclipse.
i have run the application and i got the error. here is the error details
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.forum.database.DatabaseGetConnection.getCon(DatabaseGetConnection.java:85)
at com.forum.database.DatabaseGetConnection.GetAllTopicSearch(DatabaseGetConnection.java:101)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.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.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)
... 24 more
thanks and regards,
k.s.kumar

Please don't multipost, it's rude: http://forum.java.sun.com/thread.jspa?threadID=5219591
Please continue on that thread.

Similar Messages

  • Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

    Hi,
    At the moment I'm trying to get an example working. The error message I get is:
    Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'"
    The example I tried is http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html.
    Configuration:
    Wampserver 2.0 (Apache, MySQL, PHP for Windows XP), Tomcat 6.0 and jdk1.6.0_03.
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    Tia,
    Abel.

    Hi,
    I added the jar file containing the requested class to my lib directory. So the current contents of that directory is:
    The following files are installed in %CATALINA_HOME%/webabbs/
    - Dbtest/test.jsp
    - Dbtest/WEB-INF/web.xml
    - Dbtest/WEB-INF/lib/standard.jar
    - Dbtest/WEB-INF/lib/tomcat-dbcp.jar
    - Dbtest/WEB-INF/lib/jstl.jar
    - Dbtest/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar
    More importantly, I started my Wamp server.
    The example works as it should have. Thanks for the feedback.
    Abel

  • Cannot load JDBC Driver Class in Tomcat5.5 using struts.

    Hello to all,
    I'm working in the struts environment using Esclipse3.2 IDE.
    And I have installed Tomcat5.5 server.I have created the LoginForm
    in struts.Now i like to connect my LoginForm with MySql database.I
    have also created the database in MySql naming strutsdatabase.
    I had also download the mysql-connector-java-3.0.16-ga-bin.jar and
    save that in C:/tomcat/commons/lib directory.
    While running I have got the below error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    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)
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    And I have attached my struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software
    Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <data-sources>
    <data-source
    type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/strutsdatabase?autoReconnect
    =true"/>
    <set-property property="driverClassName"
    value="com.mysql.jdbc.Driver"/>
    <set-property property="username" value=""/>
    <set-property property="password" value=""/>
    <set-property property="maxActive" value="10"/>
    <set-property property="validationQuery" value="SELECT
    COUNT(*) FROM test"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="false"/>
    </data-source>
    </data-sources>
    <form-beans>
    <form-bean name="LoginForm"
    type="fino.web.struts.action.LoginForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards/>
    <action-mappings>
    <action name="LoginForm" path="/login" scope="request"
    type="fino.web.struts.action.LoginAction" validate="true">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/failure.jsp"/>
    </action>
    </action-mappings>
    <controller/>
    <message-resources null="false"
    parameter="org.apache.struts.action.ActionResources"/>
    </struts-config>
    Friends,please help me to find solution to this problem.

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • No suitable driver with com.mysql.jdbc.Driver

    Ok. here's the issue. I have a windows box. (first problem) but let's pretend that it's ok. :) I installed Tomcat 4.1 installed J2SDK1.4.0
    start serving pages GREAT!. I have Mysql working perfectly with PHP on this system. I JUST want to connect with JDBC :)
    I've downloaded the MySQL Jdbc Connector/J 3.08 stable installed the .jar file in the $JAVA_HOME/jre/lib/ext as per the README
    Now granted I am a little new to JSP. but I have checked over this again and again. used different code. connected as many ways as I can think of and I still get the same result.
    Database Error :
    No suitable driver
    Please Try Some Other Time
    So I figure it's a MYSQL issue. no I also went thru and did the Microsot connection to MS SQL 2000 with the same result.
    Here's where the drivers are (tried using the other method for installing the MySQL connector as well, and my class path
    Y:\j2sdk1.4.0\com\mysql\jdbc\Driver.class
    com.mysql.jdbc.Driver.class
    Y:\j2sdk1.4.0\org\gjt\mm\mysql\Driver.class
    org.gjt.mm.mysql.Driver.class
    My classpath is:
    .;F:\j2sdk1.4.0\;F:\j2sdk1.4.0\bin\;F:\j2sdk1.4.0\lib\;F:\j2sdk1.4.0\lib\classes\
    [ Here's The Enviorment]
    Windows 2000 5.00.2195 SP3
    MS SQL 2K SP3
    Apache Tomcat/4.1.27
    j2sdk1.4.0
    MySql 3.23.57-nt
    mysql Jdbc Connector/J 3.08 stable
    <!-- mysql.jsp BEGIN-->
    <%@ page import="java.sql.*" %>
    <%
    Connection conn;
    ResultSet results;
    try      {
         String jdbc_driver = "com.mysql.jdbc.Driver";
         System.out.println("jdbc_driver = " + jdbc_driver);
         Class.forName(jdbc_driver).newInstance();
         catch (ClassNotFoundException cnfe)
         System.out.println(cnfe.getMessage());
    try      {
         String url = "jdbc:mysql://localhost:3306/javatest?username=root,password=****"; // pass hidden
         conn = DriverManager.getConnection(url);
         System.out.println("connected to mySql DataBase");
         Statement stmt = conn.createStatement();
         Statement smt=conn.createStatement();
         results=smt.executeQuery("select * from testdata");
              while(results.next())
                   %>
                   <%= results.getString("foo")%>
                   <%= results.getString("bar")%>
                   <%= results.getString("id")%>
                   <%
              results.close();
              conn.close();
         catch(Exception exp)
         %>
              <H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
         <%
    %>
    <!-- mysql.jsp end -->
    BTW i aslo tried connecting to MicrosoftSQL 2K
    <!-- microsoft.jsp Begin -->
    <%@ page import="java.sql.*" %>
    <%
    Connection conn;
    ResultSet results;
    try      {
         String jdbc_driver = "sun.jdbc.odbc.JdbcObdcDriver";
         System.out.println("jdbc_driver = " + jdbc_driver);
         Class.forName(jdbc_driver).newInstance();
         catch (ClassNotFoundException cnfe)
         System.out.println(cnfe.getMessage());
    try      {
         String url = "jdbc:odbc:contacts";
         String username = "javauser";
         String pw = "javauser";
         conn = DriverManager.getConnection(url, username, pw);
         System.out.println("connected to Msoft DataBase");
         Statement stmt = conn.createStatement();
         Statement smt=conn.createStatement();
         results=smt.executeQuery("select * from contacts");
              while(results.next())
                   %>
                   <%= results.getString("name")%><br>
                   <%
              results.close();
              conn.close();
         catch(Exception exp)
         %>
              <H3>Database Error : </H3><B><%= exp.getMessage() %></B><H3>Please Try Some Other Time</H3>
         <%
    %>
    <!-- microsoft.jsp end -->
    got the exact same results.
    Just to show you mysql is Good. with localhost.
    mysql -u root -h localhost -p
    mysql> use javatest
    Database changed
    mysql> select * from testdata;
    | id | foo | bar |
    | 1 | hello | 12345 |
    1 row in set (0.00 sec)
    mysql>

    Nope, it's not a MySQL issue.
    I'd recommend NOT putting the JDBC JAR file (or any others, except Sun-sanctioned extensions) in JAVA_HOME/jre/lib/ext.
    JDBC JARs belong in TOMCAT_HOME/common/lib or in the WEB-INF/lib directory for your particular app. If you put them in the former, all apps running under Tomcat can have access to them. If you put them in the latter, only your app can see them.
    After you've done that, do some reading about JNDI data sources under Tomcat:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    That way you can get that connection code out of your JSPs and into the web.xml and <Context>, where it belongs. You'll be able to change data sources without rewriting your pages.
    Good luck - MOD

  • Which jdbc driver should be used for sqlserver 2000 and where to put it.

    hi all,
    My odi is 11g. I met the error infor "Could not load JDBC driver class [com.microsoft.sqlserver.jdbc.SQLServerDriver]" when i tried to connect to a sqlserver2000 database.
    The questions are:
    1. which jdbc driver should be used for sqlserver 2000?
    2. which folder to put it in?
    3. how to set the physical topological "Microsoft Sql Server" to use this jdbc driver?
    failed tries:
    i downloaded the driver "SQL Server 2000 Driver for JDBC Service Pack 2" and put it in the following folders:
    1. .../oracledi/drivers, and set this path to CLASSPATH.
    2. .../oracledi/userlib didn't exist, i created it and put the driver in.
    3. .../oracledi/agent/dirvers, in which a readme file exists and told me to put drivers in this folder.
    All these works were not useful. when I start odi.sh and try to connect to sqlserver2000 database, the same error infor came up.
    my environment is:
    os: Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    java: Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
    ODI: 11g, installed in /users/oracle/odi/
    please help me,thanks a lot.
    jun
    帖子经 Jun编辑过

    Hi,
    You should check which JVM version is required by that version of the driver, I think the 2.x versions require a 1.6 JVM
    What error are you getting? If it is the "com.sunopsis.sql.c: No suitable driver", it indicates it can't find the jar file (sqljdbc.jar) for the driver you specify.
    Drivers folder in ODI 11g is under
    C:\oracle\product\11.1.1\Oracle_ODI_1\oracledi\agent\drivers.
    if you are using the standolone version
    On windwos :
    C:\Documents and Settings\<userName>\Application Data\odi\oracledi\userlib
    on linux
    $HOME/.odi/oracledi/userlib
    Have a read of :- http://download.oracle.com/docs/cd/E14571_01/core.1111/e16453/install.htm#CHDBIFAJ
    Thanks,
    Sutirtha

  • JDBC driver - Class oracle.jdbc.driver.OracleDriver not found.

    Greetings:
    When I tried to compile an test script (as attached below) to test the driver, I always ended up with the following error message:
    ....java:17: Class oracle.jdbc.driver.OracleDriver not found.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Could somebody shine some light on it? I would very much appreciate it.
    By the way, I have an Oracle DBMS (8.1.7) with jre1.1.7. My Java is jdk1.2 and the driver is ocijdbc8.dll
    Wil
    *************** The test script *************
    import java.sql.*;
    class Users
    public static void main (String args [])
    throws SQLException, ClassNotFoundException
    // Load the Oracle JDBC driver
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    // Connect to the database
    // You can put a database name after the @ sign in the connection URL.
    Connection conn =
    DriverManager.getConnection ("jdbc:oracle:oci8:@US10", "QM24202E", "QM24202E");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select ... table
    ResultSet rset = stmt.executeQuery ("select USERID from USERS");
    // Iterate through the result and print the ... names
    while (rset.next ())
    System.out.println (rset.getString (1));

    check out what thomas Fly wrote on another discussion forum about connection with JDBC, i tried it and i haven't gotten it
    to work yet but at least i don't have the "... not found" error,
    you should try it too, and i think it's good to tell you that i
    still haven't installed the oracle client on my windows Me PC.
    Hope this help you
    This may help also... I have Oracle installed on a Linux PC at 192.168.1.4 on my LAN, listening on port 1521. I can connect from another PC (Linux / Windows ME dual boot, though running Windows at the time of this experiment) using the following program:
    import java.sql.*;
    public class sqlLookup {
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
    String dbUrl = "jdbc:oracle:thin:@192.168.1.4:1521:ORA8";
    String user = "thomasfly";
    String password = "maverick";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection c = DriverManager.getConnection(dbUrl, user, password);
    Statement s = c.createStatement();
    // SQL code:
    ResultSet r = s.executeQuery("select * from members");
    while(r.next()) {
    // Capitalization doesn't matter:
    System.out.println(r.getString("Name") + ", " + r.getString("id") + ": " + r.getString("email") );
    s.close(); // Also closes ResultSet
    I downloaded classes12.zip for Oracle 8.1.7 and put it into the C:\Windows directory, and mounted C:\Windows\classes12.zip in Forte for Java (equivalent to adding it to the classpath if I were running the program from a DOS window, rather than in Forte).
    ORA8... capitalization may be important... is the name of my database, which may be found in the tnsnames.ora file in $ORACLE_HOME/resources.
    The query gets the Name, id, and email fields from the table "members" in the database.
    This is just a barebones program, and each time it's run, the Oracle listener has to be stopped and restarted before the program can be successfully run again.

  • Cannot load login module class

    Hi,
    i'm working on customizing Login Module now.
    i have bulit the project and deploy the SDA file follow this link "[sap help|http://help.sap.com/saphelp_nw70/helpdata/en/76/08b34095070361e10000000a155106/frameset.htm]".
    My Java project name is: MyLoginModule, with class file "MyLoginModuleClass" in "com.mycompany" package.
    And my library project name is: MyLoginModuleLibrary, with "MyLoginModule.jar" in Jars,
    and with "security_api" "com.sap.tc.logging" "com.sap.engin.lib.add_ejb" "security.class" "com.sap.security.api.sda" "com.sap.security.core.sda" in reference
    After these steps, logon is failed.
    and i get some log using "Note 1045019 - Web diagtool" below:
    LOGIN.FAILED
    User: N/A
    Authentication Stack: ticket
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.security.core.server.jaas.EvaluateTicketLoginModule
    --- SUFFICIENT  ok          false                 true      
    2. com.mycompany.MyLoginModuleClass
    --- OPTIONAL                                                 Cannot load login module class. com.mycompany.MyLoginModuleClass
    Found in negative cache
    ---Loader Info ---
    ClassLoader name: [common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;library:security.class;library:webservices_lib;service:adminadapter;service:basicadmin;
    service:com.sap.security.core.ume.service;service:configuration;service:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notification;service:keystore;service:security;service:userstore
    Parent loader name: [Frame ClassLoader]
    References:
    Why didn't i see MyLoginModuleLibrary in "ClassLoader name" though i've add it in ConfigTool already.
    Maybe this is the reason  "cannot load login module calss com.mycompany.MyLoginModule"?
    Any  suggestion?
    Regards,
    Fishy

    hi
    this will give some idea
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/23e4407211732ae10000000a155106/content.htm
    http://docs.sun.com/app/docs/doc/820-4801/gbyuw?a=view
    Re: Deploying a custom login module to the J2EE engine
    bvr
    Edited by: bvr on May 7, 2009 12:53 PM

  • SOA WebLogic : Cannot load JDBC driver class

    Hi, I'm new to this Oracle SOA World. Currently I'm trying to configure environment on my system. I found a very useful document to install all related SOA component to my system, the document name was 'Quick Start Guide for Oracle® SOA Suite 11gR1 (11.1.1.5.0)'. I did all the steps written in the document and have installed all the components successfully, component including Database, Jdevelper, WebLogic Server, RCU, SOA suite, service bus, all are installed successfully.
    But when I'm trying to Configure Application Server (start -> Oracle SOA 11g-Home1), at one step 'Configure JDBC Component Schema' , here I'm getting this message
    * The driver class listed below was not found in product installation
    vendor: Derby
    Driver: org.apache.derby.jdbc.clientdriver
    A Test will not be performed on any database connections using this driver
    In addition, when i just ignore this message and continue installation, after installation when i run weblogic server then it gives error and gets terminated
    here is weblogic server log:
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    Listening for transport dt_socket at address: 8453
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b50)
    Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xdebug -Xnoagent -Xrunjdwp:transpo
    rt=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx
    1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.
    security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Xveri
    fy:none -Xverify:none -da:org.apache.xmlbeans... -ea -da:com.bea... -da:javeli
    n... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbcons
    ole... -Dplatform.home=C:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE
    ~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dcom
    mon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apach
    e.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=
    C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2 -Djrockit.optfile=C:\Oracle\MIDDLE~
    1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.
    dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\config\FMWCON~1\servers\AdminSe
    rver -Doracle.domain.config.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\con
    fig\FMWCON~1 -Digf.arisidbeans.carmlloc=C:\Oracle\MIDDLE~1\USER_P~1\domains\BAS
    E_D~2\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Oracle\MIDDLE~1\USER_P~1\
    domains\BASE_D~2\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\
    Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\config\fmwconfig\jps-config.xml -Dorac
    le.deployed.app.dir=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2\servers\AdminSe
    rver\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirector
    y=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\O
    RACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.md
    s.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.com
    mon.uddiurl.handler"|"oracle.bpm.io.fs.protocol -Dweblogic.jdbc.remoteEnabled=f
    alse -da:org.apache.xmlbeans... -Dsoa.archives.dir=C:\Oracle\Middleware\Oracle_
    SOA1\soa -Dsoa.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dsoa.instance.home=
    C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~2 -Dtangosol.coherence.clusteraddress
    =227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -D
    javax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dwebl
    ogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=t
    rue -Djavax.net.ssl.trustStore=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrus
    t.jks -Dem.oracle.home=C:\Oracle\Middleware\oracle_common -Djava.awt.headless=tr
    ue -Dums.oracle.home=C:\Oracle\Middleware\Oracle_SOA1 -Dweblogic.management.disc
    over=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dwe
    blogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifes
    t_classpath;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_c
    lasspath weblogic.Server
    Listening for transport dt_socket at address: 8453
    <2012-mar-02 kl 21:14 CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE
    Provider self-integrity check for better startup performance. To enable this ch
    eck, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <2012-mar-02 kl 21:14 CET> <Info> <Security> <BEA-090906> <Changing the default
    Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable th
    is change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <2012-mar-02 kl 21:14 CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLog
    ic Server with Java HotSpot(TM) Client VM Version 19.1-b02 from Sun Microsystems
    Inc.>
    <2012-mar-02 kl 21:14 CET> <Info> <Management> <BEA-141107> <Version: WebLogic S
    erver 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638 >
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STARTING>
    <2012-mar-02 kl 21:14 CET> <Info> <WorkManager> <BEA-002900> <Initializing self-
    tuning thread pool>
    <2012-mar-02 kl 21:14 CET> <Notice> <Log Management> <BEA-170019> <The server lo
    g file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServe
    r\logs\AdminServer.log is opened. All server side log events will be written to
    this file.>
    <2012-mar-02 kl 21:14 CET> <Notice> <Security> <BEA-090082> <Security initializi
    ng using security realm myrealm.>
    <2012-mar-02 kl 21:14 CET> <Warning> <oracle.as.jmx.framework.MessageLocalizatio
    nHelper> <J2EE JMX-46041> <The resource for bundle "oracle.jrf.i18n.MBeanMessage
    Bundle" with key "oracle.jrf.JRFServiceMBean.checkIfJRFAppliedOnMutipleTargets"
    cannot be found.>
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STANDBY>
    <2012-mar-02 kl 21:14 CET> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to STARTING>
    <2012-mar-02 kl 21:15 CET> <Critical> <JTA> <BEA-110482> <A logging last resourc
    e failed during initialization. The server cannot boot unless all configured log
    ging last resources (LLRs) initialize. Failing reason:
    weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
    org.apache.derby.jdbc.ClientDriver
    weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
    org.apache.derby.jdbc.ClientDriver
    at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:3
    01)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
    ionEnvFactory.java:75)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionE
    nvFactory.java:131)
    at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactor
    y(ConnectionPool.java:712)
    at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.
    java:235)
    Truncated. see log file for complete stacktrace
    >
    <2012-mar-02 kl 21:15 CET> <Error> <Deployer> <BEA-149205> <Failed to initialize
    the application 'wlsbjmsrpDataSource' due to error weblogic.application.ModuleE
    xception: .
    weblogic.application.ModuleException:
    at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:302)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:517)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:52)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:159)
    Truncated. see log file for complete stacktrace
    Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load dri
    ver class: org.apache.derby.jdbc.ClientDriver
    at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:3
    01)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
    ionEnvFactory.java:75)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionE
    nvFactory.java:131)
    at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactor
    y(ConnectionPool.java:712)
    at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.
    java:235)
    Truncated. see log file for complete stacktrace
    >
    <2012-mar-02 kl 21:16 CET> <Alert> <OSB Security> <BEA-387068> <There is no PKI
    credential mapper provider configured in your security realm. Service key provid
    er management will be disabled. Configure a PKI credential mapper provider if yo
    u need service provider support. This is typically the case if you have Oracle S
    ervice Bus proxy services with web service security enabled or outbound 2-way SS
    L connections.>
    <2012-mar-02 kl 21:16 CET> <Warning> <Coherence> <BEA-000000> <Oracle Coherence
    3.6.0.4 (member=n/a): Local address "127.0.0.1" is a loopback address; this clus
    ter node will not connect to nodes located on different machines>
    <2012-mar-02 kl 21:17 CET> <Warning> <J2EE> <BEA-160140> <Unresolved optional pa
    ckage references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.applcore.mod
    el, Specification-Version: 0.1, Implementation-Version: 11.1.1.0.0, referenced f
    rom: C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\
    tmp\_WL_user\usermessagingserver\a7bt7z]. Make sure the referenced optional pack
    age has been deployed as a library

    Hi:
    try placing the jars that represent ur driver, here
    For both Windows and Linux, you must perform the following steps:
    Drop the vendor-specific driver JAR files to the user_projects/domains/soainfra/lib directory.
    Drop the vendor-specific driver JAR files to the <Weblogic_Home>/server/lib.
    Edit the classpath to include the vendor-specific jar file in <Weblogic_HOME>/common/bin/commEnv.sh
    This info was copied, from here: http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_db.htm#CHDBEJDC
    Hope this helps
    best

  • Java.sql.SQLException: Cannot load JDBC driver class 'null'

    Hi,
    I am a beginner of using jdbc, i use the tomcat4.1.x, mysql3.23.54 and it's jdbc driver 2.0.14. I place the drive <in jar file> in tomcat/commons/lib and configure the server.xml, web.xml and some testing coding. But there are some error like the following:
    java.sql.SQLException: Cannot load JDBC driver class 'null'
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
         at foo.DBTest.init(DBTest.java:18)
         at org.apache.jsp.test_jsp._jspService(test_jsp.java:48)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
    of course its some of the error code and there are more.
    Why I have this problems and how can I fix it? Can someone help me??
    Thanks,
    Tong
    I place my test.jsp at tomcat/webapps/DBTest and DBTest.java at tomcat/webapps/DBTest/WEB-INF/classes/foo
    additional of the tomcat/conf/server.xml
    <Resource name="TestDB" auth="Container" type="javax.sql.DataSource" description="MySQL TestDB"/>
    <ResourceParams name="TestDB">
    <parameter><name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter><name>maxActive</name><value>10</value></parameter>
    <parameter><name>maxIdle</name><value>1</value></parameter>
    <parameter><name>maxWait</name><value>10000</value></parameter>
    <parameter><name>username</name><value>javauser</value></parameter>
    <parameter><name>password</name><value>javadude</value></parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.gjt.mm.mysql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    tomcat/webapps/DBTest/WEB-INF/web.xml :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>MySQL Test App</description>
    </web-app>

    Post the part of your code that loads the driver and connects. My guess is you are using a variable for the name of the driver and the variable has not been set to anything(intially set to null).
    Thanks
    Cardwell

  • Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

    Hi,
    I'm trying to run my web app and connect to a MySQL database but keep getting this error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
    any ideas?
    Thanks!

    Lookup the stacktrace and find the root cause of the exception.
    My cents on a ClassNotFoundException which is rather self-explaining.
    By the way, the mentioned driver class name is a very old driver. You shouldn't be using that anymore. Surf to the MySQL homepage and download the most recent Connector/J JDBC driver for your database version. Documentation is also available over there.

  • Error: The target database JDBC driver class cannot be loaded

    Hi
    We have a GTC DB connector deployed and configured in one environment. We are able to provision the users to DB table in that environment.
    Then we have taken export of all related data objects(like IT Resource, Resource Obj, Process Defs, Adapter tasks, etc) and imported to another environment.
    In this environment we changed the conn parameters in IT resource and made sure that all the files has been copied to respective folders under Xellerate.
    When ever we try to provision user to the DB it throws an error message as The target database JDBC driver class cannot be loaded as a response and the create user task is rejected.
    Database: MS SQL Server.
    App Server: WebSphere App Server 6.1
    OIM: 9.1.0.1
    Does any one faced this type of issue??
    Thanks

    Thanks lot for the quick response.
    I have copied the sqljdbc.jar file to the ThirdParty folder and restarted in App server. Now that the earlier error "The target database JDBC driver class cannot be loaded" is not appearing while provisioning in the rejected task.
    I am getting a new error "GCPROV.ProvTransportProvider.DBProvisioningTransport.DB_GET_CONNECTION_ERROR".
    Can you please let me know the reason for this. All the connections parameters are correct to connect to the target databse.
    Waiting for the response.

  • Load JDBC driver class 'null'

    hi all :)
    i'm using a datasource (tomcat 4.1.18 with jdk 1.4)
    i'm the following error :
    java.sql.SQLException: Cannot load JDBC driver class 'null'my classes12.jar find in $CATALINA_HOME/common/lib
    where is ma error ?
    thanks a lot.

    GlobalNamingResources?
    I sent up a data source for each app, like this:
    <Context    path="/api-prototype"
                docBase="api-prototype.war"
                debug="1"
                reloadable="true"
                crossContext="true"
                useNaming="true">
        <Logger className="org.apache.catalina.logger.FileLogger"
                prefix="localhost-api-prototype-log."
                suffix=".txt"
                timestamp="true"/>
        <Resource   name="jdbc/APIPrototype"
                    auth="Container"
                    type="javax.sql.DataSource"/>
    <!-- Oracle 9.2.0.1 data source -->
        <ResourceParams name="jdbc/APIPrototype">
            <parameter>
                <name>factory</name>
                <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </parameter>
            <parameter>
                <name>driverClassName</name>
                <value>oracle.jdbc.driver.OracleDriver</value>
            </parameter>
            <parameter>
                <name>url</name>
                <value>jdbc:oracle:thin:@elvis:1521:CAPP</value>
            </parameter>
            <parameter>
                <name>username</name>
                <value>api</value>
            </parameter>
            <parameter>
                <name>password</name>
                <value>mod</value>
            </parameter>
            <parameter>
                <name>maxActive</name>
                <value>20</value>
            </parameter>
            <parameter>
                <name>maxIdle</name>
                <value>0</value>
            </parameter>
            <parameter>
                <name>maxWait</name>
                <value>60000</value>
            </parameter>
            <parameter>
                <name>removeAbandoned</name>
                <value>true</value>
            </parameter>
            <parameter>
                <name>removeAbandonedTimeout</name>
                <value>300</value>
            </parameter>
        </ResourceParams>
    </Context>This works fine on Tomcat 4.1.24. I don't know where you got that example from, but I'd recommend that you look at the Tomcat JNDI How-to:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    Why go anywhere else? - MOD

  • Microsoft jdbc driver class not found error

    hello,
    i have installed jdbc driver for 2005 from microsoft. i have put sqljdbc.jar in the classpath as well as in jbuilder 2006 library. still i get the following error.
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at dbinfo.dbinfo.getConnection(dbinfo.java:27)
    at dbinfo.dbinfo.displayDbProperties(dbinfo.java:64)
    at dbinfo.dbinfo.main(dbinfo.java:150)
    Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Error: No active Connection
    what am i missing?

    i have the same problem can anyone help me in setting the classpath to the drivers. i am new to java plz help me
    thanks in advance

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver

    Hi all,
    i'm trying jsp and ms sql 200 connection...
    here is the code i use:
    <html>
    <head>
    <%@ page
         import = "java.io.*"
         import = "java.lang.*"
         import = "java.sql.*"
    %>
    <title>ma quanto so bravo</title>
    </head>
    <body>
    <%
         String     place;
         Connection dbconn;
         ResultSet results;
         PreparedStatement sql;
         //SQL server 2000
         String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String sourceURL = "jdbc:microsoft:sqlserver://192.168.0.14:31000;databasename=prova";
    String username = "sa";
    String password = "riccio72";
         try
              //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
              try
                   int     latitude,longitude,easting,northing;
                   boolean     doneheading = false;
                   //dbconn = DriverManager.getConnection("jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=E:\\ATTENTATO\\Pubblicazione\\vecchia pubblicazione\\jsp\\collegamento a db\\prova.mdb");
                   dbconn = DriverManager.getConnection(sourceURL, username, password);
                   place = request.getParameter("place");
                   sql = dbconn.prepareStatement("SELECT * FROM info WHERE name = '" + place + "'");
                   results = sql.executeQuery();
                   while(results.next())
                        if(! doneheading)
                             doneheading = true;
    latitude = results.getInt("latitude");
    longitude = results.getInt("longitude");
    easting = results.getInt("easting");
    northing = results.getInt("northing");
                        out.println("<table border=2>");
                        out.println("<tr><td>" + latitude);
                        out.println("<td>" + longitude);
                        out.println("<td>" + easting);
                        out.println("<td>" + northing);
                        out.println("</tr></table> <br>");
                   //if(doneheading)
                   results.close();
                   dbconn.close();
                   if(! doneheading)
                        out.println("No matches for " + place);
              catch (SQLException s)
                   out.println("SQL Error<br>");
                   out.print(s);
         catch (ClassNotFoundException err)
              out.println("Class loading error");
    %>
    </body>
    </html>
    Place is a variable from anothe page
    i have this error Class loading error
    How can i set this problem'?
    i have installed jrun4 sql 2000 and jdbc driver from microsoft
    i have read that i have to set the classpath and register the driver but i need particular description on how to do it
    thx

    Hi all,
    I am facing some serious problem regarding the same,
    I have done the SQL server connectivity successfully.
    But when I create the executable file of the class file, it gives me error.
    I am sending the code,
    *************** DBInterface.java ***********************
    import java.*;
    import java.sql.*;
    import javax.swing.*;
    import java.util.*;
    import com.microsoft.jdbc.sqlserver.SQLServerDriver;
    public class DbInterface
      //Connection Parameters
        protected static java.sql.Connection  con = null;
        protected final String url = "jdbc:microsoft:sqlserver";
        protected final String serverName= "localhost";
        protected final String portNumber = "1433";
        protected final String databaseName= "DBCONNECT";
        protected final String userName = "sa";
        protected final String password = "PASSWORD";
        // constructor
        protected DbInterface()
         try
            con= this.getConnection();     
            if(con!=null)
         System.out.println("Successfully connected!");
           else
          System.out.println("Error: No active Connection");
       catch(Exception e)
                  e.printStackTrace();
    // returns url string
    protected String getConnectionUrl()
      {             return url+"://"+serverName+":"+portNumber+";databaseName="+databaseName;
       // function which connects to database
      protected java.sql.Connection getConnection()
           try{
                    Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                     Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                     con = DriverManager.getConnection(getConnectionUrl(),userName,password);
                    if(con!=null) System.out.println("Connection Successful!");
              }catch(Exception e){
               JOptionPane.showMessageDialog(new JFrame(), e.getMessage(), "Error Message", JOptionPane.ERROR_MESSAGE);
                   e.printStackTrace();
                   System.out.println("Error Trace in getConnection() : " + e.getMessage());
              return con;
    protected void closeConnection()
              try{
                   if(con!=null)
                        con.close();
                   con=null;
                   System.out.println("Close Connection");             
              catch(Exception e)
                   e.printStackTrace();
    ********* TestConnection.java************************
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class  TestConnection
       public static void main(String[] args)
               DbInterface getlive = new DbInterface();
               if(DbInterface.con != null)
                 JOptionPane.showMessageDialog(new JFrame(), "Successfully Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
                  getlive.closeConnection();
              else
         JOptionPane.showMessageDialog(new JFrame(), "Not Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
               System.exit(0);
    }Both this files are compiled well.
    Now when I create an excutable file for this, it unable to connect sql server.
    (Note : I have created executable file using JSmooth & also tried with manually jar executable.)
    Can somebody focus on this issues?
    Thanx & Regards,
    Mahesh

  • SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

    Hi...Experts....
    Requirement:
    From our PI 7.1 System we have to connect to MS-SQL Server 2000 using JDBC.
    Execution :
    We have downloaded
    Microsoft SQL Server JDBC Driver 3.0 ...and...Microsoft SQL Server JDBC Driver 2.0 ( We mean we tried both drivers)and deployed using JSPM in PI system
    To deploy this ..We used & reviewed the following notes
    Note 0000831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter
    Note 0001138877 - PI 7.1 : How to Deploy External Drivers JDBC/JMS Adapters
    Note 0000850116 - XI 3.0 / PI 7.0 JDBC Adapter: Type 2 JDBC Driver Deployment
    Note 0001123333 - Redeploying same component with JSPM
    Issue Observation Path :
    in JSPM ...The deployment is successfull
    But in
    >Runtime Workbench NetWeaver Administrator
    >>Component Monitoring
    >>>Compnenet with status ..ALL...[DISPLAY]
    >>>Adapter Engine
    >>>>Communication Channel 
    We continuioulsy see the following error
    ERROR :
    Error during database connection to the database URL 'jdbc:microsoft:sqlserver://101.197.135.118:1433;databaseName=LWV' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://101.197.135.118:1433;databaseName=LWV': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
    ERROR:
    In this Juncture...We have 2 queires.
    01. How to make the Deployed JDBC Driver avaialbiliy in the system.
    02. Any other alternate way to make sure our self deployed JDBC well installed in system and can be used from PI Console.
    Regards
    PR

    Imran ...Thank U Very much...
    We could able to move forward.
    as in Java Instance :
    In directory : DRIVE:\usr\sap\<SID>\DVEBMGS<NN>j2ee\cluster
    We can see : instance.properties
    We copied the  3 files  (01) sqljdbc4.jar, (02) msutil.jar, (03) msbase.jar  into a directory like
    DRIVE:\usr\sap\<SID>\DVEBMGS<NN>j2ee\cluster\bin\ext\com.sap.aii.adapter.lib\lib\
    In the "configtool"  we configured these 3 jar files in class path like :
    DRIVE:\usr\sap\<SID>\DVEBMGS<NN>j2ee\cluster\bin\ext\com.sap.aii.adapter.lib\lib\sqljdbc4.jar;
    DRIVE:\usr\sap\<SID>\DVEBMGS<NN>j2ee\cluster\bin\ext\com.sap.aii.adapter.lib\lib\msutil.jar;
    DRIVE:\usr\sap\<SID>\DVEBMGS<NN>j2ee\cluster\bin\ext\com.sap.aii.adapter.lib\lib\msbase.jar
    and restarted the Instance, which in turn updated the instance.properties
    and we could see the errors stopped coming in the "XI Runtime WorkBench - Component Monitoring"
    We could see as
    >>>Processing started
    >>>Processing finished successfully
    >>>Polling interval started. Length: 60.0 seconds
    So we understood, the connection could db server and we conformed we moved a head on the issue
    Summarized Notes List :
    Note 0000831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter
    Note 0001138877 - PI 7.1 : How to Deploy External Drivers JDBC/JMS Adapters
    Note 0000850116 - XI 3.0 / PI 7.0 JDBC Adapter: Type 2 JDBC Driver Deployment
    Note 0001123333 - Redeploying same component with JSPM
    Note 0000639702 - JDBC Driver for Microsoft SQL Server
    Rgds
    PR

Maybe you are looking for

  • How to password protect the adobe form ?

    Hello, I am very new to this livecycle designer. Can anyone please tell me how to password protect the adobe form(it can be print or interactive form) ? can it be done through scripting ? Regards, Menaka.H.B

  • HR payslip - tcode PE51 -- problem with font

    Hi ,   I have developed HR payslips using transaction PE51 to print HR payslips. Now all the data & the alignment is fine. Only problem iam facing is its printing everything in BOLD. Its printing think & Bold. How do i remove the bold. Because there

  • Add Timestamp to log out put

    Hello, I would like to add timestamp to sql output file but can't seem to find the solution on the web. Tried to use "set echo on", "set serveroutput on", "set time on" but it does not add timestamp to actual output as below example shows. set echo o

  • IPad Air apps won't install Shows as intalled

    I have downloaded apps from app store they show as being installed while downloading then go away and do not show on iPad after downloads completes. When I check the app store they show as intalled with an open button next to them. Clicking on the op

  • Teaming servers to multiple switches

    I am looking for a configuration guide / example that shows how to connect a Server with multiple NIC's to 2 different switches for failover. The servers could be Window's or Unix based. Thank you.