java beans or installation problem

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

Axls
Posts: 2
Joined: Tue Sep 05, 2006 9:25 pm

java beans or installation problem

Post by Axls » Tue Sep 05, 2006 9:29 pm

Hi

I finish the installation process without problems but when i try openemm with my browser for the first time it gives me a long message, here the first lines :

Ein Fehler ist aufgetreten
Ursache: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Database setup failed: java.lang.Exception: Error initializing database connection: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION **

Please help

inzion
Posts: 2
Joined: Wed Sep 13, 2006 10:41 am

Post by inzion » Wed Sep 13, 2006 10:46 am

got the same problem, using:
- debian sarge stable
- jdk-1_5_0_08-linux-i586.bin
- mysql Ver 14.12 Distrib 5.0.19

error looks like this:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Database setup failed: java.lang.Exception: Error initializing database connection: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION **
.....

.....
** END NESTED EXCEPTION ** Last packet sent to the server was 9 ms ago.

inzion
Posts: 2
Joined: Wed Sep 13, 2006 10:41 am

Post by inzion » Wed Sep 13, 2006 1:53 pm

i tested it also on a system with following configuration:
- Debian sarge stable
- jdk-1_5_0_08-linux-i586.bin
- mysql Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i386)

the installation was made exactly according to the install pdf (openemm.org/fileadmin/docs/INSTALL.pdf) and the faq under openemm.org/faq/questions/8/How+can+I+install+OpenEMM+on+Debian%3F
..

same result when i try to connect to http://servername.tld:8081 :

Code: Select all

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Database setup failed: java.lang.Exception: Error initializing database connection: com.mysql.jdbc.CommunicationsException: 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 java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.agnitas.backend.DBase.(DBase.java:83) at org.agnitas.backend.Data.setupDatabase(Data.java:299) at org.agnitas.backend.Data.(Data.java:1009) at org.agnitas.backend.RulerImpl.(RulerImpl.java:95) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:52) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:486) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at com.caucho.server.webapp.Application.start(Application.java:1597) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158) at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:652) at com.caucho.server.host.Host.start(Host.java:385) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72) at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509) at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:158) at com.caucho.server.host.HostContainer.start(HostContainer.java:501) at com.caucho.server.resin.ServletServer.start(ServletServer.java:977) at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621) at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56) at com.caucho.server.deploy.DeployController.start(DeployController.java:517) at com.caucho.server.resin.ResinServer.start(ResinServer.java:485) at com.caucho.server.resin.Resin.init(Resin.java) at com.caucho.server.resin.Resin.main(Resin.java:624) ** END NESTED EXCEPTION ** Last packet sent to the server was 9 ms ago.

maschoff
Site Admin
Posts: 2166
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff » Wed Sep 13, 2006 3:28 pm

Maybe the last posting in this thread provides the solution:

http://www.openemm.org/forums/ftopic6.html
OpenEMM Maintainer

Axls
Posts: 2
Joined: Tue Sep 05, 2006 9:25 pm

Post by Axls » Wed Sep 13, 2006 5:19 pm

Hi

Well i already tried that and no change, also i did all the installation from ground and nothing changed.

Using Fedora Core 5 (updated)

marton
Posts: 36
Joined: Wed Aug 09, 2006 2:51 pm

Post by marton » Fri Sep 15, 2006 5:23 pm

had similar problems. try that: 1.) stop openemm, 2.) restart the mysql server 3.) start openemm again. maybe this works...

cheerio, marton

joydev
Posts: 1
Joined: Tue Sep 19, 2006 10:48 am

Post by joydev » Tue Sep 19, 2006 10:52 am

Restarting Mysql did not help....
We are using Mysql-4.0.27, java-1.5,
still the following ERROR............

Ursache: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Database setup failed: java.lang.Exception: Error initializing database connection: java.sql.SQLException: Access denied for user: 'agnitas@aunwesha.virtual.vps-host.net' (Using password: YES)

Thanks..
joydev

kevinloydw
Posts: 3
Joined: Mon Sep 18, 2006 3:45 am

MySQl

Post by kevinloydw » Tue Sep 19, 2006 3:31 pm

You need to give the mysql user authority to log in :) Might be set to login if local system, or localsystem.local domain... Needs to be changed in mysql engine...

KLW

dirkfries
Posts: 4
Joined: Fri Sep 22, 2006 11:34 am

Similar Problem with Java Beans

Post by dirkfries » Fri Sep 22, 2006 11:39 am

Hi folks,

OS : Ubuntu 6.06
Open EM : 5.0.2

after Installation und first try to login i get this error message in /home/openemm/var/log/console_stdout.log :

