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
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
6 answers
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 ?
- 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 ?
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
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
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"
Thanks in advance,
regards
Blazej
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//
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//