Applet, Connector/J, unable to load driver

I have written an Applet that is using the Connector/J com.mysql.jdbc.Driver to connect. When I compile and run the Applet with VisualCaf� and the AppletViewer, it is able to load the driver, access the database, exectue queries, etc. The problem occurs when I upload my files to the webspace.
My Applet loads, but when it tries to load the driver, these are the exceptions that I catch:
"Error loading class: com.mysql.jdbc.Driver
java.lang.NoClassDefFoundError
Failed to initialize driver: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"
Here is the code having the problem:
import java.sql.*;
public DatabaseConnection()
// First, we initialize the driver.
try
//System.out.println("Initializing Driver...");
Class.forName("com.mysql.jdbc.Driver").newInstance();
//Class.forName("org.gjt.mm.mysql.Driver").newInstance();
//System.out.println("Driver initialized.");
catch (Exception e)
System.out.println("Failed to initialize driver: " + e);
On my webspace, I have included the mysql-connector-java-3.0.8-stable-bin.jar file in the same directory as my main class file. In the HTML code, I use the ARCHIVE tag and give it that .jar file. I have even un-jarred the file, retaining the original directory structure and placed those in the same directory. The .jar file seems to download when I go to the page and load the Applet.
Is there something I'm missing that lets the Applet load the Driver? The Driver i'm using is a Type 4 Driver, which should be useable by an Applet.
Any help would be very much appreciated - I've struggled with this for a long time, now.

For anyone else out there using the Connector/J driver to make an Applet connect to a mySQL database, read on.
The mysql-connector-java-3.0.8-stable-bin.jar does not work with Applets. At least, it would not work for me after trying many different things. So, I downloaded an earlier version: mysql-connector-java-2.0.14-bin.jar and everything worked fine (!!!).
I hope this helps someone else with the same problem!! If the number of forums with very similar postings that i've run across is any indication, there are a lot of people having this problem!

Similar Messages

  • Unable to load Driver Class

    Hi There:
    When I try to connect to the Oracle 8i via this applet , I get the following run time error.
    Any help will be appreciated.
    I am using j2sdkee1.3.1, jdk1.3.1_02 and Oracle8.
    I also need your suggestion please. I have inserted some BLOB data in the Oracle table. I will need to display the BLOB data to the end users. I plan to convert this BLOB data into string format so that my applet can display the same. Further the string will have to be edited by the end users. I will then convert this modified string back to byte array so that I can insert the same as BLOB.
    Please let me know applet or the servlet? Which is better option.
    Users are reluctant to use any kind of WebServer because it will introduce the additional layer of complexity.
    Any help will be greatly appreciated.
    Thanks in advance.
    C:\>AppletViewer JdbcApplet.html
    Unable to load Driver Class
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: C:\oracle\jdbc\
    driver\OracleDriver.class (The system cannot find the path specified)
    The following code snippet fails because it is unable to find the suitable driver.
    if (conn == null)
         //make a connection to the db
         try {     
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:@"+"localhost:1521:sys", "system", "manager");
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:system/manager@(description=(address_list= (address=(pro tocol=tcp)(host=localhost)(port=1521)))(source_route=yes)(connect_data=(sid=sys)))" );
              Class.forName("oracle.jdbc.driver.OracleDriver");
              String conurl="jdbc:oracle:thin:@localhost:1521:sys";
              Connection con=DriverManager.getConnection(conurl,"system","manager");
         } catch ( Exception e ) {
              System.out.println ("Unable to load Driver Class");
              e.printStackTrace (System.out);
              // add send email notification about this fact
              return false;
    } // End of if Statement from conn...

    Hi,
    maybe I'm too late but try the following :
    It seems that Your IDE doesn't check the path to Your classesxxx.zip file.
    Or Your classesxxx.zip file is corrupt.
    We had this error after downloading the classes12.zip for Oracle versions
    higher 8.1.6.
    The original size of this file is 1.888kB.
    Remember Windows FTP is downloading in ascii mode per default.
    Or Your classpath isn't correct
    ( the Exception souns like this )
    Regards

  • Exception in thread "main" related to CLASSPATH and unable to load driver??

    Hi,
    I am a JAVA beginner, I have met some problems cannot solve, can somebody help?
    My OS is Windows2000
    Java SDK in C:\j2sdk-1_4_2_04 and Java JRE in C:\Program Files\Java\j2re1.4.2_04 [Installation: j2sdk-1_4_2_04-windows-i586-p.exe]
    MySQL in C:\mysql [Installation: mysql-4.0.18-win.zip]
    MyODBC in C:\Download\MYODBC [Installation: MyODBC-3.51.06.exe]
    MyJDBC in C:\mysql-connector-java-3.0.11-stable [Installation: mysql-connector-java-3.0.11-stable.zip]
    Enviornment Variables Settings
    PATH = C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\j2sdk1.4.2_04\bin;C:\mysql\bin
    JAVA_HOME = C:\j2sdk1.4.2_04
    (CASE ONE) - While I didn't set a new Enviornment Variable for CLASSPATH
    HelloWorld.class can work properly and LoadDriver.class cannot work due to Unable to load Driver (As below)
    C:\JavaTry>javac HelloWorld.java
    C:\JavaTry>java HelloWorld
    Hello World!
    C:\JavaTry>javac LoadDriver.java
    C:\JavaTry>java LoadDriver
    Unable to load driver.
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at 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 LoadDriver.main(LoadDriver.java:7)
    (CASE TWO) - While I set a new Enviornment Variable for CLASSPATH (No matter which settings as below)
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable\mysql-connector-java-3.0.11-stable-bin.jar
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable
    CLASSPATH = C:\mysql-connector-java-3.0.11-stable\com;C:\mysql-connector-java-3.0.11-stable\org
    Both the HelloWorld.class and LoadDriver cannot work properly due to Exception in thread "main" java.lang.NoClassDefFoundError (As below)
    C:\JavaTry>javac HelloWorld.java
    C:\JavaTry>java HelloWorld
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    C:\JavaTry>javac LoadDriver.java
    C:\JavaTry>java LoadDriver
    Exception in thread "main" java.lang.NoClassDefFoundError: LoadDriver
    Below are the JAVA scripts which I used
    -> HelloWorld.java
    public class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello World!");
    -> LoadDriver.java
    import java.sql.*;
    public class LoadDriver {
    public static void main(String[] Args) {
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    /* Class.forName("com.mysql.jdbc.Driver").newInstance(); <- either one try the same */
    } catch (Exception E) {
    System.err.println("Unable to load driver.");
    E.printStackTrace();
    Moreover, I saw some information only standalone application need to set CLASSPATH, right??

    My problem "unable to load driver" have solved.
    I set the CLASSPATH = C:\mysql-connector-java-3.0.11-stable\mysql-connector-java-3.0.11-stable-bin.jar
    and try
    java -cp ".";%CLASSPATH% LoadDriver
    Thanks masnare again :> and who provided the link http://www.kevinboone.com/classpath.html in the forums others similar topics, actually I forgot which topic and who, so... :P no matter whom thanks very much :)

  • Help Please ....  Unable to load Driver Class

    Hi There:
    When I try to connect to the Oracle 8i via this applet , I get the following run time error.
    Any help will be appreciated.
    I am using j2sdkee1.3.1, jdk1.3.1_02 and Oracle8.
    I also need your suggestion please. I have inserted some BLOB data in the Oracle table. I will need to display the BLOB data to the end users. I plan to convert this BLOB data into string format so that my applet can display the same. Further the string will have to be edited by the end users. I will then convert this modified string back to byte array so that I can insert the same as BLOB.
    Please let me know applet or the servlet? Which is better option.
    Users are reluctant to use any kind of WebServer because it will introduce the additional layer of complexity.
    Any help will be greatly appreciated.
    Thanks in advance.
    C:\>AppletViewer JdbcApplet.html
    Unable to load Driver Class
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: C:\oracle\jdbc\
    driver\OracleDriver.class (The system cannot find the path specified)
    The following code snippet fails because it is unable to find the suitable driver.
    if (conn == null)
         //make a connection to the db
         try {     
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:@"+"localhost:1521:sys", "system", "manager");
              // conn = DriverManager.getConnection ("jdbc:oracle:thin:system/manager@(description=(address_list= (address=(pro tocol=tcp)(host=localhost)(port=1521)))(source_route=yes)(connect_data=(sid=sys)))" );
              Class.forName("oracle.jdbc.driver.OracleDriver");
              String conurl="jdbc:oracle:thin:@localhost:1521:sys";
              Connection con=DriverManager.getConnection(conurl,"system","manager");
         } catch ( Exception e ) {
              System.out.println ("Unable to load Driver Class");
              e.printStackTrace (System.out);
              // add send email notification about this fact
              return false;
    } // End of if Statement from conn...

    Hi,
    maybe I'm too late but try the following :
    It seems that Your IDE doesn't check the path to Your classesxxx.zip file.
    Or Your classesxxx.zip file is corrupt.
    We had this error after downloading the classes12.zip for Oracle versions
    higher 8.1.6.
    The original size of this file is 1.888kB.
    Remember Windows FTP is downloading in ascii mode per default.
    Or Your classpath isn't correct
    ( the Exception souns like this )
    Regards

  • Unable to load driver download page.

    I was called by my dad who needed some assistance to get a printer installed he bought fresh from a second hand store.
    Anyway, I tried getting to the HP download page. The page however remains blank and does not load. I found some similar threads that availability to the driver pages is sometimes inaccesible. I don't want to get ahead of things (like assuming it's the fault of HP), and I also don't want to be a jerk (I love HP seriously)
    But I have had very frequent issues in the past with multiple machines on different networks while accessing HP webpages. Either because of extreme long loading times through any hp web service. And in this case unable to access pages completely. Just a reminder that it might be a area of business to improve upon albeit a minor focus point for the people that run this company.
    I read similar threads on this board through google searches that the same webpage (driver) page could be accesible through different international domains. I tried the german and spanish ones with the same results.
    I tried accessing the driver download page for over 4 hours now.
    Maybe it's just a issue with the driver page of my printer type. Especially since it is a older model.
    Personally I don't know about safe alternative download methods to get the drivers.
    Please post-
    1:If you consider the fault to be at my end and how to fix it.
    2:If there is any other way to get my hands on the printer software.

    Hi:
    The problem is on HP's end.
    The link is now working.
    http://support.hp.com/us-en/product/HP-Deskjet-D2400-Printer-series/2510721/model/2510766/drivers
    Yes, I agree with you that there have been too many times in the last year that the support pages are down.
    There should be a performance metric that is part of whoever's job it is that is in charge of the webpages (webmaster?), and there should be measurements of accessibility which should be part of the person's performance evaluations.
    For example overall: Webpages never go out more than 1% of the time each year, etc.
    I have found it quite unacceptible lately, and if this person worked for me, they would be on the carpet.
    I was the commanding officer of a USCG LORAN station back in the 1980's
    The mission of the station was to provide a radio navigation signal 100% of the time. 
    Anything short of that, and you better have a darn good reason why the station went off air.
    You go off air too many times, how do ships and planes find their position?
    I can tell you this, if my station had gone off air as many times as these web pages have been down lately, I would have been relieved of command.
    Plain and simple.

  • Unable to load driver

    hi,
    when am trying to run this program am getting message
    "Cannot connect to database server"
    Someone could ya resolve the problem and tell me?
    import java.sql.*;
    public class Connect
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "";
    String url = "jdbc:mysql://localhost/test";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
    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 */ }
    }

    reposted with tags:
    import java.sql.*;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try
                   String userName = "root";
                   String password = "";
                   String url = "jdbc:mysql://localhost/test";
                   Class.forName ("com.mysql.jdbc.Driver").newInstance ();
                   conn = DriverManager.getConnection (url, userName, password);
                   System.out.println ("Database connection established");
               catch (Exception e)
                   // System.err.println ("Cannot connect to database server");
                   e.printStackTrace(); // **** this may be better ***
               finally
                   if (conn != null)
                       try
                           conn.close ();
                           System.out.println ("Database connection terminated");
                       catch (Exception e) { /* ignore close errors */ }
       }You may want to change your catch block to print the stack trace for more information. I'm not a database guru, so that's the best suggestion I can make, that and to use code tags to improve readability of your code here.

  • Unable to load driver for Storage for Windows 2008 UCS B230 M2

    I am trying to Boot from SAN windows 2008 R2. I  have configured and connected the Cisco UCS Chassis and FI to our Network & Storage .I am  having problem to install Windows 2008 R2 Server on Blades as it is not able to see Storage LUN while installation .I downloaded drivers from Cisco Support Site.
    I tried drivers from ISO ucs-bxxx-drivers.2.1.3 latest version but Windows is showing driver is available but not installing the driver I am getting the following error and not showing the LUN hard disk to select the installation.
    Windows is unabe to locate storage LUN. I am able to LUN while booting process.
    I am not sure where I am doing wrong.or I am chosing wrong driver.

    I don't see the error message either, but to install W2008 on a boot lun, you must
    1) do the zoning of the vhba (initiator) to the pwwn of the storage subsystem port (target)
    2) the lun masking / mapping has to be setup
    3) fnic driver has to be installed
    Therefore, if you don't see your boot lun, either 1) and or 2) has to be fixed
    then
    4) only one path should be configured (e.g. fabric a), because no multipathing is available during installation, this is very important, and necessary for W2003, 2008 and 2012
    and
    5) if you see the boot lun, and can install, but the boot fails, the problem is the boot policy !
    Very easy ! Good luck !

  • Unable to load my sql driver

    So frustrated to see my servlet cant connect to mysql database, anyone pls help me?
    i put mysql-connector-java-2.0.14-bin.jar in
    C:\Apache\Tomcat 4.0\common\lib
    C:\Apache\Tomcat 4.0\webapps\ROOT\WEB-INF\lib
    D:\j2sdk1.4.0_03\jre\lib\ext
    here the exception:
    javax.servlet.ServletException: Unable to load driver
         at FormHandlerServlet.init(FormHandlerServlet.java:27)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:400)
         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    here is my servlet:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.sql.Date;
    public class FormHandlerServlet extends HttpServlet{
    private static final String driver="com.mysql.jdbc.driver";
    private static final String dbURL= "jdbc:mysql://localhost/aos";
    private static final String login= "aos";
    private static final String password= "aos";
    private ServletContext context;
    private Connection conn= null;
    private Statement stmt= null;
    public void init(ServletConfig config) throws ServletException{
         super.init(config);
         context= config.getServletContext();
         try{
         Class.forName(driver);
         conn= DriverManager.getConnection(dbURL, login, password);
         stmt= conn.createStatement();
         catch(ClassNotFoundException e){
         System.err.println("Unable to load driver");
         throw new ServletException("Unable to load driver");
         catch(SQLException e){
         System.err.println("Unable to connect to database");
         throw new ServletException("Unable to connect to database");
    public void service(HttpServletRequest req,
              HttpServletResponse res)
         throws ServletException, IOException{
         Vector errors= new Vector();
         Calendar startCalendarDate = Calendar.getInstance(TimeZone.getDefault());
         java.util.Date startUtilDate = new java.util.Date();
         long startLongDate = startCalendarDate.getTime().getTime();
         java.sql.Date startSqlDate = new java.sql.Date(startLongDate);
         String userID= req.getParameter("userID");
         String password1= req.getParameter("password1");
         String password2= req.getParameter("password2");
         String name= req.getParameter("name");
         String ic= req.getParameter("ic");
         String status= req.getParameter("status");
         String gender= req.getParameter("gender");
         String department= req.getParameter("department");
         String email= req.getParameter("email");
         String phone=req.getParameter("phone");
         if(!isRequiredData(userID, password1, password2, status))
         errors.add("Sila isikan semua data yang diperlukan dimana *.");
         else{
         try{
         if(isExistedUser(userID))
    errors.add("No Matriks/Pekerja anda sudah wujud, Sila cuba lagi.");
         catch(SQLException e){}
         if(!isSamePassword(password1,password2))
         errors.add("Sila isikan password1 dan password2 yang sama.");
         if(!isValidPassword(password1,password2))
         errors.add("Sila isikan password anda dalam 8-12 perkataan.");
         if(!isValidEmail(email))
         errors.add("Sila pastikan " +"@"+" dalam e-mel anda.");
         if(!isValidPhone(phone))
         errors.add("Sila pastikan "+ "-"+" tidak dalam nombor telefon anda.");
         if(!isValidUserID(userID))
         errors.add("Nombor Matriks/Pekerja anda tidak mengandungi 6 perkataan.");
         String next;
         String password= password1;
         String insert= "insert into user values('"+userID+"', '"+password+"','"+
         name+"', '"+ic+"', '"+status+"', '"+gender+"','"+
         department+"', '"+email+"', '"+phone+"', '"+startSqlDate+"')";
         if (errors.size() ==0){
         //data is ok, insert data to database, dispatch to wherever
         try{
              int x= stmt.executeUpdate(insert);
         catch(SQLException e){}
         next= "/aos/thanks.jsp";
         else{
         //data has errors, try again
         String[] errorArray= (String[])errors.toArray(new String[0]);
         req.setAttribute("errors", errorArray);
         next= "/aos/RegisterForm.jsp";
         RequestDispatcher rd;
         rd= context.getRequestDispatcher(next);
         rd.forward(req, res);
    public boolean isSamePassword(String password1,String password2){
         //check for both password is same
         return(password1.equals(password2));
    public boolean isValidPassword(String password1,String password2){
         //check for both password is under 8-12 char
         return(password1.length()>=8 && password1.length()<=12 &&
         password2.length()>=8 && password2.length()<=12);
    public boolean isValidPhone(String phone){
         //check for no dashes
         return(phone.indexOf("-")==-1);
    public boolean isValidEmail(String email){
         //check an "@" somewhere after 1st char
         return(email.indexOf("@")>0);
    public boolean isValidUserID(String userID){
         //check for userID is 6 char
         return(userID.length()==6);
    public boolean isRequiredData(String userID,
    String password1, String password2, String status){
    //check for required data is filled
         return(userID.length()!=0 && password1.length()!=0 &&
         password2.length()!=0 && status.length()!=0);
    public boolean isExistedUser(String userID) throws SQLException{
    String sql= "select * from user where id= '"+userID+"'";
    ResultSet rs= stmt.executeQuery(sql);
         if(rs.next())
    return true;
         else
         return false;
         

    is the driver name correct?
    private static final String driver="com.mysql.jdbc.driver";
    I usually have another string, but I might use a different mysql driver. Try opening your mysql driver with winzip and see if the class is there and at the defined directory place

  • LibGL error: failed to load driver: i965 [Solved]

    Executing some wine programs I get this messages:
    libGL error: failed to load driver: i965
    libGL error: Try again with LIBGL_DEBUG=verbose for more details.
    Following the suggestion I get:
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/i965_dri.so
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/i965_dri.so
    libGL error: dlopen /usr/lib32/xorg/modules/dri/i965_dri.so failed (/usr/lib32/xorg/modules/dri/i965_dri.so: cannot open shared object file: No such file or directory)
    libGL error: unable to load driver: i965_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: i965
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/tls/swrast_dri.so
    libGL: OpenDriver: trying /usr/lib32/xorg/modules/dri/swrast_dri.so
    What is that lib32 xorg module file that appears missing?
    Some informations that might be useful...
    # lspci | grep VGA
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    # glxinfo | grep 'dir\|^Open'
    direct rendering: Yes
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
    OpenGL version string: 3.0 Mesa 9.0.2
    OpenGL shading language version string: 1.30
    OpenGL extensions:
    # uname -a
    Linux macthearcher 3.7.4-1-ARCH #1 SMP PREEMPT Mon Jan 21 23:05:29 CET 2013 x86_64 GNU/Linux
    Last edited by ezzetabi (2013-02-08 09:33:19)

    According to wine#Graphics_Drivers it is lib32-intel-dri.

  • Unable to load database connector - using JRC w/report connecting to Oracle

    A simple Java program was created to test a Crystal Report using JRC. The Java program is a thick-client Swing desktop application (modified from an example of crxi_r2_migrating_rdc_to_jrc.pdf). The program failed to execute the report with the following error:
    Unable to load database connector u2018com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'
    It might be something simple to correct the problem, but I am not able to find related answers in the documentation and from the forum.
    CR version is XI R2. The Java program was compiled and run using jdk1.4.2_13. Oracle is 10.2.
    Do I have to use JDBC? or the CR Oracle driver will do? What needs to be setup? If I use JDBC, what do I need to setup (I tried to following the links in the forums or other documentation, but most of the links to http://support.businessobjects.com/.... are broken - i.e. re-route to the SAP support page but not directly linked to the articles)
    When the report JRCTestReport.rpt was saved with the option "Save Data With Report", it works fine. So the problem is only with Oracle database driver, the other jars are fine.
    In the report JRCTestReport.rpt the database properties are:
           DatabaseDLL             crdb_oralce.dll
           Password
           Server                        myTestDB
           Trusted_Connection    False
           User ID                      MyUser
    The crdb_oracle.dll is located at:
    C:\Program Files\Business Objects\Common\3.5\bin
    Files are stored in the following tree structure:
    <Testing Folder>
         JRCTest.java
         JRCTest.class
         WEB-INF
                   lib
                        All required JRC jars and CRConfig.xml
         Reports
                   JRCTestReport.rpt
    Java source code JRCTest.java
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import com.crystaldecisions.ReportViewer.*;
    // Use this for talking to JRC in-process
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.reportsource.*;
    public class JRCTest
         private static void createAndShowGUI()
              try
                   //Make sure we have nice window decorations.
                   JFrame.setDefaultLookAndFeelDecorated(false);
                   //Create and set up the window.
                   JFrame frame = new JFrame("JRCTest");
                   frame.setTitle("JRCTest");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   ReportViewerBean viewer = new ReportViewerBean();
                                      System.out.println("ReportViewerBean.init");
                   viewer.init(new String[0], null, null, null);
                                      System.out.println("new ReportClientDocument");
                   ReportClientDocument rpt = new ReportClientDocument();
                                      try
                                              System.out.println("Openning Report...");
                                              rpt.open("JRCTestReport.rpt", 0);
                                      catch (Exception ex)
                                              System.out.println("Failed to open report");
                                              System.out.println(ex.toString());
                                              return;
                                      try
                                              System.out.println("logon...");
                                              rpt.getDatabaseController().logon("myUser", "myPass");
                                      catch (Exception ex)
                                              System.out.println("Failed to logon");
                                              System.out.println(ex.toString());
                                              return;
                                      System.out.println("ReportClientDocument.getReportSource");
                   IReportSource rptSource = rpt.getReportSource();
                   viewer.setReportSource(rptSource);
                                                    System.out.println("viewer.setReportSource");
                   frame.getContentPane().add
                        (viewer, BorderLayout.CENTER);
                   frame.setSize(700, 500);
                   frame.setVisible(true);
                   viewer.start();
              catch (Exception exception)
                   System.out.println(exception.toString());
         public static void main(String[] args)
              javax.swing.SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        createAndShowGUI();
    Execution result:
    C:\tmp\CrystalJavaTest>java -classpath .;./WEB-INF/lib;./WEB-INF/lib/ReportViewe
    r.jar;./WEB-INF/lib/jrcerom.jar;./WEB-INF/lib/jrcadapter.jar;./WEB-INF/lib/Concu
    rrent.jar;./WEB-INF/lib/CrystalCharting.jar;./WEB-INF/lib/CrystalCommon.jar;./WE
    B-INF/lib/CrystalContentModels.jar;./WEB-INF/lib/CrystalExporters.jar;./WEB-INF/
    lib/CrystalExportingBase.jar;./WEB-INF/lib/CrystalFormulas.jar;./WEB-INF/lib/Cry
    stalQueryEngine.jar;./WEB-INF/lib/CrystalReportEngine.jar;./WEB-INF/lib/CrystalR
    eportingCommon.jar;./WEB-INF/lib/icu4j.jar;./WEB-INF/lib/keycodeDecoder.jar;./WE
    B-INF/lib/log4j.jar;./WEB-INF/lib/MetafileRenderer.jar;./WEB-INF/lib/rasapp.jar;
    ./WEB-INF/lib/rascore.jar;./WEB-INF/lib/rpoifs.jar;./WEB-INF/lib/Serialization.j
    ar;./WEB-INF/lib/URIUtil.jar;./WEB-INF/lib/xercesImpl.jar;./WEB-INF/lib/xml-apis
    .jar JRCTest
    Starting
    Crystal Report Viewer 2.1.21.2
    java.vendor = Sun Microsystems Inc.
    java.version = 1.4.2_13
    os.name = Windows XP
    os.version = 5.1
    os.arch = x86
    ReportViewerBean.init
    new ReportClientDocument
    Openning Report...
    logon...
    ReportClientDocument.getReportSource
    viewer.setReportSource
    ERROR - JRCAgent1 detected an exception: Unable to load database connector 'com.
    crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
            at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwRepo
    rtSDKException(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.if(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.a(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.byte(Unknown Source)
            at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unkno
    wn Source)
            at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unkno
    wn Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage
    (Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource
    .getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReport
    Source.getPage(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source
            at com.businessobjects.crystalreports.viewer.core.av.a(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:534)
    Unable to load database connector 'com.crystaldecisions.reports.queryengine.driv
    erImpl.DriverLoader'.

    After I switched the report to use JDBC, I am still getting the same error.
    Machine has multiple jdk, oracle 10g, Oracle11g client installed though. So I need to set my path to use the jdk from Crystal Report and Oracle 10g.
    The program was compiled and ran with the following path and CLASSPATH:
    set path="C:\Program Files\Business Objects\j2sdk1.4.2_08\bin";"C:\Program Files\Business Objects\j2sdk1.4.2_08\jre\bin";"C:\Program Files\Business Objects\j2sdk1.4.2_08\jre\bin\client";c:\oracle\ora102\bin
    set CLASSPATH=.;./WEB-INF/lib;./WEB-INF/lib/ReportViewer.jar;./WEB-INF/lib/jrcerom.jar;./WEB-INF/lib/jrcadapter.jar;./WEB-INF/lib/Concurrent.jar;./WEB-INF/lib/CrystalCharting.jar;./WEB-INF/lib/CrystalCommon.jar;./WEB-INF/lib/CrystalContentModels.jar;./WEB-INF/lib/CrystalExporters.jar;./WEB-INF/lib/CrystalExportingBase.jar;./WEB-INF/lib/CrystalFormulas.jar;./WEB-INF/lib/CrystalQueryEngine.jar;./WEB-INF/lib/CrystalReportEngine.jar;./WEB-INF/lib/CrystalReportingCommon.jar;./WEB-INF/lib/icu4j.jar;./WEB-INF/lib/keycodeDecoder.jar;./WEB-INF/lib/log4j.jar;./WEB-INF/lib/MetafileRenderer.jar;./WEB-INF/lib/rasapp.jar;./WEB-INF/lib/rascore.jar;./WEB-INF/lib/rpoifs.jar;./WEB-INF/lib/Serialization.jar;./WEB-INF/lib/URIUtil.jar;./WEB-INF/lib/xercesImpl.jar;./WEB-INF/lib/xml-apis.jar;C:/oracle/ora102/jdbc/lib/ojdbc14.jar
    I modified my java testing program to display more info:
    Modified program:
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import com.crystaldecisions.ReportViewer.*;
    // Use this for talking to JRC in-process
    import com.crystaldecisions.reports.sdk.*;
    import com.crystaldecisions.sdk.occa.report.reportsource.*;
    import com.crystaldecisions.sdk.occa.report.exportoptions.*;
    import com.crystaldecisions.sdk.occa.report.data.*;
    import com.crystaldecisions.sdk.occa.report.lib.PropertyBag;
    import com.crystaldecisions.sdk.occa.report.lib.IStrings;
    public class JRCTest2
       private static void createAndShowGUI()
          try
             System.out.println("Starting");
             //Make sure we have nice window decorations.
             JFrame.setDefaultLookAndFeelDecorated(false);
             //Create and set up the window.
             JFrame frame = new JFrame("JRCTest2");
             frame.setTitle("Testing 1, 2, 3");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             System.out.println("new ReportViewerBean");
             ReportViewerBean viewer = new ReportViewerBean();
             System.out.println("ReportViewerBean.init");
             viewer.init(new String[0], null, null, null);
             System.out.println("new ReportClientDocument");
             ReportClientDocument rpt = new ReportClientDocument();
             try
                 System.out.println("Openning Report...");
                 rpt.open("JRCTestReport.rpt", 0);
             catch (Exception ex)
                System.out.println("Failed to open report");
                System.out.println(ex.toString());
                return;
             try
                // try logon here to see if any exceptions
                rpt.getDatabaseController().logon("myUser", "myPass");
             catch (Exception ex)
                System.out.println("Failed to logon");
                System.out.println(ex.toString());
                return;
             IDatabase idb = rpt.getDatabaseController().getDatabase();
             Tables dtb = idb.getTables();
             IConnectionInfo conInfo = dtb.getTable(0).getConnectionInfo();
             PropertyBag attrs = conInfo.getAttributes();
             conInfo.setPassword("myPass");
             conInfo.setUserName("myUser");
             IStrings s = attrs.getPropertyIDs();
             for (int i=0; i < s.size(); i++)
                System.out.println(s.getString(i));
                System.out.println(attrs.getStringValue(s.getString(i)));
             System.out.println(" ");
             conInfo.setAttributes(attrs);
             attrs = conInfo.getAttributes();
             s = attrs.getPropertyIDs();
             // Print property again after setting attributes
             for (int i=0; i < s.size(); i++)
               System.out.println(s.getString(i));
               System.out.println(attrs.getStringValue(s.getString(i)));
             System.out.println(" ");
             System.out.println("ReportClientDocument.getReportSource");
             IReportSource rptSource = rpt.getReportSource();
             viewer.setReportSource(rptSource);
             frame.getContentPane().add
         (viewer, BorderLayout.CENTER);
             frame.setSize(700, 500);
             frame.setVisible(true);
             viewer.start();
          catch (Exception exception)
             System.out.println(exception.toString());
       public static void main(String[] args)
          System.out.println("main");
          javax.swing.SwingUtilities.invokeLater(new Runnable()
             public void run()
                createAndShowGUI();
    Running result:
    C:\tmp\CrystalJavaTest>java JRCTest2
    main
    Starting
    new ReportViewerBean
    Crystal Report Viewer 2.1.21.2
    java.vendor = Sun Microsystems Inc.
    java.version = 1.4.2_13
    os.name = Windows XP
    os.version = 5.1
    os.arch = x86
    ReportViewerBean.init
    new ReportClientDocument
    Openning Report...
    Trusted_Connection
    false
    Server Name
    dbHost
    Connection String
    Use JDBC=b(true);Connection URL=s(jdbc:oracle:thin:@dbHost:1521:myDB);Database Class Name=s(oracle.jdbc.OracleDriver);Server=s(dbHost);User ID=s(myUser);Password=;Trusted_Connection=b(false);JDBC Connection String=s(!oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB)
    Server Type
    JDBC (JNDI)
    Database Class Name
    oracle.jdbc.OracleDriver
    Use JDBC
    true
    URI
    !oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB
    Database DLL
    crdb_jdbc.dll
    Trusted_Connection
    false
    Server Name
    dbHost
    Connection String
    Use JDBC=b(true);Connection URL=s(jdbc:oracle:thin:@dbHost:1521:myDB);Database Class Name=s(oracle.jdbc.OracleDriver);Server=s(dbHost);User ID=s(myUser);Password=;Trusted_Connection=b(false);JDBC Connection String=s(!oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB)
    Server Type
    JDBC (JNDI)
    Database Class Name
    oracle.jdbc.OracleDriver
    Use JDBC
    true
    URI
    !oracle.jdbc.OracleDriver!jdbc:oracle:thin:/@dbHost:1521:myDB
    Database DLL
    crdb_jdbc.dll
    ReportClientDocument.getReportSource
    ERROR - JRCAgent1 detected an exception: Unable to load database connector 'com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
            at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.if(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.a(Unknown Source)
            at com.businessobjects.reports.sdk.b.i.byte(Unknown Source)
            at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(Unknown Source)
            at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.getPage(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.a(Unknown Source)
            at com.businessobjects.crystalreports.viewer.core.av.run(Unknown Source)
            at java.lang.Thread.run(Thread.java:534)
    Unable to load database connector 'com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'.
    Also got similar error when the path and classpath was switched to Oracle 11g.
    Is there a way to tell which file that it failed to load?
    Thanks
    Kin

  • A sign Applet unable to load "oracle.jdbc.OracleDriver" class

    hi,
    i am chiranjit , i am now working in a web based ERP. where i am using a signed applet which unable to load "oracle.jdbc.OracleDriver" class but it easily loading "sun.jdbc.odbc.JdbcOdbcDriver", i am also giving my code:
    import java.sql.*;
    import java.math.*;
    import java.io.*;
    import java.awt.*;
    class JdbcTest extends Applet{
    public static void main (String args[]) throws SQLException {
    // Load Oracle driver
    DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
    // Connect to the local database
    Connection conn =
    DriverManager.getConnection
    ("jdbc:oracle:thin:@192.168.16.7:1521:kris",
    "plsql", "oracle");
    // Query the employee names
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("SELECT FIRST_NAME FROM
    AUTHORS");
    // Print the name out
    while (rset.next ())
    System.out.println (rset.getString (1));
    // Close the result set, statement, and the connection
    rset.close();
    stmt.close();
    conn.close();
    }

    Hint: The sun.jdbc.odbc.JdbcOdbcDriver is available in any JRE distribution. The Oracle driver is not.

  • Urgent... unable to load JDBC driver

    i have developed a servlet which will establish connection to mySQL.. but it couldn't load the JDBC driver even i placed
    [ mysql-connector-java-2.0.14-bin.zip ] in [ C:\j2sdk1.4.2_05\jre\lib\ext\ ]
    in fact.. it work fine b4 i format my notebook.. anyone can help me??
    pls note that i using APACHE TOMCAT and mySQL 3.23
    pls help.. very urgent one
    the following is my servlet code.....
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class LoginServlet extends HttpServlet {
    static final String dbURL = "jdbc:mysql://localhost" ;
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    Connection conn = null;
    String nextJSP = null;
    try {
    Class.forName("org.gjt.mm.mysql.Driver");
    catch (ClassNotFoundException e) {
    throw new ServletException("Unable to load JDBC driver");
    }

    i already add new variable in environment variables
    variable name = CLASSPATH
    variable value = C:\j2sdk1.4.2_05\jre\lib\ext\mysql-connector-java-2.0.14-bin.jar;
    but the same output is come up.. still unable to load my JDBC driver in TOMCAT... y?

  • JDBC error - Unable to find or load Driver

    Hi,
    I'm attempting to connect to a MySQL database with using the statement below, using MySQL Connector 3.0.8:
    public void connectToDB() {
    try {
    connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/accounts?user=root&password=spider");
    } catch(SQLException connectException) {
    System.out.println(connectException.getMessage());
    System.out.println(connectException.getSQLState());
    System.out.println(connectException.getErrorCode());
    However, I obtain the error shown below when executing my code:
    C:\> java Accounts
    Unable to find and load Driver
    which is an output from:
    public Accounts() {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception e) {
    System.err.println("Unable to find and load driver");
    System.exit(1);
    My database is not located on another machine, but on the same machine rather (127.0.0.1) i.e. on my local PC.
    I've tried trouble shooting the problem by:
    C:\> telnet localhost 3306
    Bad Connection 4.0.20a-max@!5
    Connection to host lost
    C:\> ping 127.0.0.1
    4.0.20a-maCGxG;2&f,&#9787;
    Connection to host lost.
    C:\>ping 127.0.0.1:3306
    Ping request could not find host 127.0.0.1:3306. Please check the name and try a
    gain.
    C:\>ping 127.0.0.1
    Pinging 127.0.0.1 with 32 bytes of data:
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
    Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    C:\>
    Could anyone kindly tell me where did I go wrong, and how do I go about solving this issue?
    Below is the complete set of code(Accounts.java) which querries, inserts and deletes entries in the database.
    Thanks in advance.
    // Accounts.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import java.util.*;
    public class Accounts extends JFrame {
    private JButton getAccountButton,
    insertAccountButton,
    deleteAccountButton,
    updateAccountButton;
    private JList accountNumberList;
    private Connection connection;
    private JTextField accountIDText,
    usernameText,
    passwordText,
    tsText,
    activeTSText;
    private JTextArea errorText;
    public Accounts() {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception e) {
    System.err.println("Unable to find and load driver");
    System.exit(1);
    private void loadAccounts() {
    Vector v = new Vector();
    try {
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery("SELECT acc_id FROM acc_acc");
    while(rs.next()) {
    v.addElement(rs.getString("acc_id"));
    rs.close();
    } catch(SQLException e) {
    displaySQLErrors(e);
    accountNumberList.setListData(v);
    private void buildGUI() {
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    accountNumberList = new JList();
    loadAccounts();
    accountNumberList.setVisibleRowCount(2);
    JScrollPane accountNumberListScrollPane = new JScrollPane(accountNumberList);
    //Do Get Account Button
    getAccountButton = new JButton("Get Account");
    getAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    ResultSet rs = statement.executeQuery("SELECT * FROM acc_acc WHERE acc_id = " + accountNumberList.getSelectedValue());
    if (rs.next()) {
    accountIDText.setText(rs.getString("acc_id"));
    usernameText.setText(rs.getString("username"));
    passwordText.setText(rs.getString("password"));
    tsText.setText(rs.getString("ts"));
    activeTSText.setText(rs.getString("act_ts"));
    } catch(SQLException selectException) {
    displaySQLErrors(selectException);
    //Do Insert Account Button
    insertAccountButton = new JButton("Insert Account");
    insertAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("INSERT INTO acc_acc VALUES(" +
    accountIDText.getText() + ", " +
    "'" + usernameText.getText() + "', " +
    "'" + passwordText.getText() + "', " +
    "0" + ", " +
    "now())");
    errorText.append("Inserted " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    //Do Delete Account Button
    deleteAccountButton = new JButton("Delete Account");
    deleteAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("DELETE FROM acc_acc WHERE acc_id = " +
    accountNumberList.getSelectedValue());
    errorText.append("Deleted " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    //Do Update Account Button
    updateAccountButton = new JButton("Update Account");
    updateAccountButton.addActionListener (
    new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    Statement statement = connection.createStatement();
    int i = statement.executeUpdate("UPDATE acc_acc " +
    "SET username='" + usernameText.getText() + "', " +
    "password='" + passwordText.getText() + "', " +
    "act_ts = now() " +
    "WHERE acc_id = " + accountNumberList.getSelectedValue());
    errorText.append("Updated " + i + " rows successfully");
    accountNumberList.removeAll();
    loadAccounts();
    } catch(SQLException insertException) {
    displaySQLErrors(insertException);
    JPanel first = new JPanel(new GridLayout(5,1));
    first.add(accountNumberListScrollPane);
    first.add(getAccountButton);
    first.add(insertAccountButton);
    first.add(deleteAccountButton);
    first.add(updateAccountButton);
    accountIDText = new JTextField(15);
    usernameText = new JTextField(15);
    passwordText = new JTextField(15);
    tsText = new JTextField(15);
    activeTSText = new JTextField(15);
    errorText = new JTextArea(5, 15);
    errorText.setEditable(false);
    JPanel second = new JPanel();
    second.setLayout(new GridLayout(6,1));
    second.add(accountIDText);
    second.add(usernameText);
    second.add(passwordText);
    second.add(tsText);
    second.add(activeTSText);
    JPanel third = new JPanel();
    third.add(new JScrollPane(errorText));
    c.add(first);
    c.add(second);
    c.add(third);
    setSize(500,500);
    show();
    public void connectToDB() {
    try {
    connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/accounts?user=root&password=spider");
    } catch(SQLException connectException) {
    System.out.println(connectException.getMessage());
    System.out.println(connectException.getSQLState());
    System.out.println(connectException.getErrorCode());
    private void displaySQLErrors(SQLException e) {
    errorText.append("SQLException: " + e.getMessage() + "\n");
    errorText.append("SQLState: " + e.getSQLState() + "\n");
    errorText.append("VendorError: " + e.getErrorCode() + "\n");
    private void init() {
    connectToDB();
    public static void main(String[] args) {
    Accounts accounts = new Accounts();
    accounts.addWindowListener(
    new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    accounts.init();
    accounts.buildGUI();
    }

    Hi,
    Below is my PATH setting to the MySQL JDBC JAR added in the autoexec.bat file:
    PATH C:\j2sdk1.4.1_01\bin;C:\mysql-connector-java-3.0.8-stable-bin.jar;%CLASSPATH%
    Could you tell me where did I go wrong & how can I fix this problem?
    FYI, I'm using a Windows XP platform.
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\mysql\bin>net stop mysql
    The MySQL service is stopping..
    The MySQL service was stopped successfully.
    C:\mysql\bin>mysqld.exe
    C:\mysql\bin>net stop mysql
    The MySQL service is not started.
    More help is available by typing NET HELPMSG 3521.
    C:\mysql\bin>net start mysql
    The MySQL service is starting.
    The MySQL service was started successfully.
    I then tried initiating the MySQL client also on the same PC machine, but obtained the error below:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\mysql\bin>mysql.exe
    ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
    C:\mysql\bin>telnet localhost 3306
    Connecting To localhost...Could not open connection to the host, on port 3306: C
    onnect failed
    C:\mysql\bin>
    Could you or anyone else help me on this problem? I'm still a newbie with MySQL and JDBC.
    Thanks in advance

  • Torrentflux 2.4 (ADONewConnection: Unable to load database driver)

    I'm trying to setup Torrentflux 2.4 on my server.
    I used the torrentflux PKGBUILD vom AUR: http://aur.archlinux.org/packages.php?ID=1664
    I set up Apache/MySQL/PHP following the guide. PHP test script is working fine:
    <?php phpinfo(); ?>
    I setup a symbolic link from /srv/http to my /opt/torrentflux
    ls /srv/http/
    insgesamt 4
    -r--r--r-- 1 root root 20 6. Mär 21:23 test.php
    lrwxrwxrwx 1 root root 17 6. Mär 21:07 torrentflux -> /opt/torrentflux/
    When I try to open /torrentflux/login.php in my webbrowser it says
    ADONewConnection: Unable to load database driver ''
    I left the default in torrentflux' config.php:
    $cfg["db_type"] = "mysql"; // mysql, postgres7, postgres8 view adodb/drivers/
    ls /opt/torrentflux/adodb/drivers/
    insgesamt 532
    -r--r--r-- 1 root daemon 20476 6. Mär 20:44 adodb-mysql.inc.php
    -r--r--r-- 1 root daemon 25340 6. Mär 20:44 adodb-mysqli.inc.php
    -r--r--r-- 1 root daemon 3220 6. Mär 20:44 adodb-mysqlt.inc.php
    I'm pretty new to the whole LAMP stuff, so can please any1 tell me what's going wrong?

    Ok, some questions:
    1. Did you enable mysql in php.ini?
    http://wiki.archlinux.org/index.php/LAMP#MySQL
    2. Did you read / follow the torrentflux installation guide included with the installation?
    (if not, check here: http://www.torrentflux.com/)
    3. I have not worked with the package from AUR, the package form the official site (again, http://www.torrentflux.com/) works well for me. Did you try this?

  • Unable to load database connector

    Hi. I am trying to get a report running through the JRC in Crystal Reports XI. Whenever I try to run the report, it pulls up the viewer, but then gets the following message:
    "Unable to load database Connector"
    'com.crystaldecisions.reports.queryengine.driverImpl.DriverLoader'
    I was under the impression that I didn't need to set any JDBC parameters because it would pull them from the report. Is there some sort of configuration I missed?
    Thanks for any help.

    hello,
    I have got the same problem.
    Java don't find the class DriverLoader in any jar.
    I have found it on the CrystalDatabaseConnector.jar (an old jar) but that's makes some problems of compatibility when I use it.
    I have to add CrystalQueryEngine.jar (another old version jar) to work with it and i've got an java.lang.IncompatibleClassChangeError: Implementing class
    Best Regard

Maybe you are looking for