• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null Pointer exception while invoking web service

 
Umakant Swami
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , i have following code:

try {
ActivationHandlerImplServiceLocator oServiceLocator = new ActivationHandlerImplServiceLocator(); //exception is thrown here
ActivationHandlerImplService oService = (ActivationHandlerImplService)oServiceLocator;
ActivationHandlerImpl oPort = oService.getActivation(); //oPort is the stub
InfoActivation oInfoActivation = oPort.activate(UserID,Password,Number);
}
catch(Exception ee){
ee.printStackTrace();
}
I am getting stacktrace for line 2 of above code as : Please help :
java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:997)
at java.lang.ClassLoader.getResources(ClassLoader.java:812)
at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:152)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:199)
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:801)
at org.apache.axis.client.Service.getAxisClient(Service.java:143)
at org.apache.axis.client.Service.<init>(Service.java:152)
at com.ActivationHandlerImplServiceLocator.<init>(ActivationHandlerImplServiceLocator.java:10)
at com.WebServiceInvoker.invokeWebService(WebServiceInvoker.java:72)
at com.ActivationHandler.activateCard(ActivationHandler.java:69)
at com.ActivationAction.processActivation(ActivationAction.java:136)
at org.apache.jsp.user_002dactive_002dcard_jsp._jspService(user_002dactive_002dcard_jsp.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:536)


what could be the reason???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you look at the source code for org.apache.catalina.loader.WebappClassLoader.findResources - line 997 to find out exactly what is missing.
I only have the source for 4.1.30 here and that method is in a different place so you must have a different version.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic