Announcement Announcement Module
Collapse
No announcement yet.
Problem using C3PO Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem using C3PO

    Hello,

    I am trying to switch my connection pool from dbcp to c3po and am having some problems connecting to my MySQL database. I have placed below my configuration and the error that I am getting.

    Any ideas on what the problem may be?

    Code:
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
            <property name="driverClass" value="${driver_classname}" />
            <property name="jdbcUrl" value="${openiam.driver_url}" />
            <property name="user" value="${username}" />
            <property name="password" value="${password}"/>
    
            <property name="minPoolSize" value="5"/>
            <property name="maxPoolSize" value="20"/>
            <property name="maxStatements" value="50"/>
            <property name="idleConnectionTestPeriod" value="3000"/>
            <property name="loginTimeout" value="300"/>
    
         </bean>
    ERROR:
    Code:
    2011-05-08 02:56:01,085 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] WARN  BasicResourcePool$AcquireTask : com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@15837e8 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'DEV'
    	at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    	at com.mysql.jdbc.Util.getInstance(Util.java:381)
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:917)

  • #2
    This error may be due to the invalid url specification, post your ${openiam.driver_url} value

    Regards,
    Vijay

    Comment


    • #3
      Judging from the stacktrace, there is no username specified...

      Comment

      Working...
      X