It's all about the answers!

Ask a question

HelloJazzWebUI Tutorial 404 Error


Bevan Li (624) | asked Jun 26 '14, 7:32 p.m.
edited Jun 27 '14, 12:43 p.m.
Hello,

I've been following the tutorial for developing a Jazz WebUI given here: https://jazz.net/wiki/bin/view/WebUIBook/HelloJazzWebUI

However, when I actually access the page at http://localhost:9080/example/HelloWorld I get a 404 error with:

Problem accessing /example/HelloWorld. Reason:

    ProxyServlet: /example/HelloWorld
	
	
	


Powered by Jetty://


I setup the environment I'm using originally following the instructions from the RTC Extensions tutorial given here: https://jazz.net/library/article/1000

I've since tried a variety of different Eclipse versions and machines. I've done this with the downloadable attached code as well as writing it myself from scratch. The plug-ins I'm using are grabbed from the RTC-SDK download at the bottom of the page here: https://jazz.net/downloads/rational-team-concert/releases/4.0?p=allDownloads 

Here is what my Console shows as well:

osgi> 16:18:15,120 [Start Level Event Dispatcher]  INFO com.ibm.team.server.embedded.jetty.Activator       - JSP Support is available
2014-06-26 16:18:15.146:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
16:18:15,152 [Start Level Event Dispatcher]  INFO com.ibm.team.server.embedded.jetty.Activator       - Adding WebApp for contextRoot = /example path = C:\JazzWebUI\WS4\com.example.embedded.webapp\WebContent
16:18:15,171 [Start Level Event Dispatcher]  INFO com.ibm.team.server.embedded.jetty.Activator       - Server starting
2014-06-26 16:18:15.171:INFO::jetty-6.1.x
2014-06-26 16:18:15.244:INFO::Started SocketConnector@0.0.0.0:9080
2014-06-26 16:18:15.361:INFO::Started SslSocketConnector@0.0.0.0:9443
16:18:15,361 [Start Level Event Dispatcher]  INFO com.ibm.team.server.embedded.jetty.Activator       - Server started

Any ideas of what is going wrong and how I can get my page to display?


Comments
Bevan Li commented Jun 27 '14, 2:57 p.m.

Adding TRACE to the log gives me 3 additional lines of info in the console:


11:52:33,626 [Start Level Event Dispatcher] DEBUG com.ibm.team.repository.jndi.internal.Activator    - Unable to load [org.eclipse.equinox.servletbridge.BridgeServlet] from system bundle. Must be running in embedded environment
11:52:33,631 [Start Level Event Dispatcher] DEBUG com.ibm.team.repository.jndi.internal.Activator    - Using JNDI Impl from OSGI Framework
11:52:33,632 [Start Level Event Dispatcher] DEBUG com.ibm.team.server.embedded.jetty.Activator       - jndiService added

Also, after putting an XML editor into Eclipse I noticed the warning:
org.eclipse.equinox.http.servlet.HttpServiceServlet cannot be resolved to a type

Still working on a solution.


Bevan Li commented Jun 27 '14, 8:12 p.m.

 Well I'm pretty sure I found the problem but no solution.

The servlet class org.eclipse.equinox.http.servlet.HttpServiceServlet doesn't exist. I can't find any version of it anywhere. Currently I'm seeing if there is some replacement package I can just switch it out with, but I have very little working knowledge on these topics.


Bevan Li commented Jun 30 '14, 1:22 p.m.

 Nope, my previous inclination was incorrect. The package definitely exists.


Ralph Schoon commented Jun 30 '14, 3:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Won't help you much, but I ran the example wit the same setup on jetty from the zip code provided as down load at the end of the page. It worked for me. So I assume you have a typo or some other problem somewhere. 


Ralph Schoon commented Jul 01 '14, 4:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Are you missing some dependency somewhere?


Bevan Li commented Jul 01 '14, 11:46 a.m.

I don't think so. The first project com.example.embedded.webapp requires org.eclipse.equinoxx.http.servlet and the second project com.example.hello requires net.jazz.ajax. 


Although, I have tried both with and without those dependencies as well. I get the same end result 404 page, but without them I get a lot more warnings such as:

2014-07-01 08:43:59.935:WARN::EXCEPTION 
java.lang.ClassNotFoundException: org.eclipse.equinox.http.servlet.HttpServiceServlet
...
2014-07-01 08:43:59.937:INFO:/example:Unavailable javax.servlet.UnavailableException: org.eclipse.equinox.http.servlet.HttpServiceServlet
2014-07-01 08:43:59.937:WARN::failed equinoxbridgeservlet: java.lang.NullPointerException
2014-07-01 08:43:59.937:WARN::Failed startup of context com.ibm.team.server.embedded.jetty.EmbeddedWebAppContext@87fd415{/example,C:\JazzWebUI\WS4\com.example.embedded.webapp\WebContent}
java.lang.NullPointerException

I don't get those warnings when I remove the net.jazz.ajax though.


Bevan Li commented Jul 01 '14, 12:16 p.m.

Also the package com.ibm.team.server.embedded.jetty is required as well. Forgot to mention above.


Ralph Schoon commented Jul 02 '14, 4:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Did you base your Launch for this on the existing jetty launch?


Lukas Steiger commented Jul 04 '14, 8:36 a.m.

 @Bevan Li
Did you find a solution for your issue? I am asking because a have the same problem as well.


Ralph Schoon commented Jul 04 '14, 8:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just tried it with 5.0 and the download file and I have the same issue. I will look at it.


