ideo Posted January 25, 2013 Share Posted January 25, 2013 Hi,I've installed JasperReports Server from the WAR file distribution jasperreports-server-cp-5.0.0-bin.zip on Ubuntu running Tomcat7 and MySQL 5.5.29.I had to override the instructions of installation (annex A.8.5) about the settings in default-master.properties: # Tomcat app server root dir# appServerDir = C:\Program Files\Apache Software Foundation\Tomcat 7.0appServerDir = /var/lib/tomcat7# if linux package managed tomcat instance, set two properties belowCATALINA_HOME = /usr/share/tomcat7CATALINA_BASE = /var/lib/tomcat7 It seems to be ok. The installation is going well, with OK. The databases are created...I found a directory jasperserver in /var/lib/tomcat7/webapps/jasperserver But I can't start Jasperserver: there is not ctrlscript.sh (nowhere !).I went to Tomcat page (localhost:8080) and to the Manager (localhost:8080/manager).The manager finds jasperserver but when I hit the button "Start" it says (in French) : L'application pour le chemin de contexte /jasperserver n'a pas pu être démarrée (i.e. : Unable to start the application for context path /jasperserver, or something like that).If I go to localhost:8080/jasperserver, I receive an error message HTTP Status 404 (the requested resource is not available). What can I do ? Thanks. Rémi Link to comment Share on other sites More sharing options...
mrcaffeine Posted January 25, 2013 Share Posted January 25, 2013 does the tomcat log file indicate some errors, like db not available? have there ben any errors during the installation? Link to comment Share on other sites More sharing options...
ideo Posted January 26, 2013 Author Share Posted January 26, 2013 [Answer to mrcaffeine:]- No errors during the installation.- /var/log/tomcat7/catalina.[date].log : Jan 26, 2013 7:43:39 AM org.apache.catalina.startup.TaglibUriRule bodyINFO: TLD skipped. URI: http://www.tonbeller.com/jpivot/core is already definedJan 26, 2013 7:43:39 AM org.apache.catalina.startup.TaglibUriRule bodyINFO: TLD skipped. URI: http://www.springframework.org/tags is already definedJan 26, 2013 7:43:39 AM org.apache.catalina.startup.TaglibUriRule bodyINFO: TLD skipped. URI: http://www.springframework.org/tags is already definedJan 26, 2013 7:43:39 AM org.apache.catalina.core.NamingContextListener addResourceWARNING: Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]Jan 26, 2013 7:43:39 AM org.apache.catalina.core.NamingContextListener addResourceWARNING: Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]Jan 26, 2013 7:43:39 AM org.apache.catalina.core.NamingContextListener addResourceWARNING: Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]Jan 26, 2013 7:43:49 AM org.apache.catalina.core.StandardContext startInternalSEVERE: Error listenerStartJan 26, 2013 7:43:49 AM org.apache.catalina.core.StandardContext startInternalSEVERE: Context [/jasperserver] startup failed due to previous errorsJan 26, 2013 7:43:49 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsSEVERE: The web application [/jasperserver] appears to have started a thread named [Thread-8] but has failed to stop it. This is very likely to create a memory leak. - /var/log/tomcat7/localhost.[date].log : a long text full or messages I don't understand Jan 26, 2013 7:43:19 AM org.apache.catalina.core.ApplicationContext log INFO: HTMLManager: list: Listing contexts for virtual host 'localhost' Jan 26, 2013 7:43:24 AM org.apache.catalina.core.ApplicationContext log INFO: HTMLManager: start: Starting web application '/jasperserver' Jan 26, 2013 7:43:39 AM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Jan 26, 2013 7:43:39 AM org.apache.catalina.core.ApplicationContext log INFO: Set web app root system property: 'jasperserver.root' = [/var/lib/tomcat7/webapps/jasperserver/] Jan 26, 2013 7:43:39 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing log4j from [/var/lib/tomcat7/webapps/jasperserver/WEB-INF/log4j.properties] Jan 26, 2013 7:43:39 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jan 26, 2013 7:43:49 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeSource' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'themeCache' while setting bean property 'themeCache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'themeCache' defined in ServletContext resource [/WEB-INF/applicationContext-themes.xml]: Cannot resolve reference to bean 'unsecureRepositoryService' while setting bean property 'repositoryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateRepositoryService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'accessContext' while setting bean property 'accessContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessContext' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'loggingContextProvider' while setting bean property 'loggingContextProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loggingContextProvider' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'loggingEventsService' while setting bean property 'loggingService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loggingEventsService' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'accessService' while setting bean property 'routingMap' with key [TypedStringValue: value [com.jaspersoft.jasperserver.api.logging.access.domain.AccessEvent], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessService' defined in ServletContext resource [/WEB-INF/applicationContext-events-logging.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext-webapp.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory] (It's only the first lines...) I've noticed this line:INFO: Set web app root system property: 'jasperserver.root' = [/var/lib/tomcat7/webapps/jasperserver/]How do I set the "web app root system property" ?And it seems to be a problem with ClassPath...Any idea how to find my way? Thanks, Rémi Link to comment Share on other sites More sharing options...
ideo Posted January 26, 2013 Author Share Posted January 26, 2013 Thanks for your comment. Please see my answer below. Rémi Link to comment Share on other sites More sharing options...
tkavanagh Posted January 28, 2013 Share Posted January 28, 2013 There seems to be something wrong with the tomcat setup.The class not found is a tomcat class: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactoryIt is used for the tomcat's connection pooling. And the jasperserver webapp uses the connection that tomcat provides.Two things to check would be the following: /conf/Catalina/Localhost/jasperserver.xml (take a look inside this file and see if the database credentials and url look good) (you can delete the file above and tomcat will put a fresh in in place) The file above is copied (by tomcat) from this location (this is a kind of dumb tomcat thing) /webapps/jasperserver/META-INF/context.xmlAlso, check: /lib (make sure that you see a JDBC driver in there from postrgresql)Here is a list of jars from my apache-tomcat-6.0.35/libannotations-api.jar catalina-ant.jar catalina-ha.jar catalina.jar catalina-tribes.jar ecj-3.7.jar el-api.jar jasper-el.jar jasper.jar jsp-api.jar postgresql-9.0-801.jdbc4.jar servlet-api.jar tomcat-coyote.jar tomcat-dbcp.jar tomcat-i18n-es.jar tomcat-i18n-fr.jar tomcat-i18n-ja.jarNotice >> tomcat-dbcp.jar <<Needs to be in place. Link to comment Share on other sites More sharing options...
tkavanagh Posted January 28, 2013 Share Posted January 28, 2013 Here is a tomcat bug about missing dbcp jar:https://bugs.launchpad.net/ubuntu/+source/tomcat6/+bug/283852Maybe similar issue? Link to comment Share on other sites More sharing options...
jabraham Posted February 1, 2013 Share Posted February 1, 2013 Same problem. I tried dropping tomcat-dbcp.jar into my lib directory, but it broke another webapp. Apparently tomcat apps are supposed to use commons-dbcp now, not tomcat-dbcp, or that's what I read on the Internets. I'll keep looking, but something is broken. I'm using tomcat 6.0.35 from macports. Link to comment Share on other sites More sharing options...
jabraham Posted February 1, 2013 Share Posted February 1, 2013 I have the same problem using tomcat 6.0.35 on osx (macports tomcat) with PostgreSQL. My other webapps are working. I've "heard" (using google) that tomcat-dbcp.jar is out of date, that tomcat is supposed to use commons-dbcp.jar instead. If I try to copy tomcat-dbcp.jar into the lib directory it breaks my other webapps. Link to comment Share on other sites More sharing options...
ideo Posted February 1, 2013 Author Share Posted February 1, 2013 Thanks a lot, folks!It works! I had only to put tomcat-dbcp.jar into /usr/share/tomcat7/lib/Rémi Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now