[14:28:48.082]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext re
source [/WEB-INF/cronContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could
not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException:
Failed reading input file Mailgun.ini: java.io.FileNotFoundException: Mailgun.ini (No such file or directory)
[14:28:48.082]org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor thre
w exception; nested exception is org.agnitas.util.ConfigException: Failed reading input file Mailgun.ini: java.io.FileNotFoundException:
Mailgun.ini (No such file or directory)
[14:28:48.082][ERROR] org.agnitas.util.ConfigException: Failed reading input file Mailgun.ini: java.io.FileNotFoundException: Mailgun.ini
(No such file or directory)

But, I do have this files in /home/openemm/lib/openemm :

-rw-r--r-- 1 openemm openemm 421 2006-09-19 13:53 Mailgun.ini

Does anyone have a clue about that ?

Thanks !

Greetz
Dirk

sfantul
Posts: 40
Joined: Tue Aug 15, 2006 9:34 am

Post by sfantul » Fri Sep 22, 2006 1:21 pm

Verify if the classpath env variabile (echo $CLASSPATH) is set to /home/openemm/lib/openemm
If not set it before stating openemm
Note that u have to be logged on as openemm (su - openemm) when u start openemm otherwise the classpath is not set.
The web app looks for the Mailgun.ini file using the the classpath variabile or a property that can be set when stating resin.
If it still doesnt work with the classpath set properlly post reply and i'll tell u how u can set that property.

dirkfries
Posts: 4
Joined: Fri Sep 22, 2006 11:34 am

Post by dirkfries » Fri Sep 22, 2006 1:33 pm

$CLASSPATH wasn't set at all.

So i set it to the right value.
Check :
echo $CLASSPATH
/home/openemm/lib/openemm/

Afterthat I restarted OpenEMM, but I still get that error message :

[16:28:15.788]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Ruler' defined in ServletContext resource [/WEB-INF/cro
nContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backe
nd.RulerImpl]; constructor threw exception; nested exception is org.agnitas.util.ConfigException: Failed reading input file Mailgun.ini: java.io.FileNotFound
Exception: Mailgun.ini (No such file or directory)
[16:28:15.788]org.springframework.beans.FatalBeanException: Could not instantiate class [org.agnitas.backend.RulerImpl]; constructor threw exception; nested
exception is org.agnitas.util.ConfigException: Failed reading input file Mailgun.ini: java.io.FileNotFoundException: Mailgun.ini (No such file or directory)
[16:28:15.788][ERROR] org.agnitas.util.ConfigException: Failed reading input file Mailgun.ini: java.io.FileNotFoundException: Mailgun.ini (No such file or di
rectory


:~(

Greetz Dirk

sfantul
Posts: 40
Joined: Tue Aug 15, 2006 9:34 am

Post by sfantul » Fri Sep 22, 2006 1:53 pm

edit wrapper.pl in bin folder search for $EXTRA_JAVA_ARGS and add this line after the other 2 that u will find:
$EXTRA_JAVA_ARGS.=" -Dorg.agnitas.backend.ini_filename=/home/openemm/lib/openemm/Mailgun.ini";
This is not an elegant solution but at least we find out if it works.
After u do this, save and then restart openemm.

dirkfries
Posts: 4
Joined: Fri Sep 22, 2006 11:34 am

Post by dirkfries » Fri Sep 22, 2006 2:19 pm

HI @all,

after the new changes and a complete reboot I get this error message as soon as I try to open the page in my browser.
To be honest - I absolutely have to clue what this means :-(

Greetz Dirk

[17:11:05.798]WebApp[http://localhost:8081]" stopping
[17:11:05.799]Closing Spring root WebApplicationContext
[17:11:06.269]WebApp[http://localhost:8081] starting
[17:11:06.473]Loading Spring root WebApplicationContext
Starting up
DB-Exec: SHOW TABLES
[17:11:14.143]action: init
[17:11:14.599]javax.servlet.UnavailableException
[17:11:14.599] at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
[17:11:14.599] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
[17:11:14.599] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
[17:11:14.599] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
[17:11:14.599] at com.caucho.server.webapp.Application.start(Application.java:1604)
[17:11:14.599] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[17:11:14.599] at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
[17:11:14.599] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:125)
[17:11:14.599] at com.caucho.server.deploy.DeployController.request(DeployController.java:554)
[17:11:14.599] at com.caucho.server.webapp.ApplicationContainer.getApplication(ApplicationContainer.java:867)
[17:11:14.599] at com.caucho.server.webapp.ApplicationContainer.buildInvocation(ApplicationContainer.java:707)
[17:11:14.599] at com.caucho.server.host.Host.buildInvocation(Host.java:424)
[17:11:14.599] at com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:350)
[17:11:14.599] at com.caucho.server.resin.ServletServer.buildInvocation(ServletServer.java:616)
[17:11:14.599] at com.caucho.server.dispatch.DispatchServer.buildInvocation(DispatchServer.java:198)
[17:11:14.599] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
[17:11:14.599] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
[17:11:14.599] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
[17:11:14.599] at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
[17:11:14.599] at java.lang.Thread.run(Thread.java:595)
[17:11:14.610]javax.servlet.UnavailableException
[17:11:14.610] at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
[17:11:14.610] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
[17:11:14.610] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
[17:11:14.610] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
[17:11:14.610] at com.caucho.server.webapp.Application.start(Application.java:1604)
[17:11:14.610] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[17:11:14.610] at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
[17:11:14.610] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:125)
[17:11:14.610] at com.caucho.server.deploy.DeployController.request(DeployController.java:554)
[17:11:14.610] at com.caucho.server.webapp.ApplicationContainer.getApplication(ApplicationContainer.java:867)
[17:11:14.610] at com.caucho.server.webapp.ApplicationContainer.buildInvocation(ApplicationContainer.java:707)
[17:11:14.610] at com.caucho.server.host.Host.buildInvocation(Host.java:424)
[17:11:14.610] at com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:350)
[17:11:14.610] at com.caucho.server.resin.ServletServer.buildInvocation(ServletServer.java:616)
[17:11:14.610] at com.caucho.server.dispatch.DispatchServer.buildInvocation(DispatchServer.java:198)
[17:11:14.610] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
[17:11:14.610] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
[17:11:14.610] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
[17:11:14.610] at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
[17:11:14.610] at java.lang.Thread.run(Thread.java:595)




[17:11:05.798]WebApp[http://localhost:8081] stopping
[17:11:05.799]Closing Spring root WebApplicationContext
[17:11:06.269]WebApp[http://localhost:8081] starting
[17:11:06.473]Loading Spring root WebApplicationContext
Starting up
DB-Exec: SHOW TABLES
[17:11:14.143]action: init
[17:11:14.599]javax.servlet.UnavailableException
[17:11:14.599] at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
[17:11:14.599] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
[17:11:14.599] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
[17:11:14.599] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
[17:11:14.599] at com.caucho.server.webapp.Application.start(Application.java:1604)
[17:11:14.599] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[17:11:14.599] at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
[17:11:14.599] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:125)
[17:11:14.599] at com.caucho.server.deploy.DeployController.request(DeployController.java:554)
[17:11:14.599] at com.caucho.server.webapp.ApplicationContainer.getApplication(ApplicationContainer.java:867)
[17:11:14.599] at com.caucho.server.webapp.ApplicationContainer.buildInvocation(ApplicationContainer.java:707)
[17:11:14.599] at com.caucho.server.host.Host.buildInvocation(Host.java:424)
[17:11:14.599] at com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:350)
[17:11:14.599] at com.caucho.server.resin.ServletServer.buildInvocation(ServletServer.java:616)
[17:11:14.599] at com.caucho.server.dispatch.DispatchServer.buildInvocation(DispatchServer.java:198)
[17:11:14.599] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
[17:11:14.599] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
[17:11:14.599] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
[17:11:14.599] at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
[17:11:14.599] at java.lang.Thread.run(Thread.java:595)
[17:11:14.610]javax.servlet.UnavailableException
[17:11:14.610] at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368)
[17:11:14.610] at javax.servlet.GenericServlet.init(GenericServlet.java:69)
[17:11:14.610] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:600)
[17:11:14.610] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:154)
[17:11:14.610] at com.caucho.server.webapp.Application.start(Application.java:1604)
[17:11:14.610] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[17:11:14.610] at com.caucho.server.deploy.DeployController.restartImpl(DeployController.java:584)
[17:11:14.610] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.request(StartAutoRedeployAutoStrategy.java:125)
[17:11:14.610] at com.caucho.server.deploy.DeployController.request(DeployController.java:554)
[17:11:14.610] at com.caucho.server.webapp.ApplicationContainer.getApplication(ApplicationContainer.java:867)
[17:11:14.610] at com.caucho.server.webapp.ApplicationContainer.buildInvocation(ApplicationContainer.java:707)
[17:11:14.610] at com.caucho.server.host.Host.buildInvocation(Host.java:424)
[17:11:14.610] at com.caucho.server.host.HostContainer.buildInvocation(HostContainer.java:350)
[17:11:14.610] at com.caucho.server.resin.ServletServer.buildInvocation(ServletServer.java:616)
[17:11:14.610] at com.caucho.server.dispatch.DispatchServer.buildInvocation(DispatchServer.java:198)
[17:11:14.610] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
[17:11:14.610] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
[17:11:14.610] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
[17:11:14.610] at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
[17:11:14.610] at java.lang.Thread.run(Thread.java:595)

Post Reply