Jump to content
Changes to the Jaspersoft community edition download ×

Install Using War File Distribution for Tomcat !!!


khsam2001

Recommended Posts

hi

i have an exception when i  install the war version in tomcat , i have take stap by step instruction installation in PDF Doc installation guide:

- i have change the password of mysql  root compte and olso MySQL context.xml for Tomcat with the same

the exception is : (Access denied for user 'root'@'localhost' (using password: YES))

here is the stack trace :

11:45:14,125 ERROR JDBCExceptionReporter,Thread-1:78 - Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
11:45:14,140  WARN SettingsFactory,Thread-1:109 - Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:804)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:744)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    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 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:798)
    at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3700)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1203)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2572)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
    ... 45 more
11:45:16,468 ERROR ContextLoader,Thread-1:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateRepositoryService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'schedulingReportDeleteListener' while setting bean property 'repositoryListeners' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulingReportDeleteListener' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportSchedulingService' while setting bean property 'schedulingService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingFacade' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportQuartzScheduler' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulingReportDeleteListener' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportSchedulingService' while setting bean property 'schedulingService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingFacade' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportQuartzScheduler' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingFacade' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportQuartzScheduler' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulingFacade' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportQuartzScheduler' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportQuartzScheduler' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportQuartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'quartzScheduler' while setting bean property 'scheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.JasperServerScheduler': org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)) [see nested exception: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))]]

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

I am getting the same error.

I have downloaded the latest version (jasperserver-3.1-bin.zip).

Although I have changed the username in the context.xml file I am curious why is it still trying to connect with "root" user.

I have also changed the root password to "password", but it  didn't work. I can connect to MySQL using the "root" and also the new "jasperdb" account, even from remote computers.

It is obvious that this is a connection problem, but why the system ignores the username and password set in the "context.xml" file ?

 

Link to comment
Share on other sites

Tomcat does something a little unusual with the handling of the datasource (ie different than say jboss or glassfish).

Under certain conditions, it takes the context.xml from the war file (META-INF/contex.xml) and it copies it to <tomcat>/conf/Catalina/localhost/<appname>.xml (jasperserver.xml). Tomcat does this when it deploys and "unpacks" a war file.

You should delete this xml file because it will get used instead of the one in the war file.

The other thing to watch out for is having a war file *and* an exploded (unpacked) war file. IE:

<tomcat>/webapps/jasperserver.war    (war file)

<tomcat>/webapps/jasperserver            (directory)

You should delete the .war file so that you only have the exloded war file. Then, any change you make to the context.xml inside of the context.xml will get used for certain.

Link to comment
Share on other sites

Hello,

I think, as it is said previouly, that it is a problem of connection to mysql database. In the past, I also got same kind of troubles.

First, you have to verify that you can connect to mysql wiyh your credentials being out of jasperserver, for instance with a :

mysql -u user -p jasperserver

If it's OK then it is certaily due to that TKavanagh was spoking about.As for me, to be sure that context.xml and jasperserver.xml are the same, I stop tomcat, copy context.xml as jasperserver.xml in tomcat and restarts tomcat.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...