JDBC talking to MySQL

Hi all,
I'm using NetBeans 4 as an IDE and i'm having some trouble with MySQL.
My program runs fine and i can update field on the MySQL when i'm running the program from within NetBeans but when i run the .jar file externally, there is an error that is caught that says as written below:
com.mysql.jdbc.driver
This is my code..... it's not very big but it's in 3 classes and i'm pretty new to coding so it's all over the place. I'll show the class that does the SQL work only because the others only call functions and parse in things for this class to do.
Any help would be appreciated i know i'm a little vague!!!
Wes
import javax.swing.JOptionPane;
import java.math.*;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class SQLAccess
public SQLAccess()
//empty constructor
public SQLAccess(String name, int age)
String userName = "root";
String password = "root";
String url = "jdbc:mysql:///Storage";
Connection conn = null;
try
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(url, userName, password);
if(!conn.isClosed())
System.out.println("Successfully connected to " +
"MySQL server using TCP/IP...");
Statement stmt = conn.createStatement();
//SQL command sequence to place a new entry into the table
String input = ("INSERT INTO info VALUES('" +
name + "' , '" + age + "')");
stmt.executeUpdate(input);
catch(Exception e)
System.err.println("Exception: " + e.getMessage());
JOptionPane.showMessageDialog(null, e.getMessage());
finally
try
if(conn != null)
conn.close();
catch(SQLException e) {}
////////////////////////////////////////////////////////////////////////////////

i put
-classpath .;"C:\Program
Files\Java\jdk1.5.0_02\jre\lib\extmysql-connector-java
-3.1.8-bin.jar" but it still don't work.
it just ain't goin well for me today...but i do agree
about the windows classpath part.....that would add
the path for every future compile so thanks for the
tip :)
Presumably you are still getting the class not found exception.
The above is not a complete command line. As a guess you are still running it as an executable jar.
You have a choice. You will need to do one of the following.
1. Run it as a jar, not an executable jar.
2. Figure out how manifests work. An executable jar ignores all forms of external class path (command line and env vars.) Basically you have to include the driver jar in the executable jar and create a manifes that tells the jar that the driver is in there. There are examples of this in the forums somewhere.

