Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gyrex » JAX-RS Tutorial
JAX-RS Tutorial [message #899574] Wed, 01 August 2012 13:44 Go to next message
Marcel Bruch is currently offline Marcel Bruch
Messages: 229
Registered: July 2009
Senior Member
Hi,

some minor issues/requests:

First,
I followed the instruction on [1] by setting up a target definition using the latest Integration build and hoped to skip the additional step to install the JAX-RS addon. When importing the JAX-RS example projects they complain that no plugin in the current target definition exports javax.ws.rs - which is apparently true when looking at my target file Smile

Is it possible to add javax.ws.rs bundle to the integration update site too?

Second,
after manually adding the required jaxrs plugins in my target platform, most classes compile except those that depended on "import org.eclipse.gyrex.cloud.environment.INodeEnvironment; Also the package import to "org.eclipse.gyrex.http.application.provider" cannot be resolved.

Is this import still recent for Gyrex 1.2 Integration builds?


Thanks,
Marcel


[1] http://wiki.eclipse.org/Gyrex/Install_JAXRS_AddOn


tw: @MarcelBruch
tw: @Recommenders

[Updated on: Wed, 01 August 2012 13:52]

Report message to a moderator

Re: JAX-RS Tutorial [message #899599 is a reply to message #899574] Wed, 01 August 2012 14:35 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar Wagenknecht
Messages: 451
Registered: July 2009
Senior Member
Am 01.08.2012 15:44, schrieb Marcel Bruch:
> Is it possible to add javax.ws.rs bundle to the integration update site too?

Thanks for the report Marcel! Tracked as
https://bugs.eclipse.org/386395.

A new build should be kicked automatically soon.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: JAX-RS Tutorial [message #899601 is a reply to message #899574] Wed, 01 August 2012 14:40 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar Wagenknecht
Messages: 451
Registered: July 2009
Senior Member
(Whoops, the forums "edit" feature did not update the newsgroup post.
Thus, this is a reply to a follow-up question.)

Am 01.08.2012 15:44, schrieb Marcel Bruch:
> Second, after manually adding the required jaxrs plugins in my target
> platform, most classes compile except those that depended on "import
> org.eclipse.gyrex.cloud.environment.INodeEnvironment; Also the
> package import to "org.eclipse.gyrex.http.application.provider"
> cannot be resolved.

That's still required (the first only for the samples, though). It looks
like an issue in the target platform. What does the "Target Platform
State" view looks like? Can you post a screenshot? There should be a
"org.eclipse.gyrex.http" bundle which provides the
"org.eclipse.gyrex.http.application.provider" package.

Thanks,
Gunnar


--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: JAX-RS Tutorial [message #899634 is a reply to message #899601] Wed, 01 August 2012 15:57 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel Bruch
Messages: 229
Registered: July 2009
Senior Member
The latest integration build fixed the second issue too. All classes compile and all imports work now.

Thanks Smile


tw: @MarcelBruch
tw: @Recommenders
Re: JAX-RS Tutorial [message #899663 is a reply to message #899634] Wed, 01 August 2012 17:43 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel Bruch
Messages: 229
Registered: July 2009
Senior Member
I've set up a launch config which includes the whole target platform (except *test projects) including the two jax-rs sample projects. The server starts and the admin console is available under localhost:3110. However, when I try to click on any menuitem I get an 500 server error and stacktraces on the console.


One is for instance:
19:35:32.348 [jetty-server-admin-43] WARN  o.e.g.c.i.admin.CloudManagerImpl - Unable to install node monitor at node /gyrex/nodes/pending. GateDownException: ZooKeeper Gate is DOWN. (null)
19:35:32.349 [jetty-server-admin-43] WARN  o.e.g.c.i.admin.CloudManagerImpl - Unable to install node monitor at node /gyrex/nodes/approved. GateDownException: ZooKeeper Gate is DOWN. (null)
19:35:32.350 [jetty-server-admin-43] WARN  o.e.g.c.i.admin.CloudManagerImpl - Unable to install node monitor at node /gyrex/nodes/online. GateDownException: ZooKeeper Gate is DOWN. (null)
19:35:32.376 [jetty-server-admin-43] WARN  o.e.jetty.servlet.ServletHandler - /admin;jsessionid=7bo0qoneveacnqf335tdh8o6
java.lang.reflect.UndeclaredThrowableException: null
	at $Proxy2.getOnlineNodes(Unknown Source) ~[na:na]
	at org.eclipse.gyrex.admin.ui.cloud.internal.NodeBrowserContentProvider.getElements(NodeBrowserContentProvider.java:105) ~[na:na]
	at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:992) ~[na:na]
	at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:698) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1333) ~[na:na]
	at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391) ~[na:na]
	at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:900) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:602) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:802) ~[na:na]
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:779) ~[na:na]
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:750) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1493) ~[na:na]
	at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1477) ~[na:na]
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1425) ~[na:na]
	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403) ~[na:na]
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1386) ~[na:na]
	at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1470) ~[na:na]
	at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inputChanged(FilteredTree.java:1204) ~[na:na]
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280) ~[na:na]
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1672) ~[na:na]
	at org.eclipse.gyrex.admin.ui.cloud.internal.ClusterAdminPage.activate(ClusterAdminPage.java:123) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.AdminApplication.activate(AdminApplication.java:137) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.AdminApplication.openPage(AdminApplication.java:419) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.AdminApplication.access$0(AdminApplication.java:401) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.AdminApplication$3.openPage(AdminApplication.java:306) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.Navigation$1.openPage(Navigation.java:58) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.DropDownNavigation.openItem(DropDownNavigation.java:69) ~[na:na]
	at org.eclipse.gyrex.admin.ui.internal.application.DropDownMenu$2.widgetSelected(DropDownMenu.java:82) ~[na:na]
	at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:191) ~[na:na]
	at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:46) ~[na:na]
	at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:186) ~[na:na]
	at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:208) ~[na:na]
	at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1145) ~[na:na]
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1135) ~[na:na]
	at org.eclipse.rwt.internal.lifecycle.ProcessAction.execute(ProcessAction.java:27) ~[na:na]
	at org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:35) ~[na:na]
	at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:133) ~[na:na]
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:99) ~[na:na]
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.handlePostRequest(LifeCycleServiceHandler.java:92) ~[na:na]
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:67) ~[na:na]
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:58) ~[na:na]
	at org.eclipse.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:101) ~[na:na]
	at org.eclipse.rwt.engine.RWTServlet.doPost(RWTServlet.java:80) ~[na:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) ~[javax.servlet_3.0.0.v201112011016.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet_3.0.0.v201112011016.jar:na]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:643) ~[na:na]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:450) [org.eclipse.jetty.servlet_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1067) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:377) [org.eclipse.jetty.servlet_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1001) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.Server.handle(Server.java:360) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851) [org.eclipse.jetty.http_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [org.eclipse.jetty.http_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [org.eclipse.jetty.server_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622) [org.eclipse.jetty.io_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) [org.eclipse.jetty.io_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) [org.eclipse.jetty.util_8.1.5.v20120716.jar:8.1.5.v20120716]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) [org.eclipse.jetty.util_8.1.5.v20120716.jar:8.1.5.v20120716]
	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_33]
Caused by: java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33]
	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33]
	at org.eclipse.gyrex.common.internal.services.ServiceProxy.invoke(ServiceProxy.java:304) ~[na:na]
	... 69 common frames omitted
Caused by: java.lang.RuntimeException: Error reading list of nodes. GateDownException: ZooKeeper Gate is DOWN. (null)
	at org.eclipse.gyrex.cloud.internal.admin.CloudManagerImpl.getOnlineNodes(CloudManagerImpl.java:132) ~[na:na]
	... 74 common frames omitted
Caused by: org.eclipse.gyrex.cloud.internal.zk.GateDownException: ZooKeeper Gate is DOWN. (null)
	at org.eclipse.gyrex.cloud.internal.zk.ZooKeeperGate.get(ZooKeeperGate.java:136) ~[na:na]
	at org.eclipse.gyrex.cloud.internal.admin.CloudManagerImpl.getOnlineNodes(CloudManagerImpl.java:123) ~[na:na]
	... 74 common frames omitted



Osgi console says Zookeeper plugin is active.

osgi> ss zoo
"Framework is launched."


id	State       Bundle
25	ACTIVE      org.apache.hadoop.zookeeper_3.4.2.v20120222-1245
osgi> diag 25
reference:file:/Users/Marcel/Workspaces/ctrlflow-server.org/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.apache.hadoop.zookeeper_3.4.2.v20120222-1245.jar [25]
  Direct constraints which are unresolved:
    Missing optionally imported package jline_0.0.0.
    Missing optionally imported package org.jboss.netty.bootstrap_0.0.0.
    Missing optionally imported package org.jboss.netty.buffer_0.0.0.
    Missing optionally imported package org.jboss.netty.channel_0.0.0.
    Missing optionally imported package org.jboss.netty.channel.group_0.0.0.



