You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get an RWT 4.0 (rap-4.0.0-R-20240904-0717) application up and running using the Jetty (12.0.12) dependencies that are included in the RWT 4.0 Release archive in embedded mode and I keep getting the following error in 'server.start()':
java.lang.NullPointerException: The parameter 'contextDirectory' must not be null.
..which is raised by the ParamCheck.java class.
This is the server initiation code:
privatestaticvoidtestBasicServer() throwsException {
Serverserver = newServer(8080);
ServletContextHandlercontext = newServletContextHandler(ServletContextHandler.SESSIONS);
context.setTempDirectory(newFile("/tmp/" + UUID.randomUUID().toString())); //Create a unique temp directorycontext.newResource(newURI(context.getTempDirectory().getCanonicalPath())); //Set the temp directory as the resource path context.setContextPath("/");
context.setInitParameter("org.eclipse.rap.applicationConfiguration", "tests.HelloWorldConfiguration");
context.addEventListener(newRWTServletContextListener());
ServletHolderrwtServletHolder = newServletHolder(newRWTServlet());
context.addServlet(rwtServletHolder, "/hello");
server.setHandler(context);
server.start(); //This is where the code breaksserver.join();
}
This is the full exception trace:
java.lang.NullPointerException: The parameter 'contextDirectory' must not be null.
at org.eclipse.rap.rwt.internal.util.ParamCheck.notNull(ParamCheck.java:29)
at org.eclipse.rap.rwt.internal.resources.ResourceDirectory.configure(ResourceDirectory.java:27)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.doActivate(ApplicationContextImpl.java:372)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.activate(ApplicationContextImpl.java:244)
at org.eclipse.rap.rwt.application.ApplicationRunner.start(ApplicationRunner.java:80)
at org.eclipse.rap.rwt.engine.RWTServletContextListener.contextInitialized(RWTServletContextListener.java:51)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:1591)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.contextInitialized(ServletContextHandler.java:497)
at org.eclipse.jetty.ee10.servlet.ServletHandler.initialize(ServletHandler.java:670)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1325)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1047)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1446)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1044)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:624)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
at org.eclipse.jetty.server.Server.doStart(Server.java:565)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at tests.Testing.testBasicServer(Testing.java:39)
at tests.Testing.main(Testing.java:20)
Please note that the aforementioned code used to work perfectly with older versions of RWT (e.g. 3.4 and older)
I am most probably missing something here... but I really cannot find what it is.
Any suggestion on how to fix this would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Hello :)
I am trying to get an RWT 4.0 (rap-4.0.0-R-20240904-0717) application up and running using the Jetty (12.0.12) dependencies that are included in the RWT 4.0 Release archive in embedded mode and I keep getting the following error in 'server.start()':
..which is raised by the ParamCheck.java class.
This is the server initiation code:
This is the full exception trace:
Please note that the aforementioned code used to work perfectly with older versions of RWT (e.g. 3.4 and older)
I am most probably missing something here... but I really cannot find what it is.
Any suggestion on how to fix this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: