Loading MySQL to Borland's Java

I still can't connect to MySQL.
I looked in the other threads' instructions, I think I am doing everything correctly.
I still get the
java.lang.ClassNotFoundException:org.gjt.mm.mysql.Driver
exception on the
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
command.
This is my system:
Java: Borland's JBuilder home edition.
Operating System: Windows XP
Driver I am trying to use: GNU's mm.mysql-2.0.14
Relevant Directories:
MySQL: C:\MySQL
GNU's driver: C:\MySQL\mm.MySQL-2.0.14 (I thought it
made sense to put it here.)
Relevant Environment Variables:
CLASSPATH:.;C:\MySQL\mm.MySQL-2.0.14\mm.mysql-2.0.14- bin.jar
I have also tried:
CLASSPATH:.;C:\MySQL\mm.MySQL-2.0.14\lib\jdbc2_0-stdext.jar
CLASSPATH:.;C:\MySQL\mm.MySQL-2.0.14]\lib\jta-spec1_0_1.jar
-and-
CLASSPATH:.;C:\MySQL\mm.MySQL-2.0.14]\org
I didn't set the environment variables
path to C:\j2sdk1.4.0_01
j2ee_home to c:\j2sdkee1.3.1
java_home to c:\j2sdk1.4.0_01
because I don't have any files on my computer that start
with j2sdk. Apparently, JBuilder uses other files.
I can use MySQL with the command line mysql command, but only from the c:\mysql\bin directory.

I can't tell for sure from the information you give, but I think you're mixing apples and oranges. Here's an excerpt from the readme file that comes with the driver:
MM.MySQL is distributed as a .jar archive containing the sources
and class files as well as a class-file only "binary" .jar archive
named "mysql-2.0.13-bin.jar".
You will need to use the "jar" command-line utility that comes with your JDK
to un-archive the distribution.
Once you have un-archived the distribution .jar archive,
you can install the driver in one of two ways:
Either copy the org subdirectory and all of it's contents
to anywhere you like, and put the directory holding the org subdirectory
in your classpath, or...
Put mysql-2.0.13-bin.jar in your classpath, either by adding the
FULL path to it to your CLASSPATH enviornment variable, or putting it
in $JAVA_HOME/jre/lib/ext.
I placed mysql-2.0.13-bin.jar in $JAVA_HOME/jre/lib/ext and it works fine.
If you copied the org subsubdirectory and all of it's contents to C:\MySQL\mm.MySQL-2.0.14, then use that as your classpath.
If you're trying to use just the jar file, then the classpath entry should be the directory that contains the jar.
Because you don't have C:\mysql\bin in your PATH, you either have to be in that directory or prepend your sql commands with C:\mysql\bin for the commands to be recognized.

