IBM Support

Error 404: javax.servlet.UnavailableException running Java web application in CICS TS

Question & Answer


Question

I am trying to run a web application on a Liberty JVM server in my CICS Transaction Server for z/OS (CICS TS) region but I receive the following message(s):

 Error 404: javax.servlet.UnavailableException: 
 SRVE0202E: Servlet [com.ibm.cics.liberty.HelloWorld.Hello]: com.ibm.cics.HelloWorld.Hello
            was found, but is corrupted:
      SRVE0227E: Check that the class resides in the proper package directory. 
      SRVE0228E: Check that the classname has been defined in the server using the proper
                 case and fully qualified package.
      SRVE0229E: Check that the class was transferred to the filesystem using a binary                      transfer mode. 
      SRVE0230E: Check that the class was compiled using the proper case (as defined in the                 class definition). 
      SRVE0231E: Check that the class file was not renamed after it was compiled.

I have tried exporting my CICS Bundle to my zFS again and re-installing the CICS BUNDLE resource definition but I still get this error. What am I doing wrong?

Answer

This Error 404 javax.servlet.UnavailableException indicates that the servlet application was compiled with the wrong version of Java. For example, the servlet was compiled with Java 8 but the Liberty JVM server is running Java 7.1. So you need to check:

  • What version of Java was used to compile the servlet? If you are using the CICS Explorer to create your servlet application, the Explorer comes with its own version of the JRE. However, you can configure the Explorer to use other installed versions of the JRE. You can find the Installed JREs by selecting Window -> Preferences -> Java -> Installed JREs to see what version is being used.

  • What version of Java is the installed JVM server running? In CICS TS, you specify the version of Java to be used by the JVM within the jvmprofile. What is specified in the JAVA_HOME property?

As an example, this error can occur if the HelloWorld servlet was compiled with Java 8 and you are trying to run it on a Liberty JVM server running Java 7.1. . So to resolve this, you would either:

  • If you have a Java 7.1 JRE installed on your PC, add it to the Explorer Installed JREs and select it as the JRE to use for compilation, or

  • If you have a Java 8 JRE on your z/OS LPAR, change the JAVA_HOME parameter in the jvmprofile to point to this Java installation.

Shayla Robinson
IBM CICS and CPSM Level2 Support

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"Liberty","Version":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICSTS CICS TS CICS Transaction Server

Document Information

Modified date:
05 June 2017

UID

dwa1379156