Similar Messages

  • JDBC talks to MySql

    I am trying to talk to a MySql db in other server conncted with my machine via LAN. I use a simple test servlet to get some data out from the database. And dbURL, username, password are all pre-defined. The dbURL is defined in a fashion like this:
    String dbURL="jdbc:mysql://myserver/mydbname";
    However, I failed when run:
    dbConn=DriverManager.getConnection(dbURL, username, password);
    Error msg shows:
    500 Servlet Exception
    javax.servlet.UnavailableException: Unable to connect to: jdbc:mysql://myserver/mydbname
    Only thing, as far as I could think, may be wrong is that there is no port number in dbURL. But how can I get the port number which MySql listen to? Or, the error is cuased by other things?
    Thanks for any hints?

    Try to check MySQL documentation. You should be able to find out the port number or whatever config info there!
    Hope this helps!

  • Stored procedure : how to call SP in sender JDBC adapter for mysql

    HI friends ,
    we have JDBC---->XI--
    >SAP  scenario. For some business requirement, we have to call STORED PROCEDURE , please let me know how to call  SP in sender JDBC adapter for mysql .
    Thanks
    mojib

    Hi Mojib,
    Please create a sample stored procedure like this which contains select statement and in communication channel give
    wite stored procedure name only to sql query statment and in update statement write <test>.
    I am executing this stored procedure successfully.
    Create Proc GetResultX As
    Begin
    Select * From TESTX
    End
    Execute statement for stored procedure is :
    Exec GetResultX
    Regards
    Laxmi Bhushan Jha
    Rewards point if found usful
    I have given same answer to one of the same  thread

  • Problem on 10gr2 for configure HS talk to mysql through ODBC

    Hello, all,
    did someone tried configure HS on 10gr2 talk to mysql 3.5 on xp?
    I tried it on my environment and got some issues here. any advice will be appreciated:
    1) environment: OS=xp professional sp2. oracle database=10gr2. mysql database=mysql 3.5. ODBC was setup as mysql_shan and works perfect with some other application like php communication
    2) my configuration:
    a. hs init file: name=%ORACLE_HOME%/hs/admin/initmysql.ora with HS_FDS_CONNECT_INFO = mysql_shan
    HS_FDS_TRACE_LEVEL = ON
    b. listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = D:\oracle\ora10g\product\10.2.0\db_1)
    (SID_NAME = grid)
    (SID_DESC =
    (GLOBAL_DBNAME = EMREP.CORPORATE)
    (ORACLE_HOME = D:\oracle\ora10g\product\10.1.0\em_1)
    (SID_NAME = EMREP)
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\ora10g\product\10.2.0\db_1)
    (SID_DESC =
    (PROGRAM = mysql_shan)
    (SID_NAME = mysql)
    (ORACLE_HOME = D:\oracle\ora10g\product\10.2.0\db_1)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MIS-DT-49769.corporate)(PORT = 1521))
    c.tnsnames.ora:
    mysql =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=MIS-DT-49769.corporate)(PORT=1521))
    (CONNECT_DATA=(SID=mysql))
    (HS=OK)
    d. instance parameter setting:
    hs_autoregister=true
    3)here's my test results:
    (1)listener service status:
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 01-JUN-2006 10:04:10
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    Services Summary...
    Service "EMREP.CORPORATE" has 1 instance(s).
    Instance "EMREP", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "grid" has 2 instance(s).
    Instance "grid", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:1 refused:0
    LOCAL SERVER
    Instance "grid", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:6 refused:0 state:ready
    LOCAL SERVER
    Service "gridXDB" has 1 instance(s).
    Instance "grid", status READY, has 1 handler(s) for this service...
    Handler(s):
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: MIS-DT-49769, pid: 4320>
    (ADDRESS=(PROTOCOL=tcp)(HOST=MIS-DT-49769.corporate)(PORT=4617))
    Service "grid_XPT" has 1 instance(s).
    Instance "grid", status READY, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:6 refused:0 state:ready
    LOCAL SERVER
    Service "mysql" has 1 instance(s).
    Instance "mysql", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:2
    LOCAL SERVER
    The command completed successfully
    (2)tnsping:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)) (CONNECT_DAT
    A=(SID=mysql)) (HS=OK))
    OK (30 msec)
    (3) create database link mysql: SQL> CREATE DATABASE LINK "mysql" USING 'mysql';
    Database link created.
    (4) query mysql through sqlplus:
    SQL> select * from MEMBERS@mysql;
    select * from MEMBERS@mysql
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from MYSQL
    check the listener.log:
    01-JUN-2006 10:36:10 * (CONNECT_DATA=(SID=mysql)(CID=(PROGRAM=)(HOST=CORPORATE\MIS-DT-49769)(USER=CORPORATE\Richard.Shan))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.10)(PORT=4026)) * establish * mysql * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    looks something wrong , can someone give some advice?
    thanks in advance!

    thanks all, problem solved:
    the listener.ora, has to be like this:
    (SID_DESC =
    (PROGRAM = hsodbc)
    (SID_NAME = mysql)
    (ORACLE_HOME = D:\oracle\ora10g\product\10.2.0\db_1)
    )

  • JDBC with Embedded mysql

    Hi,
    i'd like to use JDBC connection with Mysql which is embedded in my application(not client/server version).How can i code to connect my application to such embedded server.
    Can anyone help me.Thanx in advance...

    Hi,
    i'd like to use JDBC connection with Mysql which is
    embedded in my application(not client/server
    version).How can i code to connect my application to
    such embedded server.
    This might be possible with a lot of work. And a non-trivial amount of code in C/C++. If you are not experienced with C/C++ then I would not suggest that you try this.
    This implies that MySQL is running in the same process space as the jvm. That means that you will need to write a shell in C/C++ that starts the JVM and starts MySQL. Starting the JVM in C/C++ is detailed in the JNI. It should certainly be possible to start MySQL from your own C/C++ code, but you would have to track down the documentation to do it.
    Starting this up is going to take as much time as starting the JVM and MySQL server together.
    You could still use the same jdbc driver or you could modify it (with a lot of work) to go direct.

  • Jdbc drivers for mysql

    HI,
    could please suggest me for which drivers are suitable to create data server of mysql.
    please share any links for jdbc specification.
    Regards,
    Surya

    Hi,
    You should have mysql-connector-java driver. you can down load from here http://dev.mysql.com/downloads/connector/j/
    then use
    JDBC Driver: com.mysql.jdbc.Driver
    Url: jdbc:mysql://55.118.21.187:3306/dtbs3306
    Thanks.

  • How to talk to mySql  in Java??

    Hi
    I know how to talk to Oracle and using below code:
    class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con=DriverManager.getconnection("jdbc:oracle:thin:@127.0.0.1:5013","username", "password");
    Now I use mySql database. How to connect to mySql datebase inside the java code?? Thanks
    Gary
    P.S. I only found myODBC and can't find JDBC for mySql ? what is that? how to find it?

    class.forName("oracle.jdbc.driver.OracleDriver");Connection con=DriverManager.getconnection("jdbc:oracle:thin:@127.0.0.1:5013","username", "password");
    Download the "mm" JDBC driver - the name changed since I downloaded it, but following the links from mysql.com takes you to the download section. Be sure and read the manual to be sure the example below is still accurate.
    http://www.mysql.com/downloads/api-jdbc-stable.html
    class.forName("org.gjt.mm.mysql.Driver");
    Connection con = DriverManager.getconnection( "jdbc:mysql://hostname/databasename", "username", "password");

  • Beginner Has Problem With Loading JDBC Driver Using MySQL

    Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
    1. I have installed MySQL (C:\mysql), created a databse (soup), and created a littel table (VIDEOS). I am able to see the table in the console:
    sql> select * from videos
    2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
    3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
    4. MySQL server is running
    C:\> C:\mysql\bin\mysqld-nt --standalone
    5. open another DOS window and use the database
    mysql>USE SOUP
    6. succesfully compiled a Java program (javac Test.java):
    import java.sql.* ;
    public class Test
    public static void main( String[] args )
    try
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    try
    Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/soup" );
    try
    Statement statement = con.createStatement();
    ResultSet rs = statement.executeQuery("SELECT TITLE FROM VIDEOS");
    while ( rs.next() )
    System.out.println( rs.getString( "TITLE" ) );
    rs.close();
    statement.close();
    catch ( SQLException e )
    System.out.println( "JDBC error: " + e );
    finally
    con.close();
    catch( SQLException e )
    System.out.println( "could not get JDBC connection: " + e );
    catch( Exception e )
    System.out.println( "could not load JDBC driver: " + e );
    7. when I run the Java program (java Test), I got
    the message:
    could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    What am I missing?

    Hi,
    I missed to specify test in my last post.
    Try running your program by explicitly setting the classspath when
    running your program . java -classpath c:\mysql-connector-java-3.1.0-alpha-bin.jar test
    Make sure your jar file contains org.gjt.mm.mysql.Driver class

  • JDBC + Mandrake Linux + Mysql + netbeans

    I'm trying to conecto to a mysql server using the following code of netbeans. It compiles, but I got a java.lang.NoClassDefFoundError on execution time.
    Does anyone have any clue of how to solve it?
    (I got the netbeans+sdk package, is it complete? Maybe the jdbc class is missing? Where can I get it?)
    Thanks!
    import java.sql.*;
    public class Connect
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "kron9013";
    String url = "jdbc:mysql://192.168.0.109/Solbet";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
         System.out.println (e.toString());
    System.err.println ("Cannot connect to database server");
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    Exception in thread "main" java.lang.NoClassDefFoundError: mysql/Connect (wrong name: Connect)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    On this line:
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();I'm 99.99% sure you can drop the newInstance() part. However, I'm not certain if that's why it's failing.

  • JSP TALKING TO MYSQL

    Hi,
    i am using jakarta-tomcat 4.1.29 and MySQL 3.23.28.gamma.win versions.I have downloaded the JDBC driver MySQLconnector 3.23.10-stable.I have tried to configure it but i dont think that i have done it right and i cant access the database that i have created in MySQL at all. I get this error: org.apache.jasper.JasperException: Unable to compile class for JSP
    Now, the way i figure it out is that either i have not configured the driver properly(ive gone through many sites but it just isnt clear to me what to do exactly) or my localhost username and password are wrong( i still cant understand where to find those for MySQL). Could someone please take me step by step in the configuration of the JDBC driver and tell me where i can find the username and password for MYSQL?
    Any help is appreciated.
    Thanks

    This might help.This is what i wrote to query the database with JSP
    <%@ page import="java.sql.*" %>
    <% class.forName("com.mysql.jdbc.Driver"); %>
    <HTML>
    <HEAD>
    <TITLE>
    ACCESSING THE DATABASE TABLE abook
    </TITLE>
    </HEAD>
    <BODY>
    ACCESS OF THE abook DATABASE TABLE IN DATABASE bank
    <%
    Connection connection= DriverManager.getConnection("jdbc:mysql", "none", "none");
    Statement statement = connection.createStatement();
    ResultSet resultset= statement.executeQuery("select fname from abook");
    %>
    <TABLE BORDER ="1">
    <TR>
    <TH>Name</TH>
    </TR>
    <% while (resultset.next()){ %>
    <TR>
    <TD>
    <%= resultset.getString(1) %>
    </TD>
    </TR>
    <% } %>
    </TABLE>
    </BODY>
    </HTML>

  • JDBC Driver for MySQL database which should support JDBC2.0 function

    Hi, Guys,
    I'm using JDK1.3 and mm.mysql-2.0.4-bin.jar in Windows NT. When I run following program, I got the error: java.sql.SQLException: ResultSet not updatable. (the function rs.last() is working).
    Based on the documentation, mm.mysql-2.0.4-bin.jar driver should support JDBC2.0 function, but in fact, it's not. So, what's wrong or where is the correct driver?
    Thank you in advance anyway!
    import java.sql.*;
    import java.sql.ResultSet.*;
    import java.util.*;
    public class BridgeMysql{
    public static void main (String[] args) throws Exception {
    String sTable = "test";
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection conMysql = DriverManager.getConnection("jdbc:mysql://localhost/myDatabase?user=user&password=password");
    Statement st = conMysql.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = st.executeQuery("Select * from "+sTable);
    //rs.last();
    rs.moveToCurrentRow();
    System.out.println("Table "+sTable+" contains "+String.valueOf(rs.getRow())+" rows");
    rs.close();
    st.close();
    conMysql.close();
    catch (Exception e)
    System.out.println(e);

    Thought I might add something interesting I found.
    You need to include the field in your primary key. I only have one field in the key so I dont know how it works if you have more than one key.
    Makes sense considering Mark stated that you need the primary index defined. Looks like you need the fields as well from the select statement.
    Can anyone comment on why this is?

  • Jdbc connectivity with mysql database

    I created a database in mysql, but I have problems communicating with the DB in java 
    here is the error
    java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/books
    at java.sql.DriverManager.getConnection(DriverManager.java:604)
    at java.sql.DriverManager.getConnection(DriverManager.java:221)
    at displayauthors.DisplayAuthors.main(DisplayAuthors.java:30)
    java.lang.NullPointerException
    at displayauthors.DisplayAuthors.main(DisplayAuthors.java:66)
    BUILD SUCCESSFUL (total time: 1 second)
    I edited the system variables in windowds
    CLASSPATH
    .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
    CLASSPATH1 (notice the 1 at the end, I don't want to override the previous one
    .,C:\Program Files (x86)\MySQL\Connector J 5.1.30\mysql-connector-java-5.1.30-bin.jar
    The Hostname: localhost   Port: 3306
    Username: root
    password:   Tpswsd77? (changed for thios post)
    Stored Connection: Local instance MySQL56
    connection Method: Standard(TCP/IP)
    HERE IS THE CODE 
    public class DisplayAuthors {
    // database URL                             
       static final String DATABASE_URL = "jdbc:mysql://localhost:3306/books";
       // launch the application
       public static void main( String args[] )
          Connection connection = null; // manages connection
          Statement statement = null; // query statement
          ResultSet resultSet = null; // manages results
          // connect to database books and query database
          try
            // establish connection to database                             
             connection = DriverManager.getConnection(
               // DATABASE_URL, "deitel", "deitel" );
                     //<editor-fold defaultstate="collapsed" desc="comment">
                     DATABASE_URL, "root", "Tpswsd77?" );
             //</editor-fold>
                  // create Statement for querying database
             statement = connection.createStatement();
             // query database                                       
             resultSet = statement.executeQuery(           
                "SELECT authorID, firstName, lastName FROM authors" );
             // process query results
             ResultSetMetaData metaData = resultSet.getMetaData();
             int numberOfColumns = metaData.getColumnCount();    
             System.out.println( "Authors Table of Books Database:\n" );
             for ( int i = 1; i <= numberOfColumns; i++ )
                System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
             System.out.println();
             while ( resultSet.next() )
                for ( int i = 1; i <= numberOfColumns; i++ )
                   System.out.printf( "%-8s\t", resultSet.getObject( i ) );
                System.out.println();
             } // end while
          }  // end try
          catch ( SQLException sqlException )                               
             sqlException.printStackTrace();
          } // end catch                                                    
          finally // ensure resultSet, statement and connection are closed
             try                                                       
                resultSet.close();                                     
                statement.close();                                     
                connection.close();                                    
             } // end try                                              
             catch ( Exception exception )                             
                exception.printStackTrace();                           
             } // end catch                                            
          } // end finally                                             
       } // end main
    } // end class DisplayAuthors

    I edited the system variables in windowds
    CLASSPATH
    .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
    CLASSPATH1 (notice the 1 at the end, I don't want to override the previous one
    .,C:\Program Files (x86)\MySQL\Connector J 5.1.30\mysql-connector-java-5.1.30-bin.jar
    A few facts:
    1. You NEED to have the JDBC driver jar on the Java classpath
    2. You don't NEED to have the jar on the Windows classpath
    3. You don't NEED to 'override' the Windows classpath - you can just append the JDBC jar to it
    Just use #3 above - edit the Windows CLASSPATH environment variable and add the JDBC jar to it. At it at the start and follow it with a semicolon. Or at it at the end AFTER adding a semicolon.
    Or specify the CLASSPATH on the command line when you launch Java. Use the '-cp' or '-classpath <class . . >' options. Just type 'java' at the command line to see the list of parameters that can be used.

  • Urgent- Jdbc configuration settings (mysql)

    Hi,
    I do want to do a scenario like File to jdbc.
    I have installed mysql in my laptop. can anybody tell me how do I configure the driver settings prior to the doing the same.
    And also let me know, how do I find the driver and connection parameters for the same.
    cheers.,
    Stallin

    Hi Stallin
    check this pdf
    <b>How To Install and Configure External Drivers for JDBC & JMS Adapters</b>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
    also check
    Otther option is download JDBC Driver from Microsoft Website
    http://www.microsoft.com/downloads/details.aspx?FamilyID=6D483869-816A-44CB-9787-A866235EFC7C&displaylang=en
    and deploy the JDBC driver using SDM.
    <b>JDBC Driver Deployment Guide...</b>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
    <b>
    how to configure drivers:</b>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    also http://www.oracle.com/technology/software/tech/windows/odbc/index.html
    Help Required on File to JDBC scenario
    JDBC Driver?
    Thanks
    Regards
    Abhishek Agrahari

  • Where should I put JDBC driver for MySQL

    I am trying to connect MySQL with JDBC 2.0 API. I have downloaded the driver file mm.mysql-2.0.4-bin. Where should I put this driver to make it run ?
    According to mysql.org, it says "Put mysql.jar in your classpath". I am confuse by classpath. Is it same as the path ? or is another system variable.
    thanks for clear my doubt. ^_^

    it is a different variable, but also in the same file (autoexec.bat) as path;
    set CLASSPATH=%classpath%;C:\JDK1.3.0_02\bin;c:\path\mm.mysql-2.0.4-bin
    Jamie

  • DB Adapter is not able to talk with MySQL

    Hi,
    I am stuck with following code snippet,
    file:/D:/product/10.1.3.1/OraBPEL_1/bpel/domains/default/tmp/.bpel_DBAdapterProject_1.0_bc06ea3b733170165c1ca439b2f5cacf.tmp/DBAdapter.wsdl [ DBAdapter_ptt::DBAdapterSelect(DBAdapterSelect_inparameters,EmployeeCollection) ] - WSIF JCA Execute of operation 'DBAdapterSelect' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    ; nested exception is:
         ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-4003] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 060920)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Configuration error. Class [org.gjt.mm.mysql.Driver] not found..
    Though during connecting with MySQL ,I had given each and every required info,tested that connection and it was fine.When trying to invoke this service from BPEL console if gives me some fault messages !
    Could any one figure out ,what causes this to get occured!
    Regards,
    Shaily

    The JDBC driver jar file should be placed in the applib directory. No need to specify it explicitly in the CLASSPATH. You need to create a connection factory to connect to your MySQL database. Do this by editing the DB adapter's oc4j-ra.xml file. Bounce your BPEL server after you've placed the jar and edited oc4j-ral.xml.