Similar Messages

  • Unable to load mySql Driver in Java class invoked using bpelx:exec

    Hi ,
    I am trying to connect to mysql database in my java class.when i run this class in Jdeveloper it loads the driver without any problem.I can chk the log in the Jdev messages area.Now I am invoking this class from the BPEL process through <bpelx activity.But when i run my BPEL process it throws runtime exception "classNotFoundException:unable to load com.mysql.jdbc.Driver".I have set the project properties ->libraries to the class path of the mysql jar file as well.
    Now if i try to connect with the Oracle driver then it is working fine.
    I know this is a classpath issue.Can anyone tell me if there are some other settings to make it work fine.
    the java code :
    System.out.println("in getConnection method");
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    System.out.println("loaded Driver :");
    String url="jdbc:mysql://ntlv014:3306/wx";
    _jdbcConnection = DriverManager.getConnection(url,"development","ber1nger");
    System.out.println("Got Connection :"+_jdbcConnection.isClosed());                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I think you have 2 options..
    either put the jar for the mysql in the classpath on the server...or try something like this :
    http://forum.java.sun.com/thread.jspa?forumID=17&threadID=633158
    try to put the jar of the mysql into the suitecase of the bpel.
    never seen this coming around...so..it's just a wild guess.
    ORABPEL-11622 Could not create/access the TopLink Session
    spendem got the same situation...the puts the libraries in the applib-dir
    Message was edited by:
    Eric Elzinga (IT-Eye)

  • Can I execute MySql's command from java application?

    Can I execute MySql's command from java application? And how?
    For example :
    load data local infile 'D:\\myData.txt'
    into table myTable
    fields terminated by ';'
    lines terminated by '\n';

    1. get the jdbc driver for mysql from the mysql site at: http://dev.mysql.com/downloads/connector/j/5.0.html
    2. follow the installation instructiions... which you'll also find in your mysql manual...
    Happy travels. Keith.

  • Error BEA-000438 - Unable to load performance pack. Using Java I/O instead.

    On a Solaris 9 machime, 64 bits architecture, j2sdk1.4.2_08, Weblogic Server 8.1 SP2
              when I try to deploy the application, launching java wiht "-d64" option I get :
              <Jun 22, 2005 12:12:41 PM CEST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead.
              Please ensure that libmuxer library is in
              :'/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9/server:/export/home/j2se/j2sdk1.4.2_08/jre/lib/sparcv9:/export/home/Aplics/Apl1/WEB-INF/lib::/usr/local/bea/weblogic81/server/lib/solaris:/usr/local/bea/weblogic81/server/lib/solaris/oci920_8:/usr/lib'
              libmuxer exist on /usr/local/bea/weblogic81/server/lib/solaris
              Any idea?
              Thanks

              Can you post more details ?
              Sergi
              Jiffy <[email protected]> wrote:
              >error:
              > <2004-3-12 %u4E0B%u534815%u65F648%u520654%u79D2 CST> <Error> <Socket>
              ><BEA-000438> <Unable to load performance pack. Using Java I/O instead.
              >Please ensure that wlntio.dll is in: 'D:D:/bea/weblogic81/server/bin'
              >>
              

  • How to load mysql driver in netbeans 5.0

    I configured mysql driver(com.mysql.jdbc.Driver) in netbeans 5.0. but i got this type of errors
    (run:
    Exception in thread "main" 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: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 gdb.gdbop.main(gdbop.java:20))
    plz help me for this...............

    IDEs such as netbeans and eclipse require you to add any external jars to the project's classpath.
    for netbeans 5.0, see here:
    http://www.netbeans.org/kb/50/using-netbeans/project_setup.html#pgfId-1157099

  • Java applets won't load, have latest version of java installed, have removed all old versions from the hard drive, java console not working in firefox, any suggestions please ?

    java applets will not load,
    i have run the java test page & i have the latest version installed.
    have removed all old versions of java from my hard drive & restarted the computer.
    i have checked that java is enabled in the plug-ins and it is with version se 6 u22, also something called java development toolkit 6.0.220.4 np runtime script plug-in library for java (tm) deploy.
    if i click on java console in tolls nothing happens

    Hi,
    You might want to look in your control panel for 'Java' icon. It should give you an option to enable java plugin into your browser. Let me know if you still face the issue.
    Thanks!

  • [Solved] php 5.2.0-1+lighttpd+mysql: Can't load mysql module

    I'm using php 5.2.0-1, lighttpd 1.4.12-1, mysql 5.0.26-1, libmysqlclient 5.0.26-1 and php-cgi 5.1.6-1 on server and phpMyAdmin says that php can't load mysql module, other websites doesn't have any connection to mysql database too. I've checked php.ini - mysql.so and mysqli.so is uncommented. Only one thing helps - reverting to php 5.1.6-2.

    cactus wrote:just run abs.. copy the php-cgi directory to your home..
    modify the version, and built it yourself.
    Compiled, installed and it works Thanks

  • Unable to load performance pack. Using Java I/O instead. Please ensure...

    Hi there.
    I am running WL 1033 development version using 64-bit 1.6.1 jdk (jdk-6u21-windows-x64) and the performance is terrible. I have upped my mem settings to this:
    set MEM_ARGS=-Xms1024m -Xmx1408m -XX:PermSize=1024m -XX:MaxPermSize=1024m
    and after a couple of deploys, I still get out of memory errors.
    I notice this message on startup: <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that wlntio.dll is in:
    Could this be part of my performace issues? If so, how do I fix it?
    I followed the install directions in the README.txt file from this zip file: wls1033_dev.zip
    Mike

    Hi Mike,
    If you are using 64 bit of Windows Operating System then Make sure that you add the following directory in the *"java.library.path"*....
    Directory: E:\bea1033\wlserver_10.3\server\native\win\64
    Example: In your servers start Script please add the following MEM_ARGS or in JAVA_OPTIONS:
    <b><font color=maroon>
    set MEM_ARGS= -Xms1024m -Xmx1408m -XX:PermSize=1024m -XX:MaxPermSize=1024m -Djava.library.path=E:\bea1033\wlserver_10.3\server\native\win\64</font></b>
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic (Middleware Magic Is Here)

  • Need coding support for Accessing MYSQL stored procedure from java

    Hi every one,
    I need coding support for accessing Mysql stored procedure from java and JSP.
    Please help me
    pranav

    You'd better have a recent version of MySQL, because earlier ones didn't support stored procs.
    If your MySQL and driver support stored procs, maybe you just need a JDBC stored proc tutorial.
    %

  • MySQL DB file using java

    Is there a way of creating a mySQL database file using java, a file similar to MS Access file?

    I recall a software that save files in .mysql format.
    Didn't know how these files were generated, but I am
    sure of the extension.Well that's swell.
    There is no such file used by MySQL. Further MySQL databases are not contained in a file but in fact use several files and are tied directly to tables. For each table you will have two files, one with structure and one with the data. Then for each index you will have another file.
    That's for MyISAM tables anyway (a MySQL variant of ISAM). For other table engine types it varies but multiple files per table is a common thread.
    The file you are talking about most likely contains SQL queries and is a SQL batch program for creating and populating a database.
    Anyway on to trying to actually resolve your issue. Creating ISAM files from scratch is a no-go to create a database. You can of course always connect to the database engine and issue queries like "CREATE DATABASE" or "CREATE TABLE"
    What is the actual problem you are trying to solve here?

  • Loading an SQL in a Java Class

    Hi Forum
    I'm writing a test for some of my work and I want to load some data into a mysql db. How do I do that From my Java testfile?
    I know I could load it manually before running the test but I want it to be loaded by the testclass when I run the testclass.
    tia

    Do a search in the Java Database Connectivity (JDBC) forum - it should contain hundreds of examples of how to use JDBC with a MySQL database.
    However, direct JDBC access is not always the best way to load in a large dataset - if you've got a command-line means of importing the data then you might find it better to call that directly using Runtime.exec.
    Hope this helps.

  • Date(mysql) - date(oracle 8i), java.lang.OutOfMemory

    PLATFORM AND O/S VERSION: RedHat Linux 7.2, Kernel 2.4.9-21smp, Oracle 8.1.7.4
    MIGRATION WORKBENCH VERSION: 9.2.0.1.2 (Windows 2000, ServicePack 2)
    THIRD-PARTY DATABASE AND VERSION BEING MIGRATED: MySQL 3.23.41
    Hi there,
    I urgently need to migrate a mysql (3.23.41) database (7.1 GB) into Oracle 8i (8-1-7-4),
    but faced a lot of problems during migration.(capturing went well):
    1. ORA-01843: not a valid month
    2. java.lang.OutOfMemoryError
    For error no. 1:
    Here comes a description of a suspicious source table(mysql), which has a 'datetime' (column: 'created')
    in it:
    mysql> desc analysisprocess;
    -----------------------------------------------------------------------------------+
    | Field | Type | Null | Key | Default | Extra |
    -----------------------------------------------------------------------------------+
    | analysisId | int(10) unsigned | | PRI | NULL | auto_increment |
    | created | datetime | | | 0000-00-00 00:00:00 | |
    | logic_name | varchar(40) | | | | |
    | db | varchar(120) | YES | MUL | NULL | |
    | db_version | varchar(40) | YES | | NULL | |
    | db_file | varchar(120) | YES | | NULL | |
    | program | varchar(80) | YES | | NULL | |
    | program_version | varchar(40) | YES | | NULL | |
    | program_file | varchar(80) | YES | | NULL | |
    | parameters | varchar(80) | YES | | NULL | |
    | module | varchar(80) | YES | | NULL | |
    | module_version | varchar(40) | YES | | NULL | |
    | gff_source | varchar(40) | YES | MUL | NULL | |
    | gff_feature | varchar(40) | YES | MUL | NULL | |
    -----------------------------------------------------------------------------------+
    14 rows in set (0.00 sec)
    I tried to map the 'date' datatype from mysql into the date datatype in oracle, but always
    got the ora-01843 error.- How can I EXACTLY set 'NLS_DATE_FORMAT'/'NLS_DATE_LANGUAGE' to fit?
    Or is there any other solution? (NLS_LANGUAGE is being initialized as 'AMERICAN')
    For error no. 2:
    I tried using Java 1.3.1 (which comes with omwb) and java 1.4.0_02.
    RAM(on notebook running OMWB ): 256 MB; javaw -mx1024m.
    Virtual Memory on machine running OMWB: 1024 MB.
    Unfortunately, there was now success. What else can I do?
    Is there any possibility to have a look at the generated sql (inserts etc.)
    during migration?
    Your help is highly appreciated. Thanks for your effort in advance.
    Best Regards,
    Dan
    P.S.: I also tried to use Oracle 9i with 'date' to 'timestamp' mapping, but also got 'ora-01843'
    error and additionaly:
    'Failed to create default for Table :HOMO_SAPIENS_CORE_8_30.ANALYSISPROCESS; ORA-00907: missing right parenthesis'

    Hi Dan,
    For Error 1:
    This is unusual behaviour. I will raise a bug against the product to have it investigated further but I have not encountered this before. To workaround
    the problem, you can firstly migrate the database schema (without the data) by choosing the 'No' radio button in 'Step 3 of 4: Migrate Table data' in the
    Migration Wizard. When the schema has successfully been migrated you can create SQL*Loader scripts for the table(s) you want to
    migrate data for by select the table name in the Oracle Model UI in the Migration Workbench and choosing Object-Generate SQL*Loader Scripts from
    the menu bar. To find out more about the offline data loading facility in the Migration Workbench please refer to the MySQL plugin reference guide.Note that
    in the 'sql_load_script.bat' (which is one of the files generated by the Object-Generate SQL*Loader Scripts menu command, you can set your specific
    requirements for NLS_DATE_FORMAT, NLS_TIMESTAMP, NLS_LANGUAGE etc.I think this will get you over the problem you are encountering at the
    moment.
    For Error 2:
    Could you provide me with the error.log file that exists in your OMWB\Log directory please ? This may contain extra information about the cause of this
    problem. Your virtual memory size etc. should be more than adequate. Also, is this problem happening at a particular point in the migration that you can
    identify - e.g. on a particular table ? If so, perhaps you could provide me with the datails of the column types of this table, the number of rows of data
    it contains etc. In the meantime, the solution to error 1 may actually be a workaround fot this problem too.
    If you need any additional information on the above points, please don't hesitate to contact me.
    Tom.

  • How to load linux driver module in java

    Hi
    I am currently trying to load a Linux driver module dynamically from java to enable some kind of wireless communication using the System.load() method. But unfortunately, the module is a .ko file rather than a dynamic loadable library .so file in Linux, So that when I try to load this module, I get an error:
    Can't load IA 32-bit .so on a IA 32-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    at test.main(test.java:10)
    I wonder if this error is caused purely by the type of file or there might be some other reasons? It seems that all the linux drivers are .ko files, can any one help me to figure out a way of loading such linux drivers?
    Thank you
    Song

    Can any one give me some hint?
    I am thinking about one possible solution: write a c program to load this module, then compile the c program to be a shared object library, and use jni to load this shared object library.
    Does this work?
    Thank you

  • Using mysql decode function in Java

    Hi everybody,
    mysql documentation says:
    DECODE(crypt_str,pass_str) -->
    Decrypts the encrypted string crypt_str using pass_str as the password. crypt_str should be a string returned from ENCODE().
    I used the above function in a Python script and had no problem, but have difficulty using the same thing in my Java code.
    I receive runtime error when tried decode() in my Java code in executeQuery("s");. As far as I know the decode() function should be compiled, I can't run the decode() in the mysql command tool and receive a response (as I compiled and ran it in my Python script).
    Has anybody ever used this function in the Java code? How? What format did you use? What I should use instead of "s" in this code?
    conn is a database connection:
    stmt = conn.createStatement();
    rs = stmt.executeQuery("s");
    I even tried PreparedStatement, but no luck.
    Any help is greatly appreciated.

    stmt.executeQuery("select blahblahblah, DECODE(fieldName, password), blahblahblah FROM blahblah...")

  • MySQL Varchar not matching Java String

    I am using MySQL 4.0.16 with jdk1.3.1_01 and I have a strange occurance going on with comparing Strings from the mysql database with Strings entered from java, coming from a JTextField. The mysql field in question was created like this:-
    CREATE TABLE hardware (
    serialnumber VARCHAR(20) UNIQUE NOT NULL,
    .....The line in arrows on the proceeding code is where I am having problems. I changed the method from .getString() to getInt() to test the IF statement and matches were produced as expected but with getString(), no matches are made from this line even though 'System.out' shows the variable from mysql and the variable from java (a JTextField) are both the same at the point of the IF statement, (as tested by the line below the arrows.
    rs = stmt.executeQuery("select count(*)from hardware;");
    rs.next();for (int x=0;x < rowSize; x++) {
       rs.next();
      if (rs.getString(1) == newSerialNumber) {    // <<<<<<<<
              nonUniqueSerialNumber=true;
      System.out.println("loop on "+x+"rs.getString(1) is "+rs.getString(1)+" java textfield is "+newSerialNumber);
    rs.close();
    // If reached this stage - the Serial Number is OK.
    int rowSize = rs.getInt(1);
    rs = stmt.executeQuery(getAllSerialNumbers_QRY);Any known reasons or thoughts greatly appreciated? I've looked through the mysql manual with no mention of VARCHAR or CHAR incompatibilites. Also I am using the Connector/J 3.0.9 JDBC driver..
    Pat Rivet

    Nothing to do with the database, just a common newbie-to-Java error. Don't use == to compare the contents of two String objects, use the equals() method instead. Like this:if (rs.getString(1).equals(newSerialNumber))...

Maybe you are looking for

  • Request for code window - more...

    I was wondering if it would be possible to include a way to find the path of a symbol element like we have it in Flash. Flash Target Path Screen:

  • Problems with filters and jsp pages.

    I have the following simple filter that checks if there is user information in the session object and redirects accordingly: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class LoginFilter implements Filter      public

  • I can not remember the answers to my security

    How do I reset my security questions & answers?

  • Importing Illustrator CS6 File into Photoshop - Are they linked?

    I am teaching out of the Photoshop CS6 Classroom in a Book book and Chapter 8 talks about working with vector shapes and smart objects.  On page 227, under the Importing a Smart Object section, the following statement is made: You can import vector o

  • Password copy and paste

    Hi, one can't copy and paste the password to sign on to the Apple services on their websites anymore. I usually use passwords in the length somewhere between 30 and 60 characters that are automagically generated and then copy&pasted to the password f