RWT Standalone WAR to WebLogic contextDirectory null [message #1278566] |
Thu, 27 March 2014 14:12 |
|
Attempting to do an RWT standalone to WebLogic in a WAR for my RAP application, without OSGi, getting this error in the WebLogic console:
Caused by: java.lang.NullPointerException: The parameter 'contextDirectory' must not be null.
at org.eclipse.rap.rwt.internal.util.ParamCheck.notNull(ParamCheck.java:40)
at org.eclipse.rap.rwt.internal.resources.ResourceDirectory.configure(ResourceDirectory.java:27)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.doActivate(ApplicationContextImpl.java:329)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.activate(ApplicationContextImpl.java:205)
at org.eclipse.rap.rwt.application.ApplicationRunner.start(ApplicationRunner.java:82)
at org.eclipse.rap.rwt.engine.RWTServletContextListener.contextInitialized(RWTServletContextListener.java:50)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
My web.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<context-param>
<param-name>org.eclipse.rap.applicationConfiguration</param-name>
<param-value>uk.co.iet.rapide.tabris.Configuration</param-value>
</context-param>
<listener>
<listener-class>org.eclipse.rap.rwt.engine.RWTServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>rwtServlet</servlet-name>
<servlet-class>org.eclipse.rap.rwt.engine.RWTServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>rwtServlet</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
</web-app>
My WAR contains a bunch of jars in the WEB-INF/lib directory:
What is the 'ContextDirectory' parameter? I cannot find any information on this anywhere. How do I specify it, and where?
Perhaps it is a red-herring and there is another underlying problem?
The list of JARs in the WAR is probably way too much anyway - this is the same list that I deploy when a create a WAR for OSGi (which works ok by the way), so I suspect there are lots of JARs in there which are not necessary - and perhaps MUST NOT be included?
Guidance appreciated, as ever!
Thanks, John
---
Just because you can doesn't mean you should
|
|
|
Re: RWT Standalone WAR to WebLogic contextDirectory null [message #1279152 is a reply to message #1278566] |
Fri, 28 March 2014 09:55 |
|
Any thoughts on this one?
Here's a bit more from the trace:
<28-Mar-2014 09:48:03 o'clock GMT> <Warning> <HTTP> <BEA-101162> <User defined listener org.eclipse.rap.rwt.engine.RWTServletContextListener failed: java.lang.NullPointerException: The parameter 'cont
extDirectory' must not be null..
java.lang.NullPointerException: The parameter 'contextDirectory' must not be null.
at org.eclipse.rap.rwt.internal.util.ParamCheck.notNull(ParamCheck.java:40)
at org.eclipse.rap.rwt.internal.resources.ResourceDirectory.configure(ResourceDirectory.java:27)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.doActivate(ApplicationContextImpl.java:329)
at org.eclipse.rap.rwt.internal.application.ApplicationContextImpl.activate(ApplicationContextImpl.java:205)
at org.eclipse.rap.rwt.application.ApplicationRunner.start(ApplicationRunner.java:82)
---
Just because you can doesn't mean you should
|
|
|
Re: RWT Standalone WAR to WebLogic contextDirectory null [message #1281217 is a reply to message #1279152] |
Mon, 31 March 2014 14:41 |
|
Amazingly, this same WAR under WebSphere (the one I expected to be the biggest problem of all AppServers) works perfectly, so the contextDirectory issue only occurs under WebLogic. I'm thinking there is some sort of bug in RWT/RWP relating to this...?
JBoss gets a totally different error relating to xerces xml parsers, but I suspect this is a classloader sequence issue.
Why oh why can't AppServers be consistent in their behaviour!!! argh
Perhaps if someone on the RAP team can comment on the contextDirectory question, this could be useful in progressing WebLogic...?
Thanks, John
---
Just because you can doesn't mean you should
|
|
|
|
Re: RWT Standalone WAR to WebLogic contextDirectory null [message #1281748 is a reply to message #1281224] |
Tue, 01 April 2014 09:47 |
|
Thanks Ivan, makes sense in principle, but how and where is this specified?
The error is being thrown on deployment, not on startup of a session, so I guess it needs to be set in the EntryPoint (Configuration) somehow?
This code doesn't work in the EntryPoint because there is no session/request at that stage:
ServletContext srvContext;
srvContext = RWT.getRequest().getServletContext();
srvContext.setAttribute(ApplicationConfiguration.RESOURCE_ROOT_LOCATION, "/");
Sorry if this is basic servlet programming, but I'm not coming from that background, so not sure how it is done!
Thanks, John
---
Just because you can doesn't mean you should
[Updated on: Tue, 01 April 2014 09:52] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05065 seconds