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.
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"
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 v184.108.40.206, 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:
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.
Generally, symptom a) only occurs in JasperServer 3.5.1. You may experience symptom b) in v220.127.116.11 with Weblogic 10.3.0.