When I click on the application tab, I get a different error:

    Service 'org.eclipse.gyrex.http.application.manager.IApplicationManager' is currently not available for bundle 'org.eclipse.gyrex.admin.ui.http(id 98)'


and a length stacktrace.

Console again tells me both plugins should be ok:

ss org.eclipse.gyrex.admin.ui.http
"Framework is launched."


id	State       Bundle
98	ACTIVE      org.eclipse.gyrex.admin.ui.http_1.1.0.v20120524-1441
99	ACTIVE      org.eclipse.gyrex.admin.ui.http.jetty_1.0.0.v20120702-0820


Is there anything obvious I missed?



tw: @MarcelBruch
tw: @Recommenders
Re: JAX-RS Tutorial [message #899713 is a reply to message #899663] Thu, 02 August 2012 05:22 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar Wagenknecht
Messages: 451
Registered: July 2009
Senior Member
Marcel Bruch wrote on Wed, 01 August 2012 13:43
I've set up a launch config which includes the whole target platform (except *test projects) including the two jax-rs sample projects.


Did you set it up like described here:
http://wiki.eclipse.org/Gyrex/Learning_Material/Develop_OSGi_DS

-Gunnar
Re: JAX-RS Tutorial [message #899714 is a reply to message #899713] Thu, 02 August 2012 05:31 Go to previous messageGo to next message
Marcel Bruch is currently offline Marcel Bruch
Messages: 229
Registered: July 2009
Senior Member
No, I didn't. I thought I looked at the applications menu after I set up the target platform the first time to see if there is a new application available - but couldn't see one. Thus I started it with "osgi framework" launch config instead of an Eclipse application. Now I have the gyrex application and the stacktraces are gone. Thanks.

tw: @MarcelBruch
tw: @Recommenders
Re: JAX-RS Tutorial [message #899715 is a reply to message #899714] Thu, 02 August 2012 05:35 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar Wagenknecht
Messages: 451
Registered: July 2009
Senior Member
Thanks for the feedback. It's actually a regular "Eclipse Application" type. I'll make sure that the tutorials are more clear about that. Maybe that should be a separate page.
Re: JAX-RS Tutorial [message #899716 is a reply to message #899715] Thu, 02 August 2012 05:37 Go to previous message
Marcel Bruch is currently offline Marcel Bruch
Messages: 229
Registered: July 2009
Senior Member
the product export page should have warned me. But yes, I didn't expect the start configuration to be in the declarative services example. I skipped that page as I imported the existing projects from the JAXRS tutorial .

tw: @MarcelBruch
tw: @Recommenders
Previous Topic:Tutorials
Next Topic:JMS support
Goto Forum:
  


Current Time: Mon Sep 22 20:29:32 GMT 2014

Powered by FUDForum. Page generated in 0.01954 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software