Application is not starting in websphere 8.5.5 but works fine in tomcat

43,117

Solution 1

The error you are receiving says the context /* is already being used by another application. The contexts for your web applications must be unique.

The web.xml you posted has no context-root tag, so it looks like WebSphere is assuming /*. You can do one of the following to correct:

  1. Update your web.xml to include the context-root. You'll probably need to redeploy the application to have this take effect.
  2. Or, Change the context root of your application in WebSphere. This can be done by logging in to the console admin, navigating to Applications > Enterprise Applications > [App Name] > Context Root for Web Modules. The context root can then be specified here.

Solution 2

Finally I can fix the issue.

My application is using google guava library and version of library was 15.0. I found guava library (version:15.0) is not compatible with jee6 (more information). So I changed the version from 15.0 to 14.0.1 then application got deployed correctly.

What I didn't understand is, how can I understand with the following error message what went wrong??? Don't you think it is little difficult to figure it out.

Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp

I am sure this is helpful information.

Solution 3

I was getting same error, so what i did was logged into admin console then went to applications, then to Websphere enterprise application (Here you can find list off all the application deployed). Just Undeploy the default Application (this application is deployed when we install web sphere). Once undeployed, it will work.

Solution 4

Go to IBM Console->Application->Application Types->Websphere Enterprice Application.

Remove all the application other than YOUR APPLICATION.

Websphere automatically creates some sample application and in that application, some are pointed to "./"

Mine problem solved like this.

Share:
43,117
Seeta Ramayya Vadali
Author by

Seeta Ramayya Vadali

Updated on December 27, 2020

Comments

  • Seeta Ramayya Vadali
    Seeta Ramayya Vadali over 3 years

    I have a web application which can be deployed in tomcat but the same application is not starting in websphere 8.5.5. I have checked SystemErr.log file which gives following information, i cannot debug why application is not starting. If I would like to know more about problem what I need to do.

    Application Server Version : Websphere 8.5.5
    Java Version : java version "1.7.0_25"
    OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)

    [12/30/13 12:43:01:144 CET] 000000ab SystemErr     R Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: Context root /* is already bound. Cannot start application My Application
    [12/30/13 12:43:01:149 CET] 000000ab SystemErr     R    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:759)
    [12/30/13 12:43:01:149 CET] 000000ab SystemErr     R    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
    [12/30/13 12:43:01:149 CET] 000000ab SystemErr     R    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
    [12/30/13 12:43:01:149 CET] 000000ab SystemErr     R    ... 93 more
    [12/30/13 12:43:01:149 CET] 000000ab SystemErr     R Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Context root /* is already bound. Cannot start application My Application
    [12/30/13 12:43:01:150 CET] 000000ab SystemErr     R    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:133)
    [12/30/13 12:43:01:150 CET] 000000ab SystemErr     R    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
    [12/30/13 12:43:01:150 CET] 000000ab SystemErr     R    ... 95 more
    

    Here is web.xml file

    <?xml version="1.0" encoding="UTF-8"?><web-app metadata-complete="true" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <display-name>My Application</display-name>
        <servlet>
            <display-name>MyApplication</display-name>
            <servlet-name>app</servlet-name>
            <servlet-class>com.seeta.vadali.MyReceiverServlet</servlet-class>
            <init-param>
                <param-name>uploadDir</param-name>
                <param-value>/tmp</param-value>
            </init-param>
        </servlet>
        <servlet-mapping>
            <servlet-name>app</servlet-name>
            <url-pattern>/any</url-pattern>
        </servlet-mapping>
    </web-app>
    
  • Seeta Ramayya Vadali
    Seeta Ramayya Vadali over 10 years
    When I was deploying web application, in step 4 :Map context roots for Web modules, I have given context root. So I dont think problem is not with context root. But thanks for your input. I am investigating the problem. If I found the solution for sure I'll let you know all
  • Gas
    Gas over 9 years
    It is usually better to change the context root and disable application autostart, as you may use it for troubleshooting in the future. If you are sure you want need it, it is safe to uninstall.
  • Nick H
    Nick H over 7 years
    I have found in my experience, this is typical of IBM software.