Topic
  • 8 replies
  • Latest Post - ‏2012-07-27T14:32:32Z by SystemAdmin
SystemAdmin
SystemAdmin
590 Posts

Pinned topic If Context Root is changes, application is not available on Server

‏2012-07-20T08:38:48Z |
Steps to reproduce:

Windows 7, 64 bits

WDT 8.5 installed from Eclipse Marketplace on Eclipse for Java EE 3.7 SR2 with IBM Java 7 SR1, 64 bits.

WAS for developers 8.5 configured to run with Resources in the Workspace and Minimize Application Files copied to Server

Create a Web project level 3.0

Add a Servlet

Right click on the project and choose: Properties > Web project Settings> Context Root
and change the default context root name to something else than the Project Name

Right click on the Servlet > Run on Server

The browser opens on the new context root:
http://localhost:9080/MyContextRoot/Servlet1
An error 404 is shown.

If running the Server with Resources on Server, publishing is fine.
  • SystemAdmin
    SystemAdmin
    590 Posts

    WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-20T08:55:23Z  
    I verified that it is not needed to switch to Publish with resources on Server, it is enough to de-select:

    Minimize application files copied to Server

    while maintaining Publish with Resources in the workspace selected. This has the advantage of maintaining most of the performance gain of publishing with Resources in the Workspace.
  • OrlandoRincon
    OrlandoRincon
    4 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-23T15:46:56Z  
    I verified that it is not needed to switch to Publish with resources on Server, it is enough to de-select:

    Minimize application files copied to Server

    while maintaining Publish with Resources in the workspace selected. This has the advantage of maintaining most of the performance gain of publishing with Resources in the Workspace.
    Hello Lara:

    When you do Run As -> Run On Server, which server do you choose to run the application?

    Regards
    Orlando
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-23T15:56:23Z  
    Hello Lara:

    When you do Run As -> Run On Server, which server do you choose to run the application?

    Regards
    Orlando
    Hello Orlando,

    This was tested with WAS for Developers 8.5.

    Thank you and regards, Lara
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-23T17:07:13Z  
    Hello Orlando,

    This was tested with WAS for Developers 8.5.

    Thank you and regards, Lara
    Hi Lara,

    Are you using the WAS v8.5 full profile or the Liberty profile? I tested with Liberty profile and it worked for me.

    If you use the Liberty profile, can you open the server configuration editor by double click the Server Configuration node in the Servers view? Go to the source tab and check if you have a line in the server.xml that is similar to the below?

    <application context-root="DifferentContextRoot" id="MyWeb" location="MyWeb.war" name="MyWeb" type="war"/>

    Thanks,

    Jason
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-24T07:41:49Z  
    Hi Lara,

    Are you using the WAS v8.5 full profile or the Liberty profile? I tested with Liberty profile and it worked for me.

    If you use the Liberty profile, can you open the server configuration editor by double click the Server Configuration node in the Servers view? Go to the source tab and check if you have a line in the server.xml that is similar to the below?

    <application context-root="DifferentContextRoot" id="MyWeb" location="MyWeb.war" name="MyWeb" type="war"/>

    Thanks,

    Jason
    Hello Jason, Orlando,

    This was tested with WAS 8.5 for Developers full profile, not with the Liberty profile.

    I have tested it again in another environment with:

    WAS 8.5 full profile (not "for developers").
    WDT 8.5 installed with IM.

    This time I could access the servlet at the modified Context Root,
    http://localhost:9086/MyContextRoot/Servlet1
    when publishing with "Resources in the Workspace" and "Minimize Application Files copied to server".

    I will return to my original environment with WDT 8.5 on Eclipse 3.7.2 and provide you with logs of the failure.

    Thank you, Lara
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-24T08:53:39Z  
    Hello Jason, Orlando,

    This was tested with WAS 8.5 for Developers full profile, not with the Liberty profile.

    I have tested it again in another environment with:

    WAS 8.5 full profile (not "for developers").
    WDT 8.5 installed with IM.

    This time I could access the servlet at the modified Context Root,
    http://localhost:9086/MyContextRoot/Servlet1
    when publishing with "Resources in the Workspace" and "Minimize Application Files copied to server".

    I will return to my original environment with WDT 8.5 on Eclipse 3.7.2 and provide you with logs of the failure.

    Thank you, Lara
    Since I see these errors in the .log:

    Caused by: java.lang.ClassNotFoundException: org.eclipse.jpt.common.utility.internal.StatefulCommandExecutor
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:658)

    I think that my installation is affected by the issue reported in:

    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14867601

    I will reinstall WDT from the downloaded zip instead of the Marketplace and try again.
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-25T10:48:17Z  
    Since I see these errors in the .log:

    Caused by: java.lang.ClassNotFoundException: org.eclipse.jpt.common.utility.internal.StatefulCommandExecutor
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:658)

    I think that my installation is affected by the issue reported in:

    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14867601

    I will reinstall WDT from the downloaded zip instead of the Marketplace and try again.
    I can confirm that after installing WDT 8.5 on Eclipse for Java EE 3.7.2 from the zip download:

    http://publib.boulder.ibm.com/infocenter/radhelp/v8r5/index.jsp?topic=%2Fcom.ibm.rad.install.doc%2Ftopics%2Ft_install_wdt_eclipse.html

    this problem no longer occurs.
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: WDT: If Context Root is changed, application is not available on Server

    ‏2012-07-27T14:32:32Z  
    I can confirm that after installing WDT 8.5 on Eclipse for Java EE 3.7.2 from the zip download:

    http://publib.boulder.ibm.com/infocenter/radhelp/v8r5/index.jsp?topic=%2Fcom.ibm.rad.install.doc%2Ftopics%2Ft_install_wdt_eclipse.html

    this problem no longer occurs.
    Good to hear that your problem is resolved. Thanks for reporting your problems.