Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Jazz Provisioning of hello world gives NPE in the browser

Hello,
I was following the example from https://jazz.net/wiki/bin/view/Main/UsingAppWizard to create a simple Hello World app. As I test it with embedded Jetty, it all works fine.

However, when I try to build an update site and follow the Jazz provisioning instructions, https://jazz.net/wiki/bin/view/Main/ProvisionAppInJFS calling my application from web browser http://localhost:9080/myapp/hello results in:

java.lang.NullPointerException
com.ibm.team.repository.provision.internal.ProvisionService.installFeature(ProvisionService.java:330)
com.ibm.team.repository.provision.internal.ProvisionService.installFeature(ProvisionService.java:356)
com.ibm.team.repository.provision.internal.ProvisionService.installFromProfiles(ProvisionService.java:733)
com.ibm.team.repository.provision.internal.ProvisionService.installFromProfiles(ProvisionService.java:702)
com.ibm.team.repository.provision.internal.InstallServlet.service(InstallServlet.java:185)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:121)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

I am using Eclipse 3.4 with target platform pointed to: com.ibm.team.jfs.sdk.feature-I20090420-1525 and with com.ibm.team.jfs.sdk.ide.feature-I20090420-1525 installed.

Have I missed something? Any advice would be appreciated.

Regards,
Blazej

0 votes



6 answers

Permanent link
Hello, could anyone drop me a line with any piece of advice?
I would like to make it work, but I am stuck on this NullPointerException.

Regards,
Blazej

0 votes


Permanent link
Let me clarify:
- Which version of Foundation Server do you use?
- Do you get the NPE when you access http://localhost:9080/myapp/install?
- Did you build the update site before export it? "Right click on the site.xml file and go to the PDE Tools menu option. Select Build Site".
- Does the exported update site contain features/com.ibm.team.jfs.sdk.runtime.feature_0.7.0..jar ?

0 votes


Permanent link
Hello wakao,
thank for asking questions to clarify. When looking for answers I found the root cause of the problem!

The problem was due to the fact, that I used as a target platform just the JSF SDK's 45 plug-ins (which was set up automatically as I used 3.5RC1 for developping). And should also include the dependant plug-ins from Eclipse installation. When I did that the project compiled and was deployed into Tomcat.

Now I have to make it run on the server, because the project created with the wizard is not working out of the box, am I right? Accessing http://localhost:9080/myapp/install work fine but accessing http://localhost:9080/myapp/examples/hello does result in a message that:
There is no REST service handler registered for the path

Thanks and regards,
Blazej

0 votes


Permanent link
How about accessing http://localhost:9080/myapp/hello ?

0 votes


Permanent link
How about accessing http://localhost:9080/myapp/hello ?


I am givem this error. Should I develop a REST service hanler myself? I thought the app wizard is doing it out of the box?

HTTP Status 403 - There is no REST service handler registered for the path "/hello"
type Status report
message There is no REST service handler registered for the path "/hello"
description Access to the specified resource (There is no REST service handler registered for the path "/hello") has been forbidden.

Thanks in advance,
regards
Blazej

0 votes


Permanent link
App wizard generates a template REST service which runs without any modification.

Can you run your application in your Eclipse environment just after generating the code by App Wizard?

1. Run -> Run Configurations...
2. Select OSGi framework
3. Select "New" from Context Menu
4. Select all bundles
5. Run

Then try to access http://localhost:9080//

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: May 15 '09, 3:34 a.m.

Question was seen: 7,086 times

Last updated: May 15 '09, 3:34 a.m.

Confirmation Cancel Confirm