Ralph Schoon commented Jul 04 '14, 9:02 a.m. | edited Jul 04 '14, 9:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

first of all, the launch provided with the download is missing required bundles. If you validate, that becomes apparent. You can let the launch UI fix this and hen at least the startup seems to run without exceptions.


Lukas Steiger commented Jul 04 '14, 9:56 a.m. | edited Jul 04 '14, 9:57 a.m.

Hi Ralph, thanks, I really appreciate your help.


You were right, after doing all steps again, I was able to start the application without errors:

2014-07-04 15:51:05.798:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2014-07-04 15:51:05.849:INFO::jetty-6.1.x
2014-07-04 15:51:06.325:INFO::Started SocketConnector@0.0.0.0:9081
2014-07-04 15:51:06.651:INFO::Started SslSocketConnector@0.0.0.0:9444

But I still can't access the application.

HTTP ERROR 403
Problem accessing /example/HelloWorld. Reason:
CRJZS0040E No REST service handler is registered for the following path: /HelloWorld.

Did you succeed in running the application? If yes, have you changed something to get it up and running?


Ralph Schoon commented Jul 04 '14, 10:29 a.m. | edited Jul 04 '14, 10:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Lukas,

I just realized that I ran another example (there is one that runs inside RTC/the dashboards). I tried this example https://jazz.net/wiki/bin/view/WebUIBook/HelloJazzWebUI with 4.0.1 and I see exactly what you see - same error.

I am not skilled enough at the moment to get it fixed. I will try to figure out what the issue is, but there is no log output whatsoever. I will try to find someone who could help.


Lukas Steiger commented Jul 06 '14, 9:24 a.m.

Hi Ralph,

That would be awesome. Thanks in advance.

One side note: I'm running this example on 5.0.


Ralph Schoon commented Jul 06 '14, 2:09 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If it runs on 4.x it will likely run on 5.x. Anyway, I will try to find a contact that can help with 4.x and 5.x. 


Bevan Li commented Jul 07 '14, 1:00 p.m.

Sorry, I never got the example to work.

I ended up switching to this tutorial instead: https://jazz.net/wiki/bin/view/Main/JAFTutorial


As a heads up, I got stuck on various different parts of that tutorial as well. I'm currently on the last part (stuck again) but I hope to have it finished soon.

Sorry I do not have any useful information, I may come back to this tutorial later to try and learn more.


Lukas Steiger commented Jul 08 '14, 9:18 a.m. | edited Jul 08 '14, 9:34 a.m.

 Hi Ralph and Bevan


I now have finally a working Launch configuration to complete step two of Creating a new Jazz Application from the ground up . With the attached launch configuration, you should be able to complete the entire tutorial, at least I was able to achieve this. 


[edit] you can find the launch config on OneDrive


Ralph Schoon commented Jul 08 '14, 9:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Congrats! I can't see an image. You could upload to dropbox or something similar and provide the link here.


Bevan Li commented Jul 08 '14, 1:21 p.m.

 I wasn't able to get mine to work using your configuration. Did you use the embedded webapp from the first tutorial? If I don't include it in your launch configuration I get the error:


HTTP ERROR: 404

Problem accessing /example/app. Reason:

    NOT_FOUND
    


Powered by Jetty://



Bevan Li commented Jul 08 '14, 1:22 p.m.

 If I do include it, I get this instead:


HTTP ERROR: 503

Problem accessing /example/app. Reason:

    SERVICE_UNAVAILABLE
    


Powered by Jetty://



Bevan Li commented Jul 08 '14, 1:22 p.m.

 I should also mention that if I do include it I get the same exception as before:


2014-07-08 10:15:10.458:WARN::EXCEPTION 
java.lang.ClassNotFoundException: org.eclipse.equinox.http.servlet.HttpServiceServlet
...
...

with a lot more lines about which plugins its from.

Also, the run configuration you gave me Lukas has one validation failure for me for the bundle org.eclilpse.core.filesystem.win32.x86_64. It works when I switch it to the 32 bit version although my OS is 64 bit. On top of that I get a handful more bundles if I use the "Add Required Bundles" button. Unfortunately the errors are still the same after those changes.


Do you mind zipping up your entire project if you could? I'm still not quite sure what I'm doing differently. What version of Eclipse are you using? I am currently using 3.7 (Indigo)


Lukas Steiger commented Jul 09 '14, 2:08 a.m. | edited Jul 09 '14, 2:09 a.m.

 I am using Eclipse Kepler on Windows 7 64Bit. My Jazz Server is the one you can download on the Jazz Foundation 5.0 download page
I have published both projects in a zip file on OneDrive, I am interested to hear whether you are able to get it up and running or not.


Lukas Steiger commented Jul 09 '14, 2:48 a.m.

One more thing I might have to add is that I have set the Jazz Application Framework (JAF) as my target definition in eclipse 


Bevan Li commented Jul 09 '14, 2:14 p.m.

Unfortunately it is still not working for me even using your full project files. I get the 404 error:


Problem accessing /example/app. Reason:

    NOT_FOUND
    

I tried using Eclipse 4.4 and then downloaded 4.3 to try in the same version as you. I am indeed using Windows 7 64bit and I went ahead and grabbed JRE5 as per your setup as well. I am not sure what else to do at this point.

As an aside, I also get this warning:
The import org.apache.http.HttpEntity is never used
    
but that doesn't really matter.

showing 5 of 24 show 19 more comments

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.