我安装了完整的IDE包和RAP目标。之后我想尝试“Hello world”示例,正如您在此处example所见,但我没有“BasicEntryPoint”类,“创建应用程序UI”中对此进行了描述。在“启动应用程序”之后,我也得到了错误:
2013-04-23 20:07:26.970:INFO:oejs.Server:jetty-8.1.9.v20130131
osgi> 2013-04-23 20:07:27.033:INFO:oejs.AbstractConnector:Started
SelectChannelConnector@0.0.0.0:49944
2013-04-23 20:07:30.219:WARN:oejs.ServletHandler:ERROR: /rap
java.lang.IllegalArgumentException: Entry point not found: /rap
at org.eclipse.rap.rwt.internal.lifecycle.EntryPointManager.getEntryPointRegistration(EntryPointManager.java:68)
at org.eclipse.rap.rwt.internal.service.StartupPage.getCurrentEntryPointProperties(StartupPage.java:151)
at org.eclipse.rap.rwt.internal.service.StartupPage.writeEntryPointProperty(StartupPage.java:160)
at org.eclipse.rap.rwt.internal.service.StartupPage.writeTitle(StartupPage.java:81)
at org.eclipse.rap.rwt.internal.service.StartupPage$StartupPageValueProvider.writeVariable(StartupPage.java:173)
at org.eclipse.rap.rwt.internal.service.StartupPageTemplate.writePage(StartupPageTemplate.java:52)
at org.eclipse.rap.rwt.internal.service.StartupPage.send(StartupPage.java:65)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.handleGetRequest(LifeCycleServiceHandler.java:87)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:77)
at org.eclipse.rap.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:61)
at org.eclipse.rap.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:107)
at org.eclipse.rap.rwt.engine.RWTServlet.handleRequest(RWTServlet.java:94)
at org.eclipse.rap.rwt.engine.RWTServlet.doGet(RWTServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.rap.rwt.osgi.internal.CutOffContextPathWrapper.service(CutOffContextPathWrapper.java:106)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:386)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
怎么了?我觉得示例说明错了......
答案 0 :(得分:1)
我也是RAP的新手并遇到同样的问题。我同意你的看法,这个“Hello World”示例不完整。您可以在此处找到解决方案(您必须手动创建此类(BasicEntryPoint)):
此外,您必须为配置添加入口点(plugin.xml):
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="org.examples.rap.helloworld.BasicEntryPoint"
id="entrypoint1"
path="/rap">
</entrypoint>