Hi there,
I'm at the point where i can deploy my webapplication to a production
server. But i have a problem with the connection string i use to connect to
the mysql database.
On the test server this is:
======================
<driver project-version="1.1" class="com.mysql.jdbc.Driver">
<url value="jdbc:mysql://p400/proj"/>
<connectionPool min="1" max="1" />
<login userName="________" password="___________"/>
</driver>
======================
On the production server i need to connect to a socket on the local file
system:
======================
<driver project-version="1.1" class="com.mysql.jdbc.Driver">
<url value="jdbc:mysql://localhost:/var/run/mysqld/mysqld.sock/proj"/>
<connectionPool min="1" max="1" />
<login userName="______" password="_________"/>
</driver>
======================
This gives me a:
======================
javax.servlet.ServletException: [v.1.1M7_1 June 15 2004] Global exception.
at
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1M7_1 June 15 2004]
Global exception.
at
org.objectstyle.cayenne.access.util.SelectObserver.nextGlobalException(SelectObserver.java:214)
at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:322)
at
org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:654)
at
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1325)
at
org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:176)
at
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1284)
at
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1499)
Caused by: java.sql.SQLException: Cannot load connection class because of
underlying exception: 'java.lang.NumberFormatException: For input string: "/"'.
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:355)
at
org.objectstyle.cayenne.conn.DriverDataSource.getConnection(DriverDataSource.java:151)
at
org.objectstyle.cayenne.conn.PooledConnectionImpl.reconnect(PooledConnectionImpl.java:126)
at
org.objectstyle.cayenne.conn.PooledConnectionImpl.getConnection(PooledConnectionImpl.java:163)
at
org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:434)
at
org.objectstyle.cayenne.conn.PoolManager.getConnection(PoolManager.java:385)
======================
In PHP i always use:
======================
$db = mysql_pconnect ("localhost:/var/run/mysqld/mysqld.sock", "_______",
"___________");
======================
I can't seem to figure out on how to specify a path to a socket in the
"DataNode.driver.xml". Maybe i'm searching for the wrong thing but google
didn't find the answer too.
Does anybody know a solution to this problem?
Cheers,
Twan Kogels
This archive was generated by hypermail 2.0.0 : Fri Jul 16 2004 - 04:03:37 EDT