You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by "Kunnath, Radjhakrishnan [HCSUS Non-J&J]" <RK...@HCSUS.JNJ.com> on 2007/03/19 21:04:46 UTC

NullPointerException on Controls

Hello, 

I am getting a NPE exception in my code during the stress test after about
10 users are logged in. Please take a look at the following code. I need to
fix this thing ASAP and any help from user community will be truly
appreciated.

TIA 
-RK 

----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------


Exception Log : 
--------------------- 


           Mar 13, 2007 9:55:47 AM EDT> <Info>
<org.apache.beehive.netui.pageflow.PageFlowRequestProcessor> <000000>
<Attempting to instantiat

e SharedFlowControllers for request
/MDMWeb/com/jnj/mdm/customer/view/approveRequest.do> 
<Mar 13, 2007 9:55:47 AM EDT> <Info>
<org.apache.beehive.netui.pageflow.internal.DefaultExceptionsHandler>
<000000> <Handling Throwa

ble java.lang.NullPointerException> 
[/MDMWeb] Unhandled exception caught in Global.app: 
java.lang.NullPointerException 
        at
com.jnj.mdm.customer.view.ViewController.validateCustomerRequest(ViewControl
ler.java:1449) 
        at
com.jnj.mdm.customer.view.ViewController.approveRequest(ViewController.java:
652) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25) 
        at java.lang.reflect.Method.invoke(Method.java:585) 
        at
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowCont
roller.java:869) 
        at
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(Flow
Controller.java:808) 
        at
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowControl
ler.java:477) 
        at
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlo
wController.java:305) 
        at
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java
:335) 

CONTROLLER CODE SNIPPETS 
-------------------------------- 

@Jpf.Controller 
public class ViewController extends com.jnj.mdm.common.MDMPageFlowController
{ 

        // Decalare the controls 
               @Control() 
        private com.jnj.mdm.customer.common.controls.CustomerViewCtrl
customerViewCtrl; 
            ..... 
            ..... 
            ..... 
            ..... 
        

        private boolean validateCustomerRequest(CustomerViewForm form) { 

            ..... 

                String[] results = customerViewCtrl.validateRequest(logNum);
<----------- Line 1449. This is were we are getting the NPE

            ..... 

        } 
} 


Re: NullPointerException on Controls

Posted by Carlin Rogers <ca...@gmail.com>.
Hi RK,

Yes, from your code snippet, the NPE and stack trace, it appears that
the control is no longer initialized in the page flow controller. Are
there any other exceptions in the log that occur before this NPE?

Also curious about your stress test and the requests. Does your perf
test software ensure that the user sessions are unique? Is there
anything in your app were you explicitly invalidate the session. In
the sequence of requests for a given user, does the test request a
different page flow right around the time that this request is being
executed. Do the calls prior to validateCustomerRequest() use the
control or is this the first call to the control? Just trying to
determine what would cause the control to be uninitialized.

Kind regards,
Carlin

On 3/19/07, Kunnath, Radjhakrishnan [HCSUS Non-J&J]
<RK...@hcsus.jnj.com> wrote:
> Hello,
>
> I am getting a NPE exception in my code during the stress test after about
> 10 users are logged in. Please take a look at the following code. I need to
> fix this thing ASAP and any help from user community will be truly
> appreciated.
>
> TIA
> -RK
>
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------
>
>
> Exception Log :
> ---------------------
>
>
>            Mar 13, 2007 9:55:47 AM EDT> <Info>
> <org.apache.beehive.netui.pageflow.PageFlowRequestProcessor> <000000>
> <Attempting to instantiat
>
> e SharedFlowControllers for request
> /MDMWeb/com/jnj/mdm/customer/view/approveRequest.do>
> <Mar 13, 2007 9:55:47 AM EDT> <Info>
> <org.apache.beehive.netui.pageflow.internal.DefaultExceptionsHandler>
> <000000> <Handling Throwa
>
> ble java.lang.NullPointerException>
> [/MDMWeb] Unhandled exception caught in Global.app:
> java.lang.NullPointerException
>         at
> com.jnj.mdm.customer.view.ViewController.validateCustomerRequest(ViewControl
> ler.java:1449)
>         at
> com.jnj.mdm.customer.view.ViewController.approveRequest(ViewController.java:
> 652)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowCont
> roller.java:869)
>         at
> org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(Flow
> Controller.java:808)
>         at
> org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowControl
> ler.java:477)
>         at
> org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlo
> wController.java:305)
>         at
> org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java
> :335)
>
> CONTROLLER CODE SNIPPETS
> --------------------------------
>
> @Jpf.Controller
> public class ViewController extends com.jnj.mdm.common.MDMPageFlowController
> {
>
>         // Decalare the controls
>                @Control()
>         private com.jnj.mdm.customer.common.controls.CustomerViewCtrl
> customerViewCtrl;
>             .....
>             .....
>             .....
>             .....
>
>
>         private boolean validateCustomerRequest(CustomerViewForm form) {
>
>             .....
>
>                 String[] results = customerViewCtrl.validateRequest(logNum);
> <----------- Line 1449. This is were we are getting the NPE
>
>             .....
>
>         }
> }
>
>