MySQL/WAMP connect error

I've been using CS3 in connection with WAMP to insert PHP
code into pages. The MySQL database sits at a remote server. The
setup worked fine with CS2 and CS3 for the two or three years.
All of a sudden, last Thursday, there were errors connecting
to the database. All the settings were exactly the same as they
were the on Wednesday, but now the connection was timing out. The
problem wasn't the web server, it wasn't my ISP - we thought we
narrowed it down to the router. We bought a new router - and the
problems persisted on all four computers in our network, two
running XP and two running Vista. It can't be a firewall issue
because all four machines don't have the same settings.
So the problem lies with WAMP or Dreamweaver. I've installed
WAMP5, stepped back to Dreamweaver MX 2004 - nothing works.
The error is:
"Testing Database Connection..." searches and fails several
times, then responds with:" MySQL error 2003: Cannot connect to
server on "IP.Address"
I can log into the FTP site, I can log into the PHPMyAdmin
through a web browser.
On top of that, after trying (and failing) to connect to the
MySQL database, I get a network timeout from the web pages
themselves. The pages fail to load in any browser. The FTP won't
connect. I can clear that by uninstalling WAMP and re-installing
Dreamweaver.
It's frustrating because I have run out of fix options. Over
four days, nothing has worked. Everything seems like it should work
- because it did, up until Thursday.

