Summary
When deploying the JasperServer WAR file to a WebLogic application server, an exception prevents deployment. Note that this problem only occurs when the WAR file is not first expanded before deployment.
Symptom
You may see one of the following exceptions thrown when deploying the JasperServer WAR file to a WebLogic application server:
java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
Target state: deploy failed on Server examplesServer weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'timeout-secs@http://www.bea.com/ns/weblogic/weblogic-web-app"
Resolution
Edit the web.xml file within the WAR file to comment out a property.
- Navigate to <js-install> directory.
- Enter the jasperserver-pro.war archive.
- Edit <js-install>/jasperserver-pro.war/WEB-INF/web.xml.
Locate the following declaration:
<listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener>
Replace it with following:
<!-- <listener> --> <!-- <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> --> <!-- </listener> -->
- Save the web.xml.
- Now deployment from WAR file should succeed.
Alternatively, you can also deploy JasperServer with an expanded WAR file. You would follow the procedures described in Section 8, Installing From the WAR File Distribution for WebLogic with the following exceptions. The following procedures are specific to JasperReports Server v3.7.0.1, WebLogic 10.3.0 and JasperServer Installation Guide Release 3.7 [Version 0310-JSP37-22].
Before starting Section 8.5, expand the WAR file using this command:
jar -xvf jasperserver-pro.war
After that, you can update the files mentioned in Sections 8.5, 8.5.1 and 8.6 directly using a text editor.
For example: hibernate.properties, js.quartz.properties, applicationContext-report-scheduling.xml and weblogic.xml
You do not need to use the xf and uf commands since the WAR file has been expanded.
- Stop WebLogic after Section 8.6. Execute Sections 8.7.1, 8.7.2 and 8.7.3. Restart WebLogic.
Before executing Section 8.8 Deploying JasperServer to WebLogic, check the following checkbox:
Services->JDBC->Data Sources->JasperServerDataBase->Configuration->Connection Pool->Advanced->Test Connections On Reserve
Test the JasperServerDataBase datasource to make sure that it is working:
Services->JDBC->Data Sources->JasperServerDataBase->Monitoring->Testing
Select the server or cluster and click "Test Data Source". You should see the following message:/p>
Test of JasperServerDataBase on server examplesServer was successful
Similarly, you can test the sample datasources such as FoodmartDataBase and SugarcrmDataBase. You can continue to Section 8.8. after the datasources have been tested.
Other Notes
Generally, symptom a) only occurs in JasperServer 3.5.1. You may experience symptom b) in v3.7.0.1 with Weblogic 10.3.0.
Recommended Comments
There are no comments to display.
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