Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Null pointer exception  RSS feed

Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Im facing a situation where my code throws an NPE ,it shows the NPE as being thrown by the domaintypeoid data member at line 110; however this variable is already initialized and used at a previous location , where it works fine (line marked in code ). but however ,the small value points to a null when used in another action in the same class .Could any tell me how to over come this?

The Stack trace produced is..
Listing domain
at com.vivek.struts2.action.DomainAction1.obtainData(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimer


Please help..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!