Maybe you are looking for

  • Selection of usage type for EHP7 SPS02 ERP 6.0 Upgrade

    Hi Experts, We are planning to upgrade our SAP ECC 6.0 to EHP7 SP02 ERP 6.0, But during MOPZ configuration to generate the side effect report, its prompting to choose at least one technical usage type. I am not able to judge which is the right usage

  • How to make saved IR available for all users

    Hi, I've created IR and saved it to several tabs based on search conditions. But they're only visible for developers. How to make these tabs available for all end-users ? Does version 4.0 support this option ? Thank you!

  • CS6 how to use gradient Tool for outline

    Hi! I am a graphic designer I like to work hand and not numbers. The new version of Ai CS6 gradients can be given for strokes. Great! Please help me how exactly I can do it with a convenient tool 'Gradient Tool'? Does not respond to changes in drag w

  • Do they support V

    Do they support VBR (Variable Bit Rates) such as "Rather than ripping music in 28 or 92 KB/s, which some people feel does not offer true CD quality, or ripping at 320 KB/s, which is huge, ripping in VBR, or Variable Bitrate, offers the best combinati

  • Fast User Switching Freeze

    My wife's Macbook has been having a problem for the past couple of months. If she attempts to switch users (away from my son's account) using the fast user switching, the screen goes blue and just seems to hang there. She usually just forces it to sh