Page 1 of 1

javax.servlet.ServletException after install openEMM

Posted: Sat Mar 15, 2008 4:14 am
by kevin861119
hello to everybody, i just install openEMM in my SME server-manager but after i successful install and startup resin, than using browser to access openEMM, an error was show the following message:

javax.servlet.ServletException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555) at com.mysql.jdbc.Connection.(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:81) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)

any suggestion to solve this problem ?? thanks.

Posted: Fri Jun 27, 2008 9:52 pm
by philip
Hi Kevin!

I get similar exceptions. Did You find a solution?

Updating Java doesn't change anything. I looked at the database but user "agnitas" has permission to "openemm".

I'm rather clueless, too.. :-(

Code: Select all

javax.servlet.ServletException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot create PoolableConnectionFactory (Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2555) at com.mysql.jdbc.Connection.(Connection.java:1485) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at 
edit:
@see http://www.openemm.org/forums/ftopic763.html
Did not solve the problem either in my case..


edit2:
Also binding adress to localhost in my.cnf like described in https://sourceforge.net/tracker/index.p ... tid=848488 doesn't work.

Posted: Sat Jun 28, 2008 5:08 pm
by maschoff
OpenEMM can not connect to the database. Is MySQL up and running? Did you create the database "openemm" and load it via "openemm.sql"? (Check with phpMyAdmin if the database looks okay.) Did you install the mysql-python module?

Posted: Sat Jun 28, 2008 5:17 pm
by philip
Yes, MySQL is running, and the database "openemm" exists with content from openemm.sql.

Maybe it's because I upgraded MySQL to version 5.0.45.

python-mysqldb is installed (and sendmail-disable.sh works perfectly).

I tried the newest JDK (6u6) but this didn't change anything.



Btw is it easily possible to downgrade MySQL on Debian again?

Posted: Mon Aug 04, 2008 5:20 am
by jmraz15
i'm also having the same problem :(

anyone know a fix for this?

Problem confirmed

Posted: Wed Oct 22, 2008 4:42 pm
by buggyboy
I have the very same problem. If I cant find a solution I will have to move on and use somthing else. Anyone who has an idea please reply. Thank you

My solution

Posted: Sat Dec 19, 2009 7:03 pm
by churchill
You should create 2 databases and import corresponding sql script:
1. openemm_cms <-- openemm_cms.sql
2. openemm <-- openemm-6.X.sql

Hope it can help you!

Churchill

Posted: Thu Jun 24, 2010 1:45 pm
by hamlylion
Hah))
Edit file /etc/my.cnf
find and commente out line skip-networking (restart mysqld) and openemm is working now

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#.
skip-networking

Re: javax.servlet.ServletException after install openEMM

Posted: Wed May 23, 2012 11:09 am
by philmills
Thanks to hamlylion for pointing me in the right direction - i spent almost an entire day trying to solve this yesterday.

I'm using MySQL Server version: 5.1.62-0ubuntu0.10.04.1
skip-networking is depreciated, so you can't comment it out.
instead you can use:
bind-address = 0.0.0.0
bind-address was set to my lan IP previously

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0

There's a whole bunch of forum posts about being unable to login after install, and I'm sure this would fix the majority of them.

Can this be added to knowledge base or something?

Re: javax.servlet.ServletException after install openEMM

Posted: Fri May 25, 2012 3:57 pm
by maschoff
I think it is not the job of the OpenEMM install guide to teach users how to configure MySQL. But I will add a note that my.cnf might have to be configured if the MySQL instance does not run on the same server as OpenEMM. Thanks for your feedback!