IllegalStateException While Deploying WAR File to WebLogic

Table of Contents 


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:

  1. java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded
  2. Target state: deploy failed on Server examplesServer
    weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-complex-type.2.4a: Expected elements 'timeout-secs@"


Edit the web.xml file within the WAR file to comment out a property.

  1. Navigate to <js-install> directory.
  2. Enter the jasperserver-pro.war archive.
  3. Edit <js-install>/jasperserver-pro.war/WEB-INF/web.xml.
  4. Locate the following declaration:

  5. Replace it with following:

    <!-- <listener> -->
    <!--     <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> -->
    <!-- </listener> -->
  6. Save the web.xml.
  7. 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].

  1. 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:,, 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.

  2. Stop WebLogic after Section 8.6. Execute Sections 8.7.1, 8.7.2 and 8.7.3. Restart WebLogic.
  3. 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
  4. 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.