Hi sohail.
As you title mentioned wamp server, for WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. This is third-party software. I
am afraid this is out of our support.  I would suggest you to ask in their
official forum. Thanks for your understanding.
Have a nice day!
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Mysql.sock - connection error (code 2002)

    Performed a clean install of SL Server.
    Enabled Web and MySQL services.
    When using GUI (SequelPro of MySQL GUI Tools) I get a mysql.sock connection error.
    "Could not connect to MySQL instance at localhost. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (code 2002)"
    The database location of MySQL is /var/mysql. Thus a reference to /tmp/mysql.sock is obviously wrong.
    The file /var/mysql/mysql.sock does exist but apparently no reference is made to this file.
    Q: How to make a reference to the correct socket file,
    Coen
    info from Terminal:
    mysql> status
    mysql Ver 14.12 Distrib 5.0.82, for apple-darwin10.0 (i386) using EditLine wrapper
    Connection id: 6
    Current database:
    Current user: s2xladmin@localhost
    SSL: Not in use
    Current pager: stdout
    Using outfile: ''
    Using delimiter: ;
    Server version: 5.0.82-log Source distribution
    Protocol version: 10
    Connection: Localhost via UNIX socket
    Server characterset: latin1
    Db characterset: latin1
    Client characterset: latin1
    Conn. characterset: latin1
    UNIX socket: /var/mysql/mysql.sock
    Uptime: 1 day 3 hours 41 min 7 sec
    Threads: 1 Questions: 12 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.000
    Message was edited by: Coen Jeukens

    It looks looks like the Sequel Pro app is guessing incorrectly that the mysql.sock is in /tmp. If that's the problem, you should be able to fix it by going to Sequel Pro's Connection panel and entering the correct path, which is /var/mysql/mysql.sock.

  • MySQL JDBC connection error

    Hi!
    I am trying to conect to MySql database form a jsp page, but I get error. I am using the following:
    1. MySql dababase installed in C:/mysql
    2. Tomcat installed in c:/tomcat
    3. JDBC driver "mm.mysql-2.0.14-bin.jar" installed in c:\tomcat\lib
    Here is my code:
    <%@ page import="java.sql.*" %>
    <%
    String connectionURL = "jdbc:mysql://localhost:3306/gixpro1?user=username&password=pwd";
    Connection connection = null;
    Statement statement = null;
    ResultSet rs = null;
    %>
    <html><body>
    <%
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    connection = DriverManager.getConnection(connectionURL, "", "");
    statement = connection.createStatement();
    rs = statement.executeQuery("SELECT * FROM gixpro1");
    while (rs.next()) {
    out.println(rs.getString("name")+"<br>");
    rs.close();
    %>
    </body></html>
    Here is my error:
    Internal Servlet Error:
    javax.servlet.ServletException: org.gjt.mm.mysql.Driver
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:462)
    at jsp.test_4._jspService(test_4.java:89)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java:235)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClassInternal1(DependClassLoader12.java:240)
    at org.apache.tomcat.util.depend.DependClassLoader12Impl$1.run(DependClassLoader12.java:109)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClass(DependClassLoader12.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at jsp.test_4._jspService(test_4.java:68)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java:235)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:484) at org.apache.tomcat.util.depend.DependClassLoader12Impl$1.run(DependClassLoader12.java:109)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.tomcat.util.depend.DependClassLoader12Impl.loadClass(DependClassLoader12.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at jsp.test_3._jspService(test_3.java:69)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java:235)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
    at java.lang.Thread.run(Thread.java:484)

    Hi!
    I also have the same problem (I also test the sample in this case but still got the same error. When I use a standard java client then I can acess mySQL database without any problem, this just occurs when trying to access the database from a JSP page.
    CLASSPATH=
    C:\Program\RDBMS\mySQL\mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar
    Please need som advice on this.
    Regards
    Tobbe
    See errormessage below
    javax.servlet.ServletException: org.gjt.mm.mysql.Driver
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
    at org.apache.jsp.TestMySQL$jsp._jspService(TestMySQL$jsp.java:91)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    root cause
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1320)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1169)

  • Error in Mysql database connectivity

    hello,
    there is problem in Mysql database connectivity.
    when i connect JSP program to Mysql database it gives error :
    Server configuration denied access to data source
    please help me asap
    kuldip jain
    [email protected]

    i m also working on Mysql Java but on Window 2000 platform
    here is the Java code which successfully runing on my machine
    import java.sql.*;
    public class TestMySql
         public static void main(String[] Args)
              try
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection C = DriverManager.getConnection(
    "jdbc:mysql://server2:3306/Db?user=root");
    Statement Stmt = C.createStatement();
    ResultSet RS = Stmt.executeQuery("SELECT * from T1");
    while (RS.next()) {
                             System.out.println(RS.getString(1));
    catch (Exception E)
    System.out.println("SQLException: " + E.getMessage());

  • Getting connection error on windows xp with connector-java-3.1.10 for Mysql

    Hi,
    I am using Mysql 4.1.13 with Tomcat 5 and Connector mysql-connector-java-3.1.10 on Windows XP machine. When I try to update the table in batch mode sometimes( When server is idle for a long time) get following error.
    ERROR [com.userdefined.SchedulerJobs.DownloadDssPresetJob] com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2921)
    =ERROR [com.userdefined.SchedulerJobs.DownloadDssPresetJob] com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
    =ERROR [com.userdefined.SchedulerJobs.DownloadDssPresetJob] com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
    =ERROR [com.userdefined.SchedulerJobs.DownloadDssPresetJob] com.mysql.jdbc.Connection.execSQL(Connection.java:2972)
    =ERROR [com.userdefined.SchedulerJobs.DownloadDssPresetJob] com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
    com.mysql.jdbc.Statement.execute(Statement.java:529)
    I also get the following error :
    com.mysql.jdbc.CommunicationsException
    MESSAGE: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Software caused connection abort: recv failed
    STACKTRACE:
    java.net.SocketException: Software caused connection abort: recv failed
    java.net.SocketException: Software caused connection abort: recv failed
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:105)
         at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:148)
         at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:176)
         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1899)
         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2348)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2972)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:822)
         at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
         at com.userdefined.DatabaseMapping.DatabaseParser.getColumns(DatabaseParser.java:388)
         at com.userdefined.DatabaseMapping.Table.<init>(Table.java:62)
         at com.userdefined.DatabaseMapping.DBMapping.parseAndSave(DBMapping.java:185)
         at com.userdefined.SchedulerJobs.DownloadDssNewJob.downloadJob(DownloadDssNewJob.java:404)
         at com.userdefined.SchedulerJobs.DownloadDssNewJob.execute(DownloadDssNewJob.java:113)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
    I have searched the web for the same but could not come up with the exact solution.
    Please help me with the same.
    Regards,
    veena

    And, according to this release note:
    http://java.sun.com/j2se/1.4.2/docs/guide/swing/SwingChanges.html#4668963
    ...sounds like exactly what you are seeing.
    Metal Can Now Pick up Font Sizes from the Desktop on Microsoft Windows
    The bugtraq reports that correspond to this change are: 4419964 and 4668963.
    Prior to this release, the DefaultMetalTheme ignored the font size information from the Windows desktop. As of release 1.4.1, DefaultMetalTheme can use the font sizes specified in the Windows desktop. This can be disabled using the system property swing.useSystemFontSettings. An additional part of this bug is that our Windows look and feel was picking up the wrong fonts for a handful of components; this has been fixed.

  • Connecting to mySQL database, timeout error

    I am having problems connecting to my database, here is the connection class
    public class DBConnect
        public static Connection getDBConnect() throws Exception
            String x = "worked";
            //String url = "jdbc:mysql://mysql8.secureserver.net";
            String url = "jdbc:mysql://mysql13.secureserver.net/DBName?user=User&password=Password";
            System.out.println("Before driver load");
            try
                Class.forName("com.mysql.jdbc.Driver");
                System.out.println("Driver Loaded");
            catch(java.lang.ClassNotFoundException e)
                System.err.print("ClassNotFoundException: ");
                System.err.println(e.getMessage());
            System.out.println("After driver loaded and Before connect");
                Connection con = DriverManager.getConnection(url);
                System.out.println("Tried connect");
                return con;       
    }here is the error:
    INFO: Server startup in 17685 ms
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: connect
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:151)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:1765).....

    4. The username and password are incorrect, and it's
    hanging waiting for you to enter new ones. (I've had
    this happen before with Oracle).Sir,
    A good point but MySQL will just bomb out in this case.
    Another possibility is do you have the latest JConnect driver? The old drivers have protocol issues talking with the newest versioned servers.. but the new drivers are backwards compatible.
    Sincerely,
    Slappy

  • Error MySQL #2002 connection could not be made etc from phpMyAdmin

    Error MySQL #2002 connection could not be made etc from phpMyAdmin
    I am just seting up Adobe Flash Builder 4.5 for PHP, Zend Server, MySQL and phpMyAdmin.
    On attempting The Tutorial Build your first Mobile PHP project I am getting this error.
    Can anybody help please ?

    Just thought I would add that I did every test the help files suggest, no firewall etc.
    Strange thing is that after the majority downloaded I had about 55 apps left that could not be updated because of the network connection that could not be made, I downloaded them manually instead of clicking 'yes please do download them all'.
    I still came across a few that gave me the msg that an connection could not be made but when I skipped them and came back later to try again it did download. Took some time but I now have them all up to date.
    Now see if I can sync the iPhone and iPad.
    I run the latest iTunes 10.4.1 (10) and 10.6.8, have not updated to Lion yet.
    cheers,
    Christine

  • Connection error with mysql

    hi,
    i'm using j2sdk1.4.2 and mysql 3.x, and i'm having problems with the connection of these two. i used the latest connector which is mysql-connector-java-3.0.14-production-bin.jar, and i followed all the steps for installing this connector. my classpath is already set to where i placed the jar file. however, i still get this error :
    java.sql.SQLException : unable to connect to any hosts due to exception: java.net.ConnectException : Connection refused : connect
    what should i do?
    and by the way, here's the code :
    import java.sql.*;
    public class JdbcExample1 {
    public static void main(String args[]) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql:///");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
         e.printStackTrace();
    } }

    Hi, I am new to all these.
    Recently I been trying to get Mysql and JSP and Tomcat working but try and try still cannot. Since you guys are on this topic and more knowledgeable I hope that you could help me out. Thanks.
    I have the same set up as you except mysql version 4.0
    MySQL is working fine by itself, JSP is working fine connecting to Apache Tomcat fine but cannot get MySQL data connected to show on Tomcat.
    Sample code as below
    import java.sql.*;
    import java.io.*;
    class StocksMy {
    public static void main (String args []) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    try {
    } catch (Exception e) {
    System.out.println("StocksMy");
    System.exit(1);
    Connection conn =DriverManager.getConnection
    ("jdbc:mysql://:3306/StocksMy);
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("select * from stocks");
    while (rset.next()) {
    String ticker=rset.getString(1).trim();
    String title=rset.getString(2).trim();
    String price=rset.getString(3).trim();
    String blanks=
    System.out.print (ticker);
    System.out.print(blanks.substring(1,8-ticker.length()));
    System.out.print (title);
    System.out.print(blanks.substring(1,41-title.length()));
    System.out.println (price);
    } catch (Exception e) {
    System.out.println("StocksMy: JDBC exception");
    System.exit(1);
    PLEASE is this correct?
    How to get this to show up in Tomcat (localhost:8080) ?
    I guess must convert to JSP first? How? Can show from sample above or a simple sample?
    All very confusing to me.
    Thanks guys.

  • Mysql connections error needing flush

    Connected SQL Developer to a mysql database which worked OK. Used latest mysql connector and added it to prefs.
    Problem is that after awhile SQLDeveloper comes back that mysql has too many connection errors and I should use "mysqladmin flush-hosts". The errors are related to my sqldeveloper as other applicatinos continue to access the db ok.
    I was careful to connect and disconnect in sqldeveloper but this still happens.
    I know I can increase the connection count, etc. in mysql but I'm thinking that just extends any problem.
    Any ideas ? thanks

    Hi Steverar,
    I have got this occasioanly with mysql
    "mysqladmin flush-hosts".
    I ran the command on the mysql test box. I have not investigated it as a SQLDevelloper problem - I thought it was a mysql admin command.
    -Turloch
    SQLDeveloper forum.

  • Database Connection Error Cannot create PoolableConnectionFactory

    Hello everyone,
    Background:
    I have a newly installed and configured Ubuntu server running Tomcat5.5 and Mysql 5.0. This server was created in an attempt to migrate from a Red Hat server in a similar configuration, running the exact same webapp. Most of the configuration/classpath differences between the two platforms have been ironed out.
    The Problem:
    When our webapp trys to connect to the database on localhost, an exception 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)' is generated.
    The server.xml configuration is below:
    <Resource name="jdbc/EconDollarsDB"
    auth="Container"
    type="javax.sql.DataSource"
    username="user"
    password="pass"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/DBName?autoReconnect=true"
    maxActive="20" maxIdle="5"
    />I can connect to the database just fine using the command line client and the same username/password combo. This configuration has been working fine for at least a year on the older server. The only similar problems I have found on the net (meaning the same exception is generated) involve applets and attempts to connect to different hosts. This case involves a webapp, connecting to localhost, using a configuration that is known to work! I am simply baffled.
    The following stacktrace is generated:
    javax.servlet.ServletException: Database Connection Error
    Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)'.
    ** BEGIN NESTED EXCEPTION **
    java.security.AccessControlException
    MESSAGE: access denied (java.net.SocketPermission localhost resolve)
    STACKTRACE:
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
         at java.net.InetAddress.getAllByName(InetAddress.java:1061)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
         at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
         at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
         at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
         at edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:102)
         at edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         at edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         at edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         at edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         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:684)
         at java.lang.Thread.run(Thread.java:595)
    ** END NESTED EXCEPTION **
    Attempted reconnect 3 times. Giving up.)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
         org.apache.jasper.runtime.PageContextImpl.access$11(PageContextImpl.java:65)
         org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:766)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:764)
         org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:242)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
    edu.tamu.erl.database.dblibrary.DBLibraryBaseException: Database Connection Error
    Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)'.
    ** BEGIN NESTED EXCEPTION **
    java.security.AccessControlException
    MESSAGE: access denied (java.net.SocketPermission localhost resolve)
    STACKTRACE:
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
         at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
         at java.net.InetAddress.getAllByName(InetAddress.java:1061)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
         at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
         at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
         at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
         at edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:102)
         at edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         at edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         at edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         at edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         at org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:50)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         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:684)
         at java.lang.Thread.run(Thread.java:595)
    ** END NESTED EXCEPTION **
    Attempted reconnect 3 times. Giving up.)
         edu.tamu.erl.database.dblibrary.plugin.TomcatConnectionFactory.getConnection(TomcatConnectionFactory.java:105)
         edu.tamu.erl.database.dblibrary.DBManager.getConnection(DBManager.java:70)
         edu.tamu.erl.database.dblibrary.DBManager.getDBDataAccessObjectList(DBManager.java:318)
         edu.tamu.erl.econdollars.middletire.SessionManager.getSessionStatus(SessionManager.java:157)
         edu.tamu.erl.econdollars.middletire.SessionManager.retallyDB(SessionManager.java:637)
         org.apache.jsp.admin.login_jsp._jspService(login_jsp.java:88)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)Any help would be greatly appreciated.

    Hi,
    Its clearly saying the connect permission is missing with the current available policy.
    you add the following permisson entry to the <installed JRE>\lib\security\java.policy file.
    (e.g) C:\Program Files\Java\j2re1.4.2_08\lib\security\java.policy
    permission java.security.AllPermission;
    grant{
    permission java.security.AllPermission;
    If the application is running standalone then the code is allowed uncontrolled access but for webapplicatons running through browser, the security check is performed for the configured JRE.
    Regards
    Karthik
    <[email protected]>

  • MySQL gateway connection

    Looks like plenty of folks here have similar problems getting the dg4odbc gateway working for MySQL. Hope someone that's tackled this can help me out.
    Our configuration is such that we have our gateway machine separate from our Oracle database, and the MySQL machine is yet another server. We have installed and configured the gateway along with the unixODBC gateway and the MySQL connector. Running ./isql from the gateway successfully connects to the MySQL database and returns rows from specified tables.
    Our difficulty is with setting up the listener.ora (on the gateway) and tnsnames.ora (on the Oracle host). Here are the contents of those files:
    listenter.ora:
    SID_LIST_LISTENER =
        (SID_DESC =
          (PROGRAM = dg4odbc)
          (ORACLE_HOME=/db01/app/oracle/product/gateways)
          (SID_NAME = myodbc3)
          (ENVS=LD_LIBRARY_PATH=/opt/unixODBC/lib:/opt/mysql/myodbc5/lib:/usr/local/lib:/db01/app/oracle/product/gateways/lib)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
          (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))
      )tnsnames.ora:
    dg4odbc =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))
        (CONNECT_DATA = (SID= myodbc3))
        (HS=OK)
      )Listener status on the gateway is:
    -bash-3.00$ lsnrctl status
    LSNRCTL for Solaris: Version 11.1.0.6.0 - Production on 26-APR-2010 15:07:08
    Copyright (c) 1991, 2007, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Solaris: Version 11.1.0.6.0 - Production
    Start Date                26-APR-2010 14:41:51
    Uptime                    0 days 0 hr. 25 min. 17 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /db01/app/oracle/product/gateways/network/admin/listener.ora
    Listener Log File         /db01/app/oracle/diag/tnslsnr/ozone4/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gw_host)(PORT=1521)))
    Services Summary...
    Service "myodbc3" has 1 instance(s).
      Instance "myodbc3", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfullyCan anyone see anything obvious in this configuration that's out of whack?
    I logged into sqlplus and create a public database link:
    SQL> create public database link mysql
      2   connect to user_name identified by password
      3  using 'dg4odbc';Executing a query via the link gives the following:
    SQL> select * from block@mysql;
    select * from block@mysql
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from MYSQLAnyone seen this before or have any ideas for me? I've read through the docs and this forum and just cannot see where the problem lies.
    Earl
    P.S. tnsping from the Oracle database to the gateway gives this:
    merc@: tnsping dg4odbc
    TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 26-APR-2010 15:15:07
    Copyright (c) 1997,  2007, Oracle.  All rights reserved.
    Used parameter files:
    /opt/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = gw_host)(PORT = 1521))) (CONNECT_DATA = (SID= myodbc3)) (HS=OK))
    OK (0 msec)

    >
    Maybe it is sufficient to get the part where the libodbc.so library is loaded, so check where you'll find it in the strace file and provide this info until the error is visible in the traceHopefully this is what you wanted from truss.
    23074/1:     stat("/opt/unixODBC/lib/libodbc.so", 0xFFFFFFFF7FFFD4A0) = 0
    23074/1:     resolvepath("/opt/unixODBC/lib/libodbc.so", "/opt/unixODBC/lib/libodbc.so.1.0.0", 1023) = 34
    23074/1:     open("/opt/unixODBC/lib/libodbc.so", O_RDONLY)     = 9
    23074/1:     mmap(0x00100000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 9, 0) = 0xFFFFFFFF7A400000
    23074/1:     mmap(0x00100000, 1826816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFFFFFFFF7A200000
    23074/1:     mmap(0xFFFFFFFF7A200000, 719355, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 9, 0) = 0xFFFFFFFF7A200000
    23074/1:     mmap(0xFFFFFFFF7A3AE000, 55864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 9, 712704) = 0xFFFFFFFF7A3AE000
    23074/1:     mmap(0xFFFFFFFF7A3BC000, 1552, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFFFFFFFF7A3BC000
    23074/1:     munmap(0xFFFFFFFF7A2B0000, 1040384)          = 0
    23074/1:     memcntl(0xFFFFFFFF7A200000, 75448, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
    23074/1:     close(9)                         = 0
    23074/1:     stat("/opt/unixODBC/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/mysql/myodbc5/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/usr/local/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/db01/app/oracle/product/gateways/lib/libdl.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/unixODBC/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/mysql/myodbc5/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/usr/local/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/db01/app/oracle/product/gateways/lib/libthread.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/unixODBC/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/mysql/myodbc5/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/usr/local/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/db01/app/oracle/product/gateways/lib/libc.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/unixODBC/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/opt/mysql/myodbc5/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/usr/local/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) = 0
    23074/1:     resolvepath("/usr/local/lib/libgcc_s.so.1", "/usr/local/lib/libgcc_s.so.1", 1023) = 28
    23074/1:     open("/usr/local/lib/libgcc_s.so.1", O_RDONLY)     = 9
    23074/1:     mmap(0xFFFFFFFF7A400000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 9, 0) = 0xFFFFFFFF7A400000
    23074/1:     close(9)                         = 0
    23074/1:     stat("/db01/app/oracle/product/gateways/lib/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/lib/64/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     stat("/usr/lib/64/libgcc_s.so.1", 0xFFFFFFFF7FFFD230) Err#2 ENOENT
    23074/1:     munmap(0xFFFFFFFF7A200000, 719355)          = 0
    23074/1:     munmap(0xFFFFFFFF7A3AE000, 58892)          = 0
    23074/1:     munmap(0xFFFFFFFF7A400000, 32768)          = 0
    23074/1:     write(7, "   h o a e r r : 2 8 5 0".., 14)     = 14
    23074/1:     time()                              = 1273255397
    23074/1:     write(7, " E x i t i n g   h g o l".., 40)     = 40
    23074/1:     write(7, " F a i l e d   t o   l o".., 81)     = 81
    23074/1:     time()                              = 1273255397
    23074/1:     write(7, " E x i t i n g   h g o l".., 49)     = 49
    23074/1:     time()                              = 1273255397
    23074/1:     write(7, " E x i t i n g   h g o i".., 126)     = 126
    23074/1:     getpid()                         = 23074 [5550]
    23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
    23074/1:     fstat(9, 0xFFFFFFFF7FFFD1F8)               = 0
    23074/1:     open("/dev/zero", O_RDWR)               = 12
    23074/1:     mmap(0x00000000, 14872, PROT_READ|PROT_WRITE, MAP_PRIVATE, 12, 0) = 0xFFFFFFFF7AC00000
    23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 14872, 0) = 7488
    23074/1:     close(9)                         = 0
    23074/1:     munmap(0xFFFFFFFF7AC00000, 7592)          = 0
    23074/1:     write(7, " h o s t m s t r :      ".., 41)     = 41
    23074/1:     write(14, "\0 *\0\006\0\0\0\0\080\0".., 42)     = 42
    23074/1:     read(14, "\0 n\0\006\0\0\0\0\0 H\0".., 8208)     = 110
    23074/1:     getpid()                         = 23074 [5550]
    23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
    23074/1:     fstat(9, 0xFFFFFFFF7FFFD4D8)               = 0
    23074/1:     open("/dev/zero", O_RDWR)               = 13
    23074/1:     mmap(0x00000000, 15080, PROT_READ|PROT_WRITE, MAP_PRIVATE, 13, 0) = 0xFFFFFFFF7A400000
    23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 15080, 0) = 7592
    23074/1:     close(9)                         = 0
    23074/1:     munmap(0xFFFFFFFF7A400000, 7696)          = 0
    23074/1:     write(7, " h o s t m s t r :      ".., 44)     = 44
    23074/1:     getpid()                         = 23074 [5550]
    23074/1:     open("/proc/23074/map", O_RDONLY)          = 9
    23074/1:     fstat(9, 0xFFFFFFFF7FFFD358)               = 0
    23074/1:     open("/dev/zero", O_RDWR)               = 15
    23074/1:     mmap(0x00000000, 15288, PROT_READ|PROT_WRITE, MAP_PRIVATE, 15, 0) = 0xFFFFFFFF7A300000
    23074/1:     pread(9, "\0\0\001\0\0\0\0\0\0\0\0".., 15288, 0) = 7696
    23074/1:     close(9)                         = 0There appear to be errors there but I have no idea how to read this output. Thanks again for your help.
    Earl

  • MySQL Not Working: Error 2002

    computer:/ javier$ mysql -u root
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
    How can I fix this,
    sure enough there is no mysql.sock in that directory

    hey, try this in terminal, creating a symbolic link, from your real socket to a "fake socket"
    sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    Hope this helps!

  • Creating connection error?

    hey all, i have created an application which when run through eclipse works 100% as expected. but when exported as a .jar i recieve an error from conecting to the database in question.
    String URL = "jdbc:mysql://82.110.105.79:3306/web79-j-clarkhou", username = "*****", password = "********";
                   try {
                        Class.forName("com.mysql.jdbc.Driver").newInstance();
                        con = DriverManager.getConnection(URL, username, password);i have narrowed it down to the above 3 lines, the URL string is 100% correct so im guessing its either not finding my driver or cannot create the connection help please ?

    I will gladly show you the code nested between them two areas, but i can assure you that the code is never reached. the application does not even make the connection. i have manually tested this by printing out after every command as it wasnt throwing any error
    Connection con = null;
                   String URL = "jdbc:mysql://82.110.105.79:3306/web79-j-clarkhou", username = "****", password = "******";
                   try {
                        Class.forName("com.mysql.jdbc.Driver").newInstance();
                        con = DriverManager.getConnection(URL, username, password);
                        if (!con.isClosed()) {
                             mainAddNote("DATABASE # Successfully connected to "
                                       + "MySQL server using TCP/IP");
                        Statement stmt = con.createStatement();
                        /* Load customer list */
                        ResultSet rs = stmt.executeQuery("SELECT * FROM `Customers`");
                        while (rs.next()) {
                             Customer cust = new Customer();
                             cust.customerID = rs.getInt("customerID");
                             cust.firstName = rs.getString("firstName");
                             cust.lastName = rs.getString("lastName");
                             cust.houseNumber = rs.getString("houseNumber");
                             cust.postCode = rs.getString("postCode");
                             cust.telephone = rs.getString("telephone");
                             customer.addCustomer(cust);
                        rs.close();
                        /* Load buy list */
                        rs = stmt.executeQuery("SELECT * FROM `Buy`");
                        while (rs.next()) {
                             Buy trans = new Buy();
                             trans.transID = rs.getInt("transID");
                             trans.staffID = rs.getInt("staffID");
                             trans.vehicleID = rs.getInt("vehicleID");
                             trans.customerID = rs.getInt("customerID");
                             trans.date = inputValidation.dateConvert(rs
                                       .getString("date"));
                             trans.isPrivate = inputValidation.stringToBoolean(rs
                                       .getString("isPrivate"));
                             trans.boughtPrice = rs.getDouble("boughtPrice");
                             buy.addBuy(trans);
                        rs.close();
                        /* Load Sell list */
                        rs = stmt.executeQuery("SELECT * FROM `Sell`");
                        while (rs.next()) {
                             Sell trans = new Sell();
                             trans.transID = rs.getInt("transID");
                             trans.staffID = rs.getInt("staffID");
                             trans.vehicleID = rs.getInt("vehicleID");
                             trans.customerID = rs.getInt("customerID");
                             trans.date = inputValidation.dateConvert(rs
                                       .getString("date"));
                             trans.isPrivate = inputValidation.stringToBoolean(rs
                                       .getString("isPrivate"));
                             trans.soldPrice = rs.getDouble("soldPrice");
                             trans.warranty = inputValidation.dateConvert(rs
                                       .getString("Warranty"));
                             trans.isNew = Boolean.parseBoolean(rs.getString("isNew"));
                             sell.addSell(trans);
                        rs.close();
                        /* Load Service list */
                        rs = stmt.executeQuery("SELECT * FROM `Service`");
                        while (rs.next()) {
                             Service serv = new Service();
                             serv.serviceID = rs.getInt("ServiceID");
                             serv.customerID = rs.getInt("CustomerID");
                             serv.vehicleID = rs.getInt("VehicleID");
                             serv.date = inputValidation.dateConvert(rs
                                       .getString("Date"));
                             serv.confirmed = inputValidation.stringToBoolean(rs
                                       .getString("Confirmed"));
                             serv.cost = rs.getDouble("Cost");
                             serv.notes = rs.getString("Notes");
                             services.addService(serv);
                        rs.close();
                        /* Load Staff list */
                        rs = stmt.executeQuery("SELECT * FROM `Staff`");
                        while (rs.next()) {
                             Staff staffMem = new Staff();
                             staffMem.staffID = rs.getInt("staffID");
                             staffMem.password = rs.getString("password");
                             staffMem.staffID = rs.getInt("staffID");
                             staffMem.firstName = rs.getString("firstName");
                             staffMem.lastName = rs.getString("lastName");
                             staffMem.isSenior = inputValidation.stringToBoolean(rs
                                       .getString("isSenior"));
                             staffMem.wage = rs.getDouble("wage");
                             staffMem.houseNumber = rs.getString("houseNumber");
                             staffMem.postCode = rs.getString("postCode");
                             staffMem.telephone = rs.getString("telephone");
                             staff.addStaff(staffMem);
                        rs.close();
                        /* Load Vehicle ID's for FTP download */
                        rs = stmt.executeQuery("SELECT `vehicleID` FROM `Vehicles`");
                        rs.last(); // move to last record so a count can be initiated
                        int id[] = new int[rs.getRow()];
                        rs.first(); // return to first record
                        while (rs.next()) {
                             id[rs.getRow() - 1] = rs.getInt("vehicleID");
                        rs.close();
                        /* Download images to temp directory */
                        Ftp.downloadAll(id);
                        /* Load Vehicles list */
                        rs = stmt.executeQuery("SELECT * FROM `Vehicles`");
                        while (rs.next()) {
                             Vehicle car = new Vehicle();
                             car.vehicleID = rs.getInt("vehicleID");
                             car.make = rs.getString("make");
                             car.model = rs.getString("model");
                             car.engine = rs.getDouble("engine");
                             car.reg = rs.getString("reg");
                             car.yearMade = Integer.parseInt(rs.getString("yearMade"));
                             car.fuel = Integer.parseInt(rs.getString("fuel"));
                             car.mileage = rs.getInt("mileage");
                             car.bodyType = rs.getInt("bodyType");
                             car.isSold = inputValidation.stringToBoolean(rs
                                       .getString("isSold"));
                             car.salePrice = rs.getDouble("price");
                             car.colour = rs.getString("colour");
                             car.comment = rs.getString("comment");
                             if (new File("vehImg/" + car.getVehicleID() + ".jpg")
                                       .exists()) {
                                  car.image = ImageIO.read(new File("vehImg/"
                                            + car.getVehicleID() + ".jpg"));
                             } else {
                                  car.image = null;
                             vehicle.addVehicles(car);
                        rs.close();
                        break;
                   } catch (Exception e) {
                        System.out.println("Exception  : " + e.getMessage());
                        System.out.println("Stack trace: " + e.getStackTrace());
                        System.out.println("Cause      : " + e.getCause());
                        Object[] options = { "Retry", "Exit" };
                        Component frame = null;
                        okFlag = JOptionPane
                                  .showOptionDialog(
                                            frame,
                                            "There has been an error connecting to the database.\n"
                                                      + "Please check that you are connected to the internet",
                                            "Connection Error", JOptionPane.YES_NO_OPTION,
                                            JOptionPane.WARNING_MESSAGE, null, options,
                                            options[0]);
                   } finally {
                        try {
                             if (con != null) {
                                  con.close();
                        } catch (SQLException e) {
                        mainAddNote("DATABASE # All lists loaded!");
                   }

  • MySQL -- JDBC Connection help !!!

    Hi everybody...Well I have MySQL Server and Java, I get the JDBC and tried this:
    import java.sql.*;
    public class JdbcE {
    public static void main(String args[]) {
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "pass");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    And with that code all works fine...but when I change the Host from LOCALHOST to [ROUTER IP] like this:
    con = DriverManager.getConnection("jdbc:mysql://182.185.145.12/test", "user", "pass");
    I got this exception:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know how to solve it...
    I have a 2wire 1700HG router, maybe it would be a problem of the firewall can anyone help me to solve this problem??

    Well I sorry...I am very new in this kind of things...I just know that I have a 2wire 1700HG, I have installed MySQL Server, Java and mysql-connector-java...
    When I try this in the connection statement:
    con = DriverManager.getConnection("jdbc:mysql://localhost/test", "user", "test");
    Everything works fine...but when I try this to connect from a remote PC
    con = DriverManager.getConnection("jdbc:mysql://189.145.185.182/test", "user", "test");
    This error comes out on screen:
    Exception: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection timed out: connect
    STACKTRACE:
    java.net.SocketException: java.net.ConnectException: Connection timed out: conne
    ct
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
    va:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
    :266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JdbcE.main(JdbcE.java:11)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 16 ms ago.
    I don't know what can I do :S please help!! :D

  • MySQL db connection is working but can't launch my appliction

    Hi,
    I am working on a project using JDeveloper 11.2.3.0. I've configured database connection to MySQL DB and I can insert/update data using AppModule Test interface. However, when I try to launch the .jspx page on the Integrated weblogic server, I get below error
    12:28:34 AM] Deploying Application...
      <12-Jun-2013 00:28:35 o'clock BST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1370993314886' for task '0'. Error is: 'weblogic.application.ModuleException: '
      weblogic.application.ModuleException:
      at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:302)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
      at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
      at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
      Truncated. see log file for complete stacktrace
      Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: com.mysql.jdbc.Driver
      at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:301)
      at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:75)
      at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:131)
      at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:712)
      at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:235)
      Truncated. see log file for complete stacktrace
      >
    Please can you direct in which directory I need to place my jdbc connector jar file?
    thanks

    Shay,
    this has partly worked...
    I am not getting the  "Cannot load driver class: com.mysql.jdbc.Driver" error.
    however, now getting this error
    Target URL -- http://localhost:7101/sois-ViewController-context-root/faces/PupilForm.jspx
    <ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg=com/mysql/jdbc/MySQLConnection
    Caused by: java.lang.NoClassDefFoundError: com/mysql/jdbc/MySQLConnection

Maybe you are looking for