cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create PoolableConnectionFactory Exception

rohit_l
Champ in-the-making
Champ in-the-making
Hello All,

I'm new to Alfresco. I installed installed MySQL separately (v. 5.0.22). Next I downloaded the MySQL JDBC driver jar file (mysql-connector-java-3.1.13.jar) and made it available in my system classpath. To verify if it is working, I wrote a short java program to see if the driver is loaded and confirmed that it works.

Next I downloaded Alfresco bundled with Tomcat (alfresco-tomcat-1.2.1.zip) and installed it. So far so good. My MySQL installation seems to run fine. However, when I run Alfresco, it returns a huge exception trace before finally saying that the server has started. Sure enough, the Tomcat default website is available through http://localhost:8080 , but when I try to access Alfresco, through http://localhost:8080/afresco it says the requested resource "/alfresco" is not available. The exception trace is given below. Help needed badly.

09:48:05,125 ERROR [org.hibernate.util.JDBCExceptionReporter] Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect
   at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
   at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
   at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555)
   at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
   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 org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
   at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
   at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
   at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
1 REPLY 1

rohit_l
Champ in-the-making
Champ in-the-making
Hi All,

This is embarrassing; I dont know how the problem got solved, honestly. I re-installed MySQL and did the configuration for the d/b instance again. The only difference from the original installation was that I configured the port number to the default 3306. The first time I had set it to 3307 because for some reason 3306 was said to be already in use.

So once I had created the 'alfresco' d/b with a user of the same name with all grant privileges (I had run the db_setup.sql) file command wise on the mysql prompt), I ran Alfresco and it started working.

So most probably it was the port number issue, although I can't be sure.

Hope this helps other newcomers like me.

Thanks all,

Rohit Lal