cau2germany
11-17-2010, 04:41 AM
[Resolved]
Hi,
I tried to run the DatabaseWithJDBC example.
I already install server Extensions via Electroserver Admin tool.
I configured the extension.xml to:
=================================
<!-- Create an array of EsObjects. One object represents a connection pool. -->
<Variable name="pools" type="EsObject">
<Entry>
<Variable name="poolname" type="string">mysqlpool</Variable>
<Variable name="url" type="string">jdbc:mysql://localhost:3306/esserver</Variable>
<Variable name="user" type="string">myusername</Variable>
<Variable name="password" type="string">mypass</Variable>
<Variable name="timeout" type="integer">2000</Variable>
<Variable name="maxpool" type="integer">20</Variable>
<Variable name="maxconn" type="integer">98</Variable>
<Variable name="expiry" type="integer">5</Variable>
</Entry>
</Variable>
=================================
But when I start the server. Error occurred. Please help me.
It told that my connection string is lack of username and password but I already put them in the extenstion.xml.
This is the error:
水 11 17 01:40:02.892 +0900 2010: Registered JDBC driver com.mysql.jdbc.Driver
水 11 17 01:40:02.892 +0900 2010: Registered JDBC driver org.apache.derby.jdbc.ClientDriver
水 11 17 01:40:02.908 +0900 2010: Invalid dateformat string specified: null
水 11 17 01:40:02.908 +0900 2010: Initialized pool mysqlpool (pool=20,max=98,expiry=5000ms)
2010/11/17 13:40:02 JST: mysqlpool: Getting connection (user/pass): jdbc:mysql://localhost:3306/esserver
2010/11/17 13:40:03 JST: mysqlpool: Failed to connect with standard authentication...trying with just JDBC URL
2010/11/17 13:40:03 JST: mysqlpool: Getting connection (URL only): jdbc:mysql://localhost:3306/esserver
2010/11/17 13:40:03 JST: mysqlpool: Can't create a new connection for jdbc:mysql://localhost:3306/esserver
com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio n: Access denied for user ''@'localhost' to database 'esserver'
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2870)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:812)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java: 3269)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:11 82)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2670)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at snaq.db.ConnectionPool.create(ConnectionPool.java: 102)
at snaq.util.ObjectPool.checkOut(ObjectPool.java:178)
at snaq.util.ObjectPool.checkOut(ObjectPool.java:229)
at snaq.db.ConnectionPool.getConnection(ConnectionPoo l.java:234)
at snaq.db.ConnectionPoolManager.getConnection(Connec tionPoolManager.java:591)
at com.electrotank.electroserver5.examples.database.C onnectionPool.acquireObject(ConnectionPool.java:10 7)
at com.electrotank.electroserver5.entities.Extension. acquireObject(Extension.java:343)
at com.electrotank.electroserver5.extensions.api.Elec troServerApiImpl.acquireManagedObject(ElectroServe rApiImpl.java:986)
at com.electrotank.electroserver5.examples.database.D atabaseJDBCPlugin.doQuery(DatabaseJDBCPlugin.java: 52)
at com.electrotank.electroserver5.examples.database.T estDatabasePlugin.testQuery(TestDatabasePlugin.jav a:58)
at com.electrotank.electroserver5.examples.database.T estDatabasePlugin.init(TestDatabasePlugin.java:32)
at com.electrotank.electroserver5.entities.PluginBrid ge$1.call(PluginBridge.java:104)
at com.electrotank.electroserver5.entities.BaseBridge .withLockAndClassloader(BaseBridge.java:192)
at com.electrotank.electroserver5.entities.PluginBrid ge.withLockAndClassloader(PluginBridge.java:283)
at com.electrotank.electroserver5.entities.PluginBrid ge.initializePlugin(PluginBridge.java:102)
at
Hi,
I tried to run the DatabaseWithJDBC example.
I already install server Extensions via Electroserver Admin tool.
I configured the extension.xml to:
=================================
<!-- Create an array of EsObjects. One object represents a connection pool. -->
<Variable name="pools" type="EsObject">
<Entry>
<Variable name="poolname" type="string">mysqlpool</Variable>
<Variable name="url" type="string">jdbc:mysql://localhost:3306/esserver</Variable>
<Variable name="user" type="string">myusername</Variable>
<Variable name="password" type="string">mypass</Variable>
<Variable name="timeout" type="integer">2000</Variable>
<Variable name="maxpool" type="integer">20</Variable>
<Variable name="maxconn" type="integer">98</Variable>
<Variable name="expiry" type="integer">5</Variable>
</Entry>
</Variable>
=================================
But when I start the server. Error occurred. Please help me.
It told that my connection string is lack of username and password but I already put them in the extenstion.xml.
This is the error:
水 11 17 01:40:02.892 +0900 2010: Registered JDBC driver com.mysql.jdbc.Driver
水 11 17 01:40:02.892 +0900 2010: Registered JDBC driver org.apache.derby.jdbc.ClientDriver
水 11 17 01:40:02.908 +0900 2010: Invalid dateformat string specified: null
水 11 17 01:40:02.908 +0900 2010: Initialized pool mysqlpool (pool=20,max=98,expiry=5000ms)
2010/11/17 13:40:02 JST: mysqlpool: Getting connection (user/pass): jdbc:mysql://localhost:3306/esserver
2010/11/17 13:40:03 JST: mysqlpool: Failed to connect with standard authentication...trying with just JDBC URL
2010/11/17 13:40:03 JST: mysqlpool: Getting connection (URL only): jdbc:mysql://localhost:3306/esserver
2010/11/17 13:40:03 JST: mysqlpool: Can't create a new connection for jdbc:mysql://localhost:3306/esserver
com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio n: Access denied for user ''@'localhost' to database 'esserver'
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:2870)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:812)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java: 3269)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:11 82)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2670)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at snaq.db.ConnectionPool.create(ConnectionPool.java: 102)
at snaq.util.ObjectPool.checkOut(ObjectPool.java:178)
at snaq.util.ObjectPool.checkOut(ObjectPool.java:229)
at snaq.db.ConnectionPool.getConnection(ConnectionPoo l.java:234)
at snaq.db.ConnectionPoolManager.getConnection(Connec tionPoolManager.java:591)
at com.electrotank.electroserver5.examples.database.C onnectionPool.acquireObject(ConnectionPool.java:10 7)
at com.electrotank.electroserver5.entities.Extension. acquireObject(Extension.java:343)
at com.electrotank.electroserver5.extensions.api.Elec troServerApiImpl.acquireManagedObject(ElectroServe rApiImpl.java:986)
at com.electrotank.electroserver5.examples.database.D atabaseJDBCPlugin.doQuery(DatabaseJDBCPlugin.java: 52)
at com.electrotank.electroserver5.examples.database.T estDatabasePlugin.testQuery(TestDatabasePlugin.jav a:58)
at com.electrotank.electroserver5.examples.database.T estDatabasePlugin.init(TestDatabasePlugin.java:32)
at com.electrotank.electroserver5.entities.PluginBrid ge$1.call(PluginBridge.java:104)
at com.electrotank.electroserver5.entities.BaseBridge .withLockAndClassloader(BaseBridge.java:192)
at com.electrotank.electroserver5.entities.PluginBrid ge.withLockAndClassloader(PluginBridge.java:283)
at com.electrotank.electroserver5.entities.PluginBrid ge.initializePlugin(PluginBridge.java:102)
at