Java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDri

I am sorry in advance, because I know this topic has been posted many times, but I think after reading all the solutions and trying everything I may have messed myself up worse.
I am trying to run this simple script to connect to my SQL database
import java.sql.*;
  * Microsoft SQL Server JDBC test program
public class Test {
  public Test() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://<Host>:1433","<UID>","<PWD>");
    if (connection != null) {
     System.out.println();
      System.out.println("Successfully connected");
      System.out.println();
      // Meta data
      DatabaseMetaData meta = connection.getMetaData();
      System.out.println("\nDriver Information");
      System.out.println("Driver Name: "
       + meta.getDriverName());
      System.out.println("Driver Version: "
       + meta.getDriverVersion());
      System.out.println("\nDatabase Information ");
      System.out.println("Database Name: "
       + meta.getDatabaseProductName());
      System.out.println("Database Version: "+
      meta.getDatabaseProductVersion());
} // Test
public static void main (String args[]) throws Exception {
  Test test = new Test();
}I have set "PATH" in environmental variables (running windows)to be
C:\Program Files\Java\jdk1.6.0_04\bin;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jarSo when i Compile i get the error..
C:\SQLcode>javac Test.java
Test.java:9: package com.microsoft.jdbc.sqlserver does not exist
    com.microsoft.jdbc.sqlserver.SQLServerDriver());Additionally, when i run
java com.microsoft.jdbc.sqlserver.SQLServerDriver
I get
Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/jdbc/sq
lserver/SQLServerDriver
Caused by: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLSer
verDriverFinally, I have even ran javac -classpath "C:\Program Files\Microsoft SQL Server 2000 Driver f
or JDBC\lib\;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msba
se.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserve
r.jar;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar"
Test.java Which will compile correctly! However when I run the same command just with the java command as opposed to the javac command, I get
Exception in thread "main" java.lang.NoClassDefFoundError: Test/java
Caused by: java.lang.ClassNotFoundException: Test.java
        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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source) While there is a Class file in the directory.. Sorry for such a long post but I have been trying to fix this for two days now.. thank you

Ok well i tried a number of combinations..
My code lets say is in a folder C:\SQLCode which was successfully compiled using the command above..
I tried doing what you suggested and got
C:\SQLcode>java -cp .;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC
\lib\;C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C
:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar Test
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Microsoft
Caused by: java.lang.ClassNotFoundException: Files\Microsoft
        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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)I also tried without the direct links to the .jar files (just put the DIR) and got the same result.Any other suggestions?

Similar Messages

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

    Dear all
    i am using MSSQL2000 Driver for jdbc, i have set CLASSPATH to the driver install directory, compile passed, but when i run class, a ClassNotFoundException error occur:
    java.lang.ClassNotFoundException:com.microsoft.jdbc.sqlserver.SQLServerDriver
    i am using jdk1.2.2
    hope to get your tips!
    Luke

    Dear all
    i am using MSSQL2000 Driver for jdbc, i have set
    t CLASSPATH to the driver install directory, compile
    passed, but when i run class, a ClassNotFoundException
    error occur:
    java.lang.ClassNotFoundException:com.microsoft.jdbc.sql
    erver.SQLServerDriver
    i am using jdk1.2.2
    hope to get your tips!
    Lukehi Luke,
    I dont know if it is in someway related to ur jdk version..
    but your error message seems to be
    java.lang.ClassNotFoundException:com.microsoft.jdbc.sql
    erver.SQLServerDriver
    Plz consider this possibility if
    u might have given the classname wrong as
    com.microsoft.jdbc.sqlerver.SQLServerDriver
    which throws the exception as shown in the error message!!
    try giving the correct classname as com.microsoft.jdbc.sqlserver.SQLServerDriver
    which may solve your problem..
    cheers,
    -Jer

  • Help me with this  one:java.lang.ClassNotFoundException: com.mysql.jdbc.Dri

    compile and build:Successful
    but when I run it...I got this msg:
    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Administrator\Form\build\classes
    compile:
    run:
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    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:276)
    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:169)
    at my.form.MyDBConnection.init(MyDBConnection.java:26)
    at my.form.FormUI.<init>(FormUI.java:20)
    at my.form.FormUI$40.run(FormUI.java:1094)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)
    I use two classes
    FormUI.java and MyDBConnection.java
    * MyDBConnection.java
    package my.form;
    import java.sql.*;
    public class MyDBConnection {
    private Connection myConnection;
    /** Creates a new instance of MyDBConnection */
    public MyDBConnection() {
    public void init(){
    Connection connection = null;
    Statement statement = null;
    try{
    Class.forName("com.mysql.jdbc.Driver");
    myConnection=DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/test,'root' "
    catch(SQLException sqlException){
    sqlException.printStackTrace();
    System.exit(1);
    catch ( ClassNotFoundException classNotFound )
    classNotFound.printStackTrace();
    System.exit(1);
    finally
    try
    statement.close();
    connection.close();
    catch ( Exception exception )
    exception.printStackTrace();
    System.exit( 1 );
    public Connection getMyConnection(){
    return myConnection;
    public void close(ResultSet rs){
    if(rs !=null){
    try{
    rs.close();
    catch(Exception e){}
    public void close(java.sql.Statement stmt){
    if(stmt !=null){
    try{
    stmt.close();
    catch(Exception e){}
    public void destroy(){
    if(myConnection !=null){
    try{
    myConnection.close();
    catch(Exception e){}
    * FormUI.java
    * Created on May 2, 2007, 10:33 AM
    package my.form;
    import java.sql.*;
    * @author Administrator
    public class FormUI extends javax.swing.JFrame {
    /** Creates new form FormUI */
    public FormUI() throws Exception {
    mdbc=new MyDBConnection();
    mdbc.init();
    Connection conn=mdbc.getMyConnection();
    stmt=conn.createStatement();
    initComponents();
    * MyDBConnection.java
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jTextField3 = new javax.swing.JTextField();
    jTextField35 = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    jTextField5 = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    jTextField6 = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jTextField7 = new javax.swing.JTextField();
    jLabel8 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jLabel9 = new javax.swing.JLabel();
    jTextField8 = new javax.swing.JTextField();
    jLabel10 = new javax.swing.JLabel();
    jTextField9 = new javax.swing.JTextField();
    jLabel11 = new javax.swing.JLabel();
    jTextField10 = new javax.swing.JTextField();
    jLabel12 = new javax.swing.JLabel();
    jTextField11 = new javax.swing.JTextField();
    jLabel13 = new javax.swing.JLabel();
    jTextField12 = new javax.swing.JTextField();
    jLabel14 = new javax.swing.JLabel();
    jTextField13 = new javax.swing.JTextField();
    jLabel15 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jLabel16 = new javax.swing.JLabel();
    jTextField14 = new javax.swing.JTextField();
    jLabel17 = new javax.swing.JLabel();
    jTextField15 = new javax.swing.JTextField();
    jLabel18 = new javax.swing.JLabel();
    jTextField16 = new javax.swing.JTextField();
    jLabel19 = new javax.swing.JLabel();
    jTextField17 = new javax.swing.JTextField();
    jLabel20 = new javax.swing.JLabel();
    jTextField18 = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jTextField19 = new javax.swing.JTextField();
    jLabel22 = new javax.swing.JLabel();
    jTextField20 = new javax.swing.JTextField();
    jLabel23 = new javax.swing.JLabel();
    jTextField21 = new javax.swing.JTextField();
    jLabel24 = new javax.swing.JLabel();
    jTextField22 = new javax.swing.JTextField();
    jLabel25 = new javax.swing.JLabel();
    jTextField23 = new javax.swing.JTextField();
    jLabel26 = new javax.swing.JLabel();
    jTextField24 = new javax.swing.JTextField();
    jLabel27 = new javax.swing.JLabel();
    jTextField25 = new javax.swing.JTextField();
    jLabel28 = new javax.swing.JLabel();
    jTextField26 = new javax.swing.JTextField();
    jLabel29 = new javax.swing.JLabel();
    jTextField27 = new javax.swing.JTextField();
    jLabel30 = new javax.swing.JLabel();
    jTextField28 = new javax.swing.JTextField();
    jLabel31 = new javax.swing.JLabel();
    jTextField29 = new javax.swing.JTextField();
    jLabel32 = new javax.swing.JLabel();
    jTextField30 = new javax.swing.JTextField();
    jLabel33 = new javax.swing.JLabel();
    jTextField31 = new javax.swing.JTextField();
    jLabel34 = new javax.swing.JLabel();
    jTextField32 = new javax.swing.JTextField();
    jLabel35 = new javax.swing.JLabel();
    jTextField33 = new javax.swing.JTextField();
    jLabel36 = new javax.swing.JLabel();
    jTextField34 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel37 = new javax.swing.JLabel();
    jLabel38 = new javax.swing.JLabel();
    jTextField37 = new javax.swing.JTextField();
    jTextField36 = new javax.swing.JTextField();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jPanel1.setBackground(new java.awt.Color(204, 255, 204));
    jLabel1.setText("custID");
    jLabel2.setText("PIN");
    jLabel3.setText("Source");
    jLabel4.setText("SaleDate");
    jTextField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField1ActionPerformed(evt);
    jTextField2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField2ActionPerformed(evt);
    jTextField3.setText("SourceHub");
    jTextField3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField3ActionPerformed(evt);
    jTextField35.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField35ActionPerformed(evt);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(28, 28, 28)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel1)
    .addComponent(jLabel2))
    .addGap(15, 15, 15)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)
    .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel3)
    .addComponent(jLabel4))
    .addGap(13, 13, 13)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField35)
    .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE))
    .addGap(198, 198, 198))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addGap(21, 21, 21)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel1)
    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel3))
    .addGap(18, 18, 18)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jLabel2)
    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel4)
    .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(23, Short.MAX_VALUE))
    jPanel3.setBackground(new java.awt.Color(204, 255, 204));
    jLabel5.setText("First Name");
    jTextField5.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField5ActionPerformed(evt);
    jLabel6.setText("Last Name");
    jTextField6.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField6ActionPerformed(evt);
    jLabel7.setText("Address");
    jTextField7.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField7ActionPerformed(evt);
    jLabel8.setText("City");
    jTextField4.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField4ActionPerformed(evt);
    jLabel9.setText("ZIP");
    jTextField8.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField8ActionPerformed(evt);
    jLabel10.setText("Sales Rep");
    jTextField9.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField9ActionPerformed(evt);
    jLabel11.setText("Phone");
    jTextField10.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField10ActionPerformed(evt);
    jLabel12.setText("Alt Phone");
    jTextField11.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField11ActionPerformed(evt);
    jLabel13.setText("E-Mail");
    jTextField12.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField12ActionPerformed(evt);
    jLabel14.setText("DateofBirth");
    jTextField13.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField13ActionPerformed(evt);
    jPanel2.setBackground(new java.awt.Color(204, 255, 204));
    jLabel16.setText("AnnualAmount");
    jTextField14.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField14ActionPerformed(evt);
    jLabel17.setText("AnnualDay");
    jTextField15.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField15ActionPerformed(evt);
    jLabel18.setText("AnnualMonth");
    jTextField16.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField16ActionPerformed(evt);
    jLabel19.setText("MonthlyAmount");
    jTextField17.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField17ActionPerformed(evt);
    jLabel20.setText("MonthlyDay");
    jTextField18.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField18ActionPerformed(evt);
    jLabel21.setText("MonthlyStatusDate");
    jTextField19.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField19ActionPerformed(evt);
    jLabel22.setText("AnnualStatus2");
    jTextField20.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField20ActionPerformed(evt);
    jLabel23.setText("MonthlyStatus2");
    jTextField21.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField21ActionPerformed(evt);
    jLabel24.setText("Plan");
    jTextField22.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField22ActionPerformed(evt);
    jLabel25.setText("Bonus Gift");
    jTextField23.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField23ActionPerformed(evt);
    jLabel26.setText("AccountType");
    jTextField24.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField24ActionPerformed(evt);
    jLabel27.setText("AbaNumber");
    jTextField25.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField25ActionPerformed(evt);
    jLabel28.setText("AccountNumber");
    jTextField26.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField26ActionPerformed(evt);
    jLabel29.setText("BankName");
    jTextField27.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField27ActionPerformed(evt);
    jLabel30.setText("Verification Number");
    jTextField28.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField28ActionPerformed(evt);
    jLabel31.setText("Upsale1");
    jTextField29.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField29ActionPerformed(evt);
    jLabel32.setText("Upsale2");
    jTextField30.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField30ActionPerformed(evt);
    jLabel33.setText("UP1BillDate");
    jTextField31.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField31ActionPerformed(evt);
    jLabel34.setText("UP2BillDate");
    jTextField32.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField32ActionPerformed(evt);
    jLabel35.setText("Date-Time");
    jTextField33.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField33ActionPerformed(evt);
    jLabel36.setText("Notes");
    jTextField34.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jTextField34ActionPerformed(evt);
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel16)
    .addComponent(jLabel19)
    .addComponent(jLabel22)))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(34, 34, 34)
    .addComponent(jLabel24))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jLabel26))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(23, 23, 23)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel29)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(2, 2, 2)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel31)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel35)
    .addComponent(jLabel33)))))))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField24)
    .addComponent(jTextField22)
    .addComponent(jTextField20)
    .addComponent(jTextField17)
    .addComponent(jTextField14, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel17)
    .addComponent(jLabel20))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField18)
    .addComponent(jTextField15, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel18)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel21)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jLabel27)
    .addComponent(jLabel25)
    .addComponent(jLabel23))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(jTextField25)
    .addComponent(jTextField23)
    .addComponent(jTextField21, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel28)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField26))))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jTextField31, javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField29, javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jTextField27, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE))
    .addGap(21, 21, 21)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel30)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel34)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(14, 14, 14)
    .addComponent(jTextField34, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))))
    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
    .addComponent(jLabel32)
    .addGap(20, 20, 20)
    .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGap(27, 27, 27)
    .addComponent(jLabel36)))
    .addGap(113, 11

    I am not sure what is the driver for mysql. I just came across the similar kind of problem in the forum and I have given the forum link below. Check if you have the file and then set the classpath.
    [Hyperlinks] http://forum.java.sun.com/thread.jspa?threadID=522873&messageID=2503366
    [HyperLinks]

  • Java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    hi All,
    i am facing the above error and stack parsing is as follows:
    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 sun.misc.Launcher$AppClassLoader.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 imgstore.<init>(imgstore.java:21)
    at imgstore.main(imgstore.java:92)
    CLASSPATH is "C:\JDK1.5\bin"
    I have already downloaded "mysql-connector-java-5.0.5-bin.jar" and placed the "C:\JDK1.5\jre\lib\ext\" .
    Still this problem persist.........plz guide me for the same.........
    thanks in advance......

    What is <classname>? Is that the "ClassToRun" from my example?
    If so, add the path to the "root" of the package hierarchy where your class can be found.
    For example:
    Your class is in C:\Bogus\Bogus1\com\mine\MyClass.class
    And its package is com.mine
    Then your command looks like this:
    java -cp "C:\full\path\to\jarfile\mysql-connector-java-5.0.5-bin.jar;C:\Bogus\Bogus1" com.mine.MyClass
    Or your class is in C:\Bogus\Bogus1\myjarfile.jar
    Then your command looks like this:
    java -cp "C:\full\path\to\jarfile\mysql-connector-java-5.0.5-bin.jar;C:\Bogus\Bogus1\myjarfile.jar" com.mine.MyClassEdit. Added jar info

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver not found

    Hi All,
    I have created an Entity Bean to connect to my Database...when i use the inbuilt OC4J instance of JDeveloper my client application can easily connect to the database using tis Beab....But while using an external oc4j server downloaded explicitly...it says...
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    I have already set the classpath for msbase.jar, mssqlserver.jar and msutils.jar files....
    even then i am facing the same problem...
    Please help me out....its very urgent....
    Thanx in advance to all....
    Praveen

    Using the Enterprise Manager web interface navigate to the 'Administration' tab.
    Under 'Administrative Tasks' -> 'Properties' you should find Shared libraries. Be SURE that your libraries are in fact located there.
    I'm assuming you have also set up Datasources and connections pools for your database? Verify that they are showing the correct SQL Server driver class.
    Hope this points you in the right direction!

  • 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.

  • 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

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver No ResultSet set was produced.

    While executing a stored procedure which returns an integer value is giving the following Exception.
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]No ResultSet set was produced.
    fdgfgdfgfdgfdgfdgfdg com.microsoft.jdbc.sqlserver.SQLServerDriver@639a3e
    try
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         catch(Exception e)
              System.out.println(e);
         try
    Connection con = DriverManager.getConnection
    ("jdbc:microsoft:sqlserver://servername:1433","TestUser","password");
    java.sql.CallableStatement callablestatement1 = connection.prepareCall("{call QUESTION_MASTER_Add(?)}");
    callablestatement1.setString(1, s);
    callablestatement1.execute();
    ResultSet resultset = callablestatement1.getResultSet();
    The result set returned is always null.
    But if I use sun.Jdbc.Odbc driver it works.
    Any Idea?

    Try first to call getNextResultSet() method and than read from resultset...i don't have a loginc exp..but seems ot me is working

  • 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

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver....where??

    Hi everyone.
    where can i find this driver: com.microsoft.jdbc.sqlserver.SQLServerDriver???
    i need it to connect to the SQL server database i�m using....
    thanx a lot

    but i don�t wanna use a ODBC...cause i don�t wanna have to configure a DSN in each machine that will use my app...
    how do i solve this??

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver and ntext,text

    I'm using the com.microsoft.jdbc.sqlserver.SQLServerDriver driver with SQL2000. In my table I have one ntext(i dont mind changing this to text datatype) column and to retrieve the data I'm using getAsciiStream(colname). I also tried getCharacterStream(colname).
    Even though I have data in the table, the method restult.getAsciiStream() brings nothing. I need some help in knowing how to retrieve the data when using ntext or text datatype in SQL server.
    Also I need some smaple code of how to write the data back to the table.

    Have you tried getString() ?
    I remember using this method once to read an ntext field from a MSSQL2K db. If you explicitly need a stream I recomend you to try a binary stream, binary streams works most of the time, then wrap it in a Reader.
    Regards,
    Rivas.

  • Java.lang.ClassNotFoundException: COM.cloudscape.core.JDBCDriver

    O/S: Windows XP Pro
    Software: j2sdk1.4.1_01, j2sdkee1.4
    1/ First Problem:
    when I read the book, it's said that I need to add the J2EE JAR files to the CLASSPATH variable:
    %J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\locale
    (the locale JAT file is not under the lib directory. Where is it located at?)
    2/ Second Problem:
    I have a Java program called CreateAgency.java and a batch file called CreateAgency.bat. The batch looks like
    @echo off
    call %J2EE_HOME%\bin\setenv
    @echo on
    java -classpath .;%CPATH% CreateAgency
    When I run the batch file to create a cloudscape database, I encounter 2 errors:
    * call %J2EE_HOME%\bin\setenv is not recognized as an internal or external command
    * java.lang.ClassNotFoundException: COM.cloudscape.core.JDBCDriver
    What's the setenv file? Where is it stored?
    Where is JDBCDriver loated at?
    In general, how can I fix these problems?

    I Figured it out!!!
    my solution to problem 1
    I have left out the ;%J2EE_HOME%\lib\locale in my classpath. I also do not have this folder, and I don't know what it is supposed to do. I don't think it will cause a problem if you leave it out.
    my solution for problem 2.
    I was able to get the CreateAgency Program to run.
    If you want to get the create agency application to run then all you have to do is append the location of cloudscape.jar to the classpath.
    On my system I have cloudscape.jar file located in
    %J2EE_HOME%\lib\system\cloudscape.jar
    Append this line to the classpath. Then compile and run CreateAgency.java. It should work fine then.
    Setenv is a bat file that should be stored in %J2EE_HOME%\bin\setenv. I do not have the setenv.bat file, so I get the same error.

  • Exception: java.lang.ClassNotFoundException: com.fintrack.FtCFDTraderApplet.class

    I am using Mozilla Firefox version 3.6.18. I don't want to update because last time I updated (recently) the newer version was such an unfriendly dog that after a few days I went back to the version I am still using. It works well! BUT, after I have successfully logged into my Macquarie Prime account, I then click the link to the trading platform and get a Java error message.
    Okay, perhaps Macquarie could have done a better job of making their java code cross-platform compatible, but I installed the latest version of Java and then tried again. With the newer version of Java, the error message changed, but I still got the following:
    "Java Plug-in 1.6.0_26
    Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\adrian
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class com.fintrack.FtCFDTraderApplet.class not found.
    java.lang.ClassNotFoundException: com.fintrack.FtCFDTraderApplet.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.ClassNotFoundException: com.fintrack.FtCFDTraderApplet.class"

    Hmmm...
    I forgot to state what I actually WANT!
    Is there any way (anywhere) I can get the missing class/applet and manually instal it? If so, would that fix the problem?
    Thanks to anyone who can help me (without getting me lost in a never-ending swamp of excessively geeky technicalities; I don't need a "perfect" system - just access to my trading platform.)?
    `

  • Java.lang.ClassNotFoundException: com.sun.xml.rpc.client.ServiceFactoryImpl

    Hi Forum:
    i want to explain you my problem i created a webservice with JDeveloper 10.1.3, and run perfectly but when i want to run it in another IDE i copied the codes to a another IDE and run perfectly in a simple java project in my different IDE but when i putted the code in a web application in another web server differente to the oracle i got this error message
    vax.xml.rpc.ServiceException: java.lang.ClassNotFoundException: com.sun.xml.rpc.client.ServiceFactoryImpl ------------------------- Loader Info ------------------------- ClassLoader name:
    i don�t know what�s happening and is so strange because i make one simple java project in eclipse and i copied the codes and works fine, but in a web application i can�t run it.
    I also founded it the jar to this class com.sun.xml.rpc.client.ServiceFactoryImpl
    but doesn�t work
    Can somebody help me, please?.. i really need it..
    thnks
    joshua

    It usually means that a JAR in which the class file resides is not included in the web-app or is not on the classpath. Had the same problem with the last Eclipse/WebLogic project where JAR files, in which class files resided on which other class files were dependent, were missing.
    Ronald

  • Missing package com.microsoft.jdbc.sqlserver.SQLServerDriver

    hi all!!
    I don't know what's happens, so I hope you can help me...
    I try to connect with a jsp-Application a ms sql server over jdbc.
    At microsoft.com, I found a jdbc-driver for the spezific sql server and I install it.
    So after that I tried different ways to connect the server but every time it fails...
    I seams, that the package com.microsoft.jdbc. etc were missing, because my ide doesen't highlight such one package...
    So what do you mean...
    Over odbc my application runs fine, but that's not the requirements...
    It should run with an direct connection to the server...
    thx
    ram430

    hi all!!
    I don't know what's happens, so I hope you can help
    me...
    I try to connect with a jsp-Application a ms sql
    server over jdbc.
    At microsoft.com, I found a jdbc-driver for the
    spezific sql server and I install it.
    So after that I tried different ways to connect the
    server but every time it fails...
    I seams, that the package com.microsoft.jdbc. etc
    were missing, because my ide doesen't highlight such
    one package...
    So what do you mean...
    Over odbc my application runs fine, but that's not
    the requirements...
    It should run with an direct connection to the
    server...
    thx
    ram430

Maybe you are looking for

  • What is the order of starting the services?

    Hi, I have 2 node RAC with ASM. what is the order of starting the services like crs, asm,nodeapps, db, ,listener? can you help me? Thanks

  • How to use array of Point Class

    I use Point class as array. I already create that. However I can't access to setLocation. Ex. Point myPoint[] = new Point[10]; myPoint[0].setLocation(10, 2); It has a error. Please Explain me.

  • Change the Production state of Software Component in SLD

    Hello, I cannot see the list of software component to add in Dev Configuration because the Production State of software component is in Planned state and to appear in the list it should be in Devlopment state. How do I change the state. When I login

  • Take action before destory

    Hello, I am so confused with my current problem. Actually, I need to tackle some attributes in session just before destory. However, using HttpSessionListener is not OK, as its destory action is called after destory. Choosing HttpSessionAttributeList

  • Glitch with Audio Level Control

    I've been having this issue for a long time now on several computers and with different versions of FCP, and it's really bothered me lately. At times when I am keyframing audio levels in the timeline, if I add a keyframe to an audio track it will ran