Can't get jasperserver inside tomcat container

0
I have deployed jasperserver 2.1 via the unpack war method. I believe I have folled the install instructions to a tee. Postgres is my db.

in <tomcat-home>/webapps/jasperserver/WEB-INF/logs/jasperserver.log, I get three errors (tomcat runs but the jasperservice does not)
1) 23:31:37,043 ERROR ContextLoader,main:205 - Context initialization failed
2) 23:31:37,118 ERROR [/jasperserver],main:? - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
3)
23:31:37,159 ERROR [/jasperserver],main:? - Exception sending context initialized event to listener instance of class com.jaspersoft.jasperserver.war.util.SpringBeanServletContextPlublisher

each of these three errors is followed by
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: method org.objectweb.asm.ClassVisitor.visit with signature (IILjava.lang.String;Ljava.lang.String;[Ljava.lang.String;Ljava.lang.String;)V was not found.
Caused by:
java.lang.NoSuchMethodError: method org.objectweb.asm.ClassVisitor.visit with signature (IILjava.lang.String;Ljava.lang.String;[Ljava.lang.String;Ljava.lang.String;)V was not found.
at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)

Can anyone help me fix this?
sdoliov's picture
Joined: Feb 4 2008 - 3:56pm
Last seen: 11 years 9 months ago

6 Answers:

0
Have managed to help myself and thought it's worth documenting:

I didn't follow instructions to a tee, I was using GNU jvm and it was not properly handling certain reflection classes.

I downloaded the sun 1.6 jvm and built from source and deployed and all was well (after ensuring that tomcat's reference to JAVA_HOME in fact pointed to the sun jvm)

One last note to those who wish to build from source and use Postgres rather than mysql and if you already have the postgresql jdbc jar installed:
There are three pom.xml files where you need to comment out references to <repository.database.driver.groupId>
these files are:
<jasperserver-src>/jasperserver/jasperserver-unit-test/pom.xml
<jasperserver-src>/jasperserver/jasperserver-export-package/pom.xml
<jasperserver-src>/jasperserver/jasperserver-repository-hibernate/build-db/pom.xml

as well as commenting out those sections in the settings.xml file in your $HOME/.m2 directory.
sdoliov's picture
Joined: Feb 4 2008 - 3:56pm
Last seen: 11 years 9 months ago
0
I would not comment out the groupId as you have suggested. You should load up the appropriate JDBC driver into your local Maven repository and using the settings in the settings.xml to point to that driver should be fine.


Sherman
JasperSoft
swood's picture
2487
Joined: Jun 21 2006 - 12:48pm
Last seen: 7 years 1 month ago
1

I am receiving the following error:
 

Code:
12:06:10,946 ERROR [/jasperserver],main:3767 - Exception sending context initialized event to listener instance of class com.jaspersoft.jasperserver.war.util.SpringBeanServl$org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'configurationBean' is defined


I am using Tomcat 5.5 and my JAVA_HOME is pointing to /usr/lib/jvm/java-6-sun-1.6.0.00

Where is this bean supposed to be?

Thanks,
Frustrated Java newbie

jeffv's picture
23
Joined: Feb 17 2008 - 5:25am
Last seen: 11 years 9 months ago
0
These "bean" errors are often the result of a lower level error when the Spring configuration files (jasperserver/WEB-INF/ApplicationContext*.xml) are being initialized.

Can you attach the whole startup log. I find that the most common runtime startup error is the database configuration. There is a bad password or hostname, etc.

Check your jasperserver/META-INF/context.xml (standard location for WAR files to put the database configuration).

Also, if you are using Tomcat or JBoss, the Install Guide troubleshooting section has some info and steps to try on the app server config issues.
tkavanagh's picture
3373
Joined: Jul 7 2006 - 8:54am
Last seen: 5 years 2 months ago
0
I made changes to /WEB-INF/web.xml to the contextConfigLocation:

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/applicationContext*.xml</param-value>
</context-param


I now receive the following errors related to Quartz. I am using Postgres. I made all the changes to the js.quartz and hibernate properties files as outlined in the JasperServer WAR install guide. My postgresql-8.2-508.jdbc3.jar is in the common/lib folder.

------------------------------------------------------

Apr 2, 2008 10:02:30 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 2, 2008 10:02:30 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 552 ms
Apr 2, 2008 10:02:30 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 2, 2008 10:02:30 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Apr 2, 2008 10:02:30 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 2, 2008 10:02:30 AM org.apache.catalina.startup.ContextConfig init
FINE: ContextConfig: Initializing
{Removed other web app start up entries
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig init
FINE: ContextConfig: Initializing
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig processContextConfig
FINE: Processing context [/jasperserver] configuration file /var/lib/tomcat5.5 conf/context.xml
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig processContextConfig
FINE: Successfully processed context [/jasperserver] configuration file /var/lib/tomcat5.5 conf/context.xml
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig processContextConfig
FINE: Processing context [/jasperserver] configuration file /var/lib/tomcat5.5/conf Catalina/localhost/context.xml.default
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig processContextConfig
FINE: Processing context [/jasperserver] configuration file /var/lib/tomcat5.5/conf/Catalina/localhost/jasperserver.xml null
Apr 2, 2008 10:02:31 AM org.apache.catalina.startup.ContextConfig processContextConfig
FINE: Successfully processed context [/jasperserver] configuration file /var/lib/tomcat5.5/conf/Catalina/localhost/jasperserver.xml null
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig start
FINE: ContextConfig: Processing START
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig processDefaultWebConfig
FINE: Processing context [/jasperserver] web configuration resource file:///var/lib/tomcat5.5/conf/web.xml
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
FINE: Parsing application web.xml file at jndi:/localhost/jasperserver/WEB-INF/web.xml
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig start
FINE: Pipeline Configuration:
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig start
FINE: org.apache.catalina.core.StandardContextValve/1.0
Apr 2, 2008 10:02:32 AM org.apache.catalina.startup.ContextConfig start
FINE: ======================
10:02:33,859 WARN Environment,main:540 - could not copy system properties, system properties will be ignored
10:02:37,379 ERROR ContextLoader,main:205 - Context initialization failed
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.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ERROR: permission denied for relation qrtz_locks [See nested exception: org.postgresql.util.PSQLException: ERROR: permission denied for relation qrtz_locks]]
Caused by:
org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ERROR: permission denied for relation qrtz_locks [See nested exception: org.postgresql.util.PSQLException: ERROR: permission denied for relation qrtz_locks]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:493)
at…

…Similar quartz errors reoccur.
------------------------------------------------------
Post edited by: jeffv, at: 2008/04/02 16:14
jeffv's picture
23
Joined: Feb 17 2008 - 5:25am
Last seen: 11 years 9 months ago
0

Here's the 'quartzScheduler' bean from the applicationContext-report-scheduling.xml file:

Code:
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" destroy-method="destroy" id="quartzScheduler" lazy-init="false">
    <property name="dataSource" ref="dataSource"></property>
    <property name="transactionManager" ref="transactionManager"></property>
    <property name="configLocation" value="/WEB-INF/js.quartz.properties"></property>
    <property name="waitForJobsToCompleteOnShutdown" value="false"></property>
    <property name="autoStartup" value="false"></property>
    <property name="applicationContextSchedulerContextKey" value="applicationContext"></property>
    <property name="schedulerContextAsMap"><map>
            <entry key="jobPersistenceService" value-ref="reportJobsPersistenceService"></entry>
            <entry key="engineService" value-ref="engineService"></entry>
            <entry key="virtualizerFactory" value-ref="fileVirtualizerFactory"></entry>
            <entry key="repositoryService" value-ref="repositoryService"></entry>
            <entry key="mailSender" value-ref="reportSchedulerMailSender"></entry>
            <entry key="mailFromAddress" value="${report.scheduler.mail.sender.from}"></entry>
            <entry key="loggingService" value-ref="loggingService"></entry>
            <entry key="securityContextProvider" value-ref="securityContextProvider"></entry>
            <entry key="hyperlinkProducerFactory">
                <bean class="net.sf.jasperreports.engine.export.JRHyperlinkProducerMapFactory">
                    <property name="producersMap"><map>
                            <entry key="ReportExecution" value-ref="schedulerReportExecutionHyperlinkProducer"></entry></map>
                    </property>
                </bean>
            </entry>
            <entry key="encodingProvider" value-ref="encodingProvider"></entry>
            <entry key="exportParametersMap" value-ref="jobExportParametersMap"></entry></map>
    </property>
</bean>
 
jeffv's picture
23
Joined: Feb 17 2008 - 5:25am
Last seen: 11 years 9 months ago
Feedback
randomness