Java == error while connecting to mysql database?!?!??!

Hi. I'm using Eclipse to develope jsp pages. I'm new to java.
I'm trying to connect from a jsp page to mysql server and i'm getting an error on the line below:
Class.forName("com.mysql.jdbc.Driver");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
i downloaded the mysql jar file and i added it to my library folder.
the other question is that is there anyway to mention the name of the database in my connection?
conn =DriverManager.getConnection("jdbc:mysql://localhost","admin", "");

hi this is the root cause i thought it might help
root cause
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
     org.apache.jsp.test_jsp._jspService(test_jsp.java:100)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
     org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
     org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
     java.lang.ClassLoader.loadClassInternal(Unknown Source)
     java.lang.Class.forName0(Native Method)
     java.lang.Class.forName(Unknown Source)
     org.apache.jsp.test_jsp._jspService(test_jsp.java:85)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Similar Messages

  • Error while connecting to the database from a JSP Page

    Hi,
    I am using a simple JSP page which is based on the sample JSP pages from OTN.
    When I try to connect to my database using the following code:
    InitialContext ic = new InitialContext();
    OracleDataSource ds = (OracleDataSource)ic.lookup("jdbc/OTN9iDS");
    m_connection = ds.getConnection();
    I get the following error:
    Naming exception Error while connecting to the database : javax.naming.NameNotFoundException: jdbc/OTN9iDS not found in JDBCTest-JDBCTestProject-webapp
    Does anybody know wht this is happening?
    Any help would be appreciated
    FRank

    Hi Frank,
    Are you using standalone OC4J or 9iAS ? If you are using standalone OC4J then you need to add a proper data source entry in %OC4J_HOME%j2ee\home\config\data-sources.xml file.
    If you are using 9iAS the you can log in to the Enterprise Manager console and add the data source entry by using wizard provided by 9iAS.
    Ensure the case of the JNDI lookup string, since, it is case sensitive.
    Hope this helps.
    Abhijeet

  • Error while connecting to  Auxiliary Database

    Hi
    I am practicing Cloning the database on my Personal Computer. I am following the steps outlined here
    http://www.oracle-base.com/articles/9i/DuplicateDatabaseUsingRMAN9i.php
    But while connecting to Auxiliary database I get this error.
    RMAN - 04006 Error from auxiliary database: ORA 12514 TNS: listener does not currently know of service requested in connect descriptor
    RMAN - 00554 initialization of internal recovery manager package failed...
    what is the solution for this?
    This is 10g database and my PC has Opensuse 11 OS
    I think the problem is in configuring listener. But I am following the instructions given in that page....

    You probably skipped this part
    Next add the appropriate entries into the tnsnames.ora and listener.ora files in the $ORACLE_HOME/network/admin directory. Remember to load the new configuration into the listener:
    Which is why you are getting the error. The database needs to register itself with the listener. This doesn't happen in nomount mode.
    Other than that: there is an option in database control to duplicate a database in 10g. Using that you only need to hit buttons. Why are you using 9i code and policies?
    Sybrand Bakker
    Senior Oracle DBA

  • Getting Error while connecting to mysql

    hi
    i m running a simple standalone java program to connect to mysql in linux
    i got this exception classnotfound exception :com.mysql.jdbc.Driver
    here is the piece of code
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class test_mysql {
    public static void main(String sd[]) {
    Connection conn_source=null;
    Statement st_source=null;
    String IP1 = "IP ADDRESS";
    String DBName1 = "DATABASE NAME";
    String loginUrl1 = "jdbc:mysql://"+IP1+":3306/"+DBName1;
    String loginUser1 = "USER";
    String loginPasswd1 = "PASSWORD";
    System.out.println("deepak");
    try // source databse connection
    //Class.forName(driverName);
    //conn_source=DriverManager.getConnection(connectString,user,password);
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    conn_source = DriverManager.getConnection(loginUrl1,loginUser1, loginPasswd1);
    st_source=conn_source.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    catch(Exception connt)
    System.out.println("67: Database Connection Failed! - "+connt);
    }

    Is not necesary newInstance for DriverManager . You should charge the adecuate driver as first step.
    try {
    Class.forName("the name of driver"); // is enough for me
    // Second step : you should pass the parameter with the location and the name of database
    // I always use "jdbc:name_of_DBMS(you use mysql)://localhost:port_number/name_db"
    Connection con = DriverManager.getConnection("jdbc:mysql)://localhost:port_number/name_db,username,password);
    try on this way

  • Error while connecting to Access Database from Oracle

    Dear All,
    I'm trying to connect Oracle 9i to Access Database.
    but im getting the below error while executing query.
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from MYSQLi did the following thing through to connect the database.
    1) First i made odbc driver called ODBC1
    2) I create the following file on oracle server C:\oracle\ora9I\hs\admin\initodbc1.ora
    i edit the below thing in initodbc1.ora
    HS_FDS_CONNECT_INFO =ODBC1
    HS_FDS_TRACE_LEVEL = ON3) I made some changes in sqlnet.ora
    SQLNET.AUTHENTICATION_SERVICES= NONE
    before it was *NTS*4) Below are the entries in tnsnames.ora i changed the port from 1521 to 1522 cos 1521 already exists.
    ODBC1.TADAWI.LOC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1522))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ODBC1)
    ODBC1.WORLD =
      (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.251) (PORT = 1522)
      (CONNECT_DATA =
          (SID = ODBC1)
      (HS=OK)
    )5) Listener file code
    ODBC1 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1522))
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\ora9I)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\ora9I)
          (SID_NAME = orcl)
         (SID_DESC =
          (PROGRAM = hsodbc)
          (ORACLE_HOME = C:\oracle\ora9I)
          (SID_NAME = ODBC1)
      )6) after that i created
    SQL> CREATE DATABASE LINK MYSQL CONNECT TO XTRACK IDENTIFIED BY XTRACK USING 'ODBC1.WORLD'
    Database link created.7) Listener Status
    LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 04-MAR-2012 21:26:16
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=admin-amc)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
    Start Date                04-MAR-2012 20:52:33
    Uptime                    0 days 0 hr. 33 min. 44 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   C:\oracle\ora9I\network\admin\listener.ora
    Listener Log File         C:\oracle\ora9I\network\log\listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC2ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=8080))(Presentation=HTTP)(Session=RAW))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=2100))(Presentation=FTP)(Session=RAW))
    Services Summary...
    Service "ODBC1" has 1 instance(s).
      Instance "ODBC1", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 2 instance(s).
      Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfullyi did exactly what documentation says and it will not through any error but atlast when i try to access the access database tables it give me the below error
    SELECT * FROM DBO_COMPANY@MYSQL
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from MYSQLi'm using Oracle9i Enterprise Edition Release 9.2.0.1.0 any help will appreciate.
    Regards
    Moazam
    Edited by: Moazam Shareef on Mar 4, 2012 10:25 AM

    first of all thanks for your support Mr. Kgronau
    I did what u said but still its giving me below error.
    SQL> SELECT * FROM DBO_PATINS@MYSQL
      2  ;
    SELECT * FROM DBO_PATINS@MYSQL
    ERROR at line 1:
    ORA-12154: TNS:could not resolve service namei re-check the service, and restart the listener as you said below are the logs could you help me to solve this issue plz.
    TNSNAMES.ORA
    # TNSNAMES.ORA Network Configuration File: C:\oracle\ora9I\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL.TADAWI.LOC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
    ODBC1 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1522))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ODBC1)
    INST1_HTTP.TADAWI.LOC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = SHARED)
          (SERVICE_NAME = MODOSE)
          (PRESENTATION = http://HRService)
    EXTPROC_CONNECTION_DATA.TADAWI.LOC =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
      )LISTENER.ORA
    # LISTENER.ORA Network Configuration File: C:\oracle\ora9I\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1521))
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    ODBC1 =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = admin-amc)(PORT = 1522))
    SID_LIST_ODBC1 =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = ODBC1)
          (ORACLE_HOME = C:\oracle\ora9I)
          (PROGRAM = hsodbc)
        (SID_DESC =
          (GLOBAL_DBNAME = ODBC1)
          (ORACLE_HOME = C:\oracle\ora9I)
          (SID_NAME = ODBC1)
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\ora9I)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = C:\oracle\ora9I)
          (SID_NAME = orcl)
      )then i restart both listener entries (ie lsnrctl start ODBC1 and lsnrctl start ) and both are running fine without any error below are the status.
    LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 05-MAR-2012 18:42:09
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=admin-amc)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
    Start Date                05-MAR-2012 18:32:15
    Uptime                    0 days 0 hr. 9 min. 56 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   C:\oracle\ora9I\network\admin\listener.ora
    Listener Log File         C:\oracle\ora9I\network\log\listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC2ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=8080))(Presentation=HTTP)(Session=RAW))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=2100))(Presentation=FTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orcl" has 2 instance(s).
      Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfullyLISTENER.ORA ODBC1 status
    LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 05-MAR-2012 18:41:52
    Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=admin-amc)(PORT=1522)))
    STATUS of the LISTENER
    Alias                     ODBC1
    Version                   TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
    Start Date                05-MAR-2012 18:32:08
    Uptime                    0 days 0 hr. 9 min. 46 sec
    Trace Level               off
    Security                  OFF
    SNMP                      OFF
    Listener Parameter File   C:\oracle\ora9I\network\admin\listener.ora
    Listener Log File         C:\oracle\ora9I\network\log\odbc1.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=admin-amc.tadawi.loc)(PORT=1522)))
    Services Summary...
    Service "ODBC1" has 1 instance(s).
      Instance "ODBC1", status UNKNOWN, has 2 handler(s) for this service...
    The command completed successfullyWhere hope i'm near to retrive the access data.
    Regards
    Moazam

  • Error in connecting to mysql database using jsp

    Hi
    I've encountered this error:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    while trying to connect to MySQL db.
    I've downloaded the driver from www.mysql.com, and set the classpath as: "C:\mm.mysql.jdbc-1.2b;%CLASSPATH%;"
    But it juz doesn't seem to work...
    Can someone pls help me?

    These are my settings in autoexec.bat:
    SET PATH=C:\PROGRA~1\ABRIAS~1\ABRIAS~1\PERL\BIN;%PATH%;
    SET JAVA_HOME=C:\jdk1.3.1
    SET TOMCAT_HOME=C:\Tomcat3.2.3
    SET CLASSPATH=C:\mm.mysql.jdbc-1.2b;%CLASSPATH%;
    Well, i'm quite new to jsp so i'm not sure what u meant by "In the servlet container's init scripts?". I onli did the settings above and reset my server.
    I've tried checking the dir...and yes there's a dir named org.
    Any ideas wat can possibly be wrong???

  • Error to connect  to Mysql database

    hi
    I just initial write program with jsp. I alway have problem.
    I will connect Mysql Database. I 'm download JDBC Driver and setting.
    step of using JDBC
    1. Load Driver JDBC (use method forName())
    2. Connection Database (use method method getConnection())
    3. create object statement (use methodcreateStatement())
    after run, I get this error
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:67: unclosed character literal
         String sql="INSERT INTO test VALUES (",' " +name" ', ' " +surname+" ')";
    ^
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:67: unclosed character literal
         String sql="INSERT INTO test VALUES (",' " name" ', ' " surname+" ')";
    ^
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:67: unclosed character literal
         String sql="INSERT INTO test VALUES (",' " +name" ', ' " +surname+" ')";
    ^
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:67: unclosed character literal
         String sql="INSERT INTO test VALUES (",' " name" ', ' " surname+" ')";
    ^
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:67: unclosed string literal
         String sql="INSERT INTO test VALUES (",' " +name" ', ' " +surname+" ')";
    ^
    An error occurred at line: 6 in the jsp file: /test.jsp
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:76: '{' expected
         catch(SQLExeption e2);
    ^
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:110: 'catch' without 'try'
    } catch (Throwable t) {
    ^
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:31: 'try' without 'catch' or 'finally'
    try {
    ^
    C:\tomcat\work\Standalone\localhost\km\test_jsp.java:120: '}' expected
    ^
    9 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    i don't know error mean
    can anyone explain me and send me a sample code for connect MySQL
    Thank you

    The java code in your jsp is not valid java code; the error messages are explaining why.
    For example, this statement is totally managled.
    String sql="INSERT INTO test VALUES (",' " +name" ', ' " +surname+" ')";It should be:
    String sql="INSERT INTO test VALUES (' " +name+" ', ' " +surname+" ')";If you use PreparedStatement instead of Statement, then the SQL gets much much easier to write (and PreparedStatement has other advatages as well).
    Your other compilation problem is impossible to diagnose without the JSP source code; furthermore, it has nothing to do with JDBC, you simply have broken Java code. You need to post that question in a more appropriate forum.

  • Error when connecting to MySQL Database

    I am trying to connect to MySQL and receive an error everytime. I have attempted to talk to Bluehost (who my site is hosted thru) and they said it is not on their end and not something they can help me with. I set up a new MySQL Database with Bluehost and then set up the site through DW and everything went fine. I secured an ftp connection and went on to connect to MySQL. When I enter in my credentials for SQL Database, it returns:
    HTTP Error Code 404:
    Reason 1. No testing server running on the server machine.
    Reason 2. Testing server specified for this site deos not map to the http://my_domain.com/_mmServerScripts/MMHTPDB.php URL. Verify the URL Prefix maps to the site.
    The testing server model I am using is set to PHP MySQL and URL Prefix I am using (my_domain.com) is my website URL. I watched a YouTube video someone suggested elsewhere on how to add MMHTTPDB.php and mysql.php files to _mmServerScripts folder since the folder is empty but unfortunately, those files are not found on my computer. I assume they were supposed to be installed when I installed DW, but they are not here. I have done a general search of the comp and looked in each folder that was installed with DW and sadly, no files that match those names. What can I do? How can I make an SQL connection? Please help. It is greatly appreciated.
    -Sharon

    Your answer can be found somewhere in here http://forum.wampserver.com/read.php?2,83382,88694
    My hosts file (c:\windows\system32\drivers\etc\hosts) looks like
    # Copyright (c) 1993-2009 Microsoft Corp.
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    # For example:
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    # localhost name resolution is handled within DNS itself.
        127.0.0.1       localhost
        ::1             localhost

  • Adobe LiveCycle Designer ES Error while Connecting to MYSQL ODBC Driver

    Hi
    I'm getting an strange error message when i try to connect a LC PDF form to
    MYSQL DB using MySQL Connector /ODBC 3.51 Driver
    Here is the complete detail how i was trying to build a connection
    string :-
    I Opened a form in Adobe LiveCycle Designer ES2 Ver.9.0.0
    Clicked on Data View Pallete --> New Data Connection --> selected OLEDB Database radio button --> Build a Connection string (clicked on build button) --> selected MS OLE DB Provider for ODBC Drivers (the default selected option ) --> clicked on Next >> button --> Use connection string (radio button) --> Build connection string on clicking Build button --> Select Data Source windows opens --> Clicked on Machine Data Source tab --> created a new data source (with User Data Source) --> Selected the MySQL ODBC Driver (MySQL ODBC 3.51 Driver) --> Clicked on next button and then Finish
    A Connector/ ODBC 3.51.28 - Add Data Source Name window opens up which have the DSN connection details (DSN Name , Server , user , password , database).
    I put all the default details
    After this i got a error message saying that
    Adobe LiveCycle Designer ES has encountered a problem and needs to
    close. we are sorry for the inconvenience
    I tried this number of time and was getting this error message every
    time i try to put the DSN Detail and trying to connect to the DB. This
    was really irritating.
    Can somebody's what's the Issue . Is this a Resource Conflict or
    something else
    P.S :- I am using Adobe LiveCycle Designer ES2 Ver.9.0.0 with Windows XP and MySQL
    Connector /ODBC 3.51 and the DB Connection is working good for MS
    Access( though i don't need MySQL Connector fot this ).
    Any Help would be highly appreciated
    Thanks Alok

    Hi
    I'm getting an strange error message when i try to connect a LC PDF form to
    MYSQL DB using MySQL Connector /ODBC 3.51 Driver
    Here is the complete detail how i was trying to build a connection
    string :-
    I Opened a form in Adobe LiveCycle Designer ES2 Ver.9.0.0
    Clicked on Data View Pallete --> New Data Connection --> selected OLEDB Database radio button --> Build a Connection string (clicked on build button) --> selected MS OLE DB Provider for ODBC Drivers (the default selected option ) --> clicked on Next >> button --> Use connection string (radio button) --> Build connection string on clicking Build button --> Select Data Source windows opens --> Clicked on Machine Data Source tab --> created a new data source (with User Data Source) --> Selected the MySQL ODBC Driver (MySQL ODBC 3.51 Driver) --> Clicked on next button and then Finish
    A Connector/ ODBC 3.51.28 - Add Data Source Name window opens up which have the DSN connection details (DSN Name , Server , user , password , database).
    I put all the default details
    After this i got a error message saying that
    Adobe LiveCycle Designer ES has encountered a problem and needs to
    close. we are sorry for the inconvenience
    I tried this number of time and was getting this error message every
    time i try to put the DSN Detail and trying to connect to the DB. This
    was really irritating.
    Can somebody's what's the Issue . Is this a Resource Conflict or
    something else
    P.S :- I am using Adobe LiveCycle Designer ES2 Ver.9.0.0 with Windows XP and MySQL
    Connector /ODBC 3.51 and the DB Connection is working good for MS
    Access( though i don't need MySQL Connector fot this ).
    Any Help would be highly appreciated
    Thanks Alok

  • Error while connecting to Cloudscape Database

    Hi All,
    I am working on Sun's reference implementation App Server verson 1.3.1. It comes shipped with cloudscape database. When I write try to connect to this App Server through JSP that calls methods through Enterprise Java Beans I get this Error Message:
    java.net.ConnectException: Connection refused: connect
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: Unable to
    connect to database. Connection refused to host: XXXXXXXX; nested exception
    is:
    java.net.ConnectException: Connection refused: connect; nested exception
    is:
    javax.ejb.EJBException: Unable to connect to database. Connection refuse
    d to host: XXXXXXXXX; nested exception is:
    java.net.ConnectException: Connection refused: connect
    javax.ejb.EJBException: Unable to connect to database. Connection refused to hos
    t: XXXXXXXXX; nested exception is:
    java.net.ConnectException: Connection refused: connect
    <<no stack trace available>>
    Can any one help me solve this problem.
    Regards,
    Venky.

    Have you started the database?
    []s
    Michael

  • 500 error while connecting to MySQL

    Hello,
    I am trying to execute a ASP script which connects to a MySQL database and creates an object. But the problem is, am getting 500 error when I try to execute the ASP page.
    Server error!
    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
    If you think this is a server error, please contact the webmaster
    Error 500
    When I tried using testadocon to check the connection, I get another error too.
    root@myserver asp-server-3000]# ./testadocon Driver=Mysql; Server=localhost; Port=3306 ; Database=mydb; Uid=dbuser; Pwd=dbpasssword;
    IM002 -- [DataDirect][ODBC lib] Data source name not found and no default driver specified
    The code is as below:
    <%
    strConnectString = "Driver=MySQL; Server=66.132.171.147 ; Database=acclaim; Uid=accadmin; Pwd=9ijn8uhb;"
    if not IsObject("ojbConnection") then
    set objConnection=Server.CreateObject("ADODB.Connection")
    objConnection.ConnectionTimeout = 15
    objConnection.CommandTimeout = 10
    objConnection.Mode = 3 'adModeReadWrite
    if objConnection.state = 0 then
    objConnection.Open strConnectString
    end if
    end if
    response.write(objConnection.state)
    response.end
    %>

    For one, don't use org.git.mm.mysql.driver, it is the old Driver and is still there only for backwards compatibility. Use com.mysql.jdbc.Driver.
    For another, you should not be connecting a JSP to a Database. Scriptlets in a JSP are now considered very bad form. If you are doing that, then you should move that code out into a Bean, a servlet, a custom JSTL tag, or some other application or session context object.
    For a third, it would really help to see the actual code and the resourcce definition.

  • Error while connecting to Access Database

    hi
    i am making an application using Access Database using the following code
    *try {*
    *Connection conn=null;*
    *Statement s=null;*
    *ResultSet rs=null;*
        *Context ctx=new InitialContext();*
         *DataSource ds=(DataSource)ctx.lookup("jdbc/AccessDb");*
    **     conn = ds.getConnection();**
    **      s = conn.createStatement();**
    *rs = s.executeQuery("select empname from stable");*
    **      IPrivateApplic1View.IRsElement elm=null;**
    **      while (rs.next())**
    **          elm=wdContext.nodeRs().createRsElement();**
    **          elm.setValue(rs.getString(1));**
    **          wdContext.nodeRs().addElement(elm);**
    **     } catch (Exception e) {**
    **          wdComponentAPI.getMessageManager().reportSuccess(""+e);**
    **          e.printStackTrace();**
    but it is showing the error
    *com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of AccessDb.*

    Hi
    refer
    [Connecting to MS Access using receiver JDBC Adapter (Without DSN)|Connecting to MS Access using receiver JDBC Adapter (Without DSN)]
    [/thread/147169 [original link is broken]|/thread/147169 [original link is broken]]
    thanks
    suresh

  • Getting Java error while connect BEx query to WebI report (SAP BI4.0 )

    Not able to connect BEx query to WebI report (SAP BI4.0 ) . Below is the error I get while creating a new BEx connection to BOBJ WebI report .
    Please find the below error and help me ,
    "Select a BW Bex query window box "  displayed "Nothing to display " and server error as mentioned below
    Java.uti.concurrent.executionException: Com.sap.sl.sdk.repository.service.repositor******
    at Java.uti.concurrent.futuretask (Unknown source )
    at java.swing.swing.timer.fireactionperformed(Unknown source )
    at java.awt.event.invocationEvent.dispatch(Unknown Source)
    Thanks ,
    Pradeep Gorpadu

    Hi,
    I am on BO 4.0 SP05 Patch 6. Webi reports are just showing processing but not giving results. When I try to create new report it is throwing java security error.
    Tried applet patch upgrade(From link : https://websmp207.sap-ag.de/~sapidb/011000358700000902752013E) for webi certificate but didn't help.
    Please suggest what could be done.
    Thanks and Regards,
    Ankit Sharma

  • ERROR while connecting to Netezza Database from oracle 10g via dblink.

    Gurus,
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}

    Manik wrote:
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}Always test ODBC client connectivity on the Oracle server to the remote and foreign database, first. Use the isql ODBC client command line interface (as the oracle or grid o/s user).
    If this does not work, then Oracle HSO will also not work.
    Once you have confirmed that this is working, then configure the HSO service for Oracle.
    If that fails, enables ODBC client tracing for that HSO service (in the init file for that service) to see exactly what ODBC calls Oracle is making and which of these are failing.

  • I was facing problem while connecting to oracle database.Can some one help me soon!!!!!

    Hi all,
    I was facing problem from last week.Suddenly i was getting ora-12505 error while connecting to the database through toad.I tried to change tnsnames.ora & listener.ora in multiple ways,but no luck...Inspite i was getting different errors like ora - 01034: ORACLE not available / ora - 27101: shared memory realm does not exist...When i try to connect using sys / sys as sysdba,connection is establishing and when issue the command startup it was throwing the error ORA-01821: date format not recognized......Fed up solving these issues....Can some one help me out...It's very very urgent..
    Thanks in advance,
    pavankumar.

    Well, the obviously solution is to use separate Apple ID's for iCloud.

Maybe you are looking for

  • Accessing OBIEE report  from mobile browser or tablet

    HI jdev 11.1.1.5 we have OBIEE reports embeded in adf jspx page . can we access this report from mobile browser or tablet ? I think we can access OBIEE report using OBIEE client application for Iphone. but is it possible to access the same from mobil

  • HP G62 Notebook has Smart Hard disk error

    My HP G62 Notebook PC just stopped in the middle of my doing homework the other day and came up with an error code on the screen. I have went in through the BIOS and ran a hard disk test. It passes the first 2 tests and then fails on the third one. I

  • Where do I go to find saved forms that I created?

    Help!!! I spent all this time making my form and now I want to retrieve it!  Where do I go?

  • Validation for Connectors in a Flowchart in Visio 2010

    I am trying to validate that connectors emerging from a Decision must have text entered to them. Other connectors should not have any text associated with them. The validation rules are as follows: The FilterExpression is: AND(ROLE()=1,FILTERSET("GLU

  • Trouble With First Workflow

    This is my first attempt to make a workflow which has more than a couple steps and I cant seem to get it to work. This is for a generic SharePoint 2013 list. I've taken some online tutorials and watched some videos but none of them get me close enoug