Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RequestProcessor problem on a cluster

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
We have a webapplication based on struts which runs in a clustered environment. On one servernode we get an ugly Nullpointer that occurs in the RequestProcessor class. In the RequestProcessor the reference to the ActionServlet is null. This is quiet strange because the RequestProcessor is created and initialized by the ActionServlet itsself (checked the struts sources and found the call [request]processor.init(this, config); in the action servlet).

We also use Tiles which subclasses the RequestProcessor. Maybe this is useful to mention.

Could this be a replication problem?
Could anyone help me?

Thanks in advance. Regards
/tea

Log attached:
[CODE]
####<15.02.2006 13.41 Uhr CET> <Error> <HTTP> <ws003> <edec-MS01-P> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101020>
<[ServletContext(id=158365299,name=e-quota,context-path=/e-quota)] Servlet failed with Exception
java.lang.NullPointerException
at org.apache.struts.action.RequestProcessor.getServletContext()Ljavax.servlet.ServletContext;(RequestProcessor.java:1118)
at org.apache.struts.action.RequestProcessor.doForward(Ljava.lang.String;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletRespons
e V(RequestProcessor.java:1056)
at org.apache.struts.action.RequestProcessor.processForwardConfig(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.
apache.struts.config.ForwardConfig V(RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(RequestProcesso
r.java:229)
at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(ActionServlet.java
:1194)
at org.apache.struts.action.ActionServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(ActionServlet.java:4
14)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(Optimized Method)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.Fil
terChainImpl V(Optimized Method)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse V(Optimized Method)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(Optimized Method)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction Ljava.lang.Obj
ect;(Optimized Method)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedS
ubject;Ljava.security.PrivilegedAction Ljava.lang.Object;(Optimized Method)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletRespon
seImpl V(Optimized Method)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread V(Optimized Method)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest V(Optimized Method)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread V(Unknown Source)
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you use tiles you need to use TilesRequestProcessor not the normal RequestProcessor. Please use TilesRequestProcessor, i think it should solve your problem.
 
tea Timer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thanks for your reply. Do you mean, that I have to change the controller definition in struts-config.xml? Actually this definition looks as follows:

We use a customized request processor which only overrides the method processRoles(...).

However, the TilesRequestProcessor isn't configured in struts-config.xml. I have already seen a struts-config.xml with the following controller-element:

What is the consequence of a definition without specifing the class? This processor thing is confusing.

Thanks to throw light on this.
Regards
/tea
 
dnyan ginde
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your Controller class extending TilesRequestProcessor or RequestProcessor? You may want to try the following:



where the TilesRequestProcessorExtended extends TilsRequestProcessor. The Tiles plug-in checks check this constraint.

And by the way you do not need to specify in your struts config file that the processorClass will be
TilesRequestProcessor. This is automatically done by the plug-in. If a class is specified in the
struts configuration file, that processorClass will be used instead.

Hope this answers your question
[ February 16, 2006: Message edited by: dnyan ginde ]
 
tea Timer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is your Controller class extending TilesRequestProcessor or RequestProcessor?


I'm actually extending RequestProcessor. But your solutions sounds feasible. I'm go to try it afterwards.

What is still unclear to me is the fact that on our clustered test environment the problem has never been occured (unlike the production env).

Thanks for the great help! Have a nice day.
/tea
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I get the same error in my clustered environment and I use only TilesRequestProcessor in struts-config.xml file.

Tea Timer : Is your problem fixed? How did you fix it? I appreciate your response to my post, as this is causing BIG PROBLEM in our production systems.

Thanks,
Murthy
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please, HELP!. I have the same error and I'm using TilesRequestProcessor on struts-config.xml:

<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

But i have the same error:

javax.servlet.ServletException: java.lang.NullPointerException


Stack Trace:
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:508)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:415)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic