1 Reply Latest reply on Dec 4, 2009 1:19 PM by Anteo Caliqi

    web service called from a portlet

    Anteo Caliqi Newbie

      Hi

      i have writen a simple webservice with axis2 under eclipse that calculates a random number and have deployed it on jboss.I can also see the wsdl description of the web service in the browser.
      I have also written a normal portlet that has a text field and a tree. when a node in the tree is clicked the method nodeSelected in the treeBean is called which calls the webservice and saves the value in a variable that is used from the textfield.so the new value should be shown in the text field. but this doesn't happen

      The portlet is beeing deployed so i can create an instance of it and also shown in the portal but when i click on any node of the tree a lot of errors shows up. I tried it on tomcat(just the webservice and the webapplication not as portlet) and everything works fine, with no errors and the response of the webservice is beeing showed in the text field. I have jboss-portal-2.7.2 installed.

      the portlet works fine if i don't have webservices

      The errors i get when deploying are:

      17:22:26,968 INFO [TomcatDeployer] deploy, ctxPath=/ServiceMitarbeiterPlus_IceF
      aces(Portlet)_WebService, warUrl=.../tmp/deploy/tmp9935ServiceMitarbeiterPlus_Ic
      eFaces(Portlet)_WebService-exp.war/
      17:22:39,187 INFO [STDOUT] [INFO]
      ICEsoft Technologies, Inc.
      ICEfaces 1.8.2
      Build number: 7
      Revision: 19321
      17:22:40,359 INFO [STDOUT] [INFO] ViewRootStateManagerImpl constructed with Del
      egate: com.sun.faces.application.StateManagerImpl@18f2af0
      17:22:46,218 INFO [STDOUT] [INFO] Clustering has been disabled
      17:23:08,453 INFO [STDOUT] [INFO] Deploying module: addressing-1.5.1 - file:/C:
      /Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/depl
      oy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/mo
      dules/addressing-1.5.1.mar
      17:23:08,609 INFO [STDOUT] [INFO] Deploying module: metadataExchange-1.5.1 - fi
      le:/C:/Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tm
      p/deploy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-
      INF/modules/mex-1.5.1.mar
      17:23:08,640 INFO [STDOUT] [INFO] Deploying module: mtompolicy-1.5.1 - file:/C:
      /Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/depl
      oy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/mo
      dules/mtompolicy-1.5.1.mar
      17:23:08,687 INFO [STDOUT] [INFO] Deploying module: ping-1.5.1 - file:/C:/Progr
      amme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/deploy/tmp
      9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/modules/
      ping-1.5.1.mar
      17:23:08,765 INFO [STDOUT] [INFO] Deploying module: script-1.5.1 - file:/C:/Pro
      gramme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/deploy/t
      mp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/module
      s/scripting-1.5.1.mar
      17:23:08,796 INFO [STDOUT] [INFO] Deploying module: soapmonitor-1.5.1 - file:/C
      :/Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/dep
      loy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/m
      odules/soapmonitor-1.5.1.mar
      17:23:08,937 INFO [STDOUT] [WARN] Exception extracting jars into temporary dire
      ctory : java.io.FileNotFoundException: C:\Programme\JBoss Application Server\jbo
      ss-portal-2.7.2\server\default\.\tmp\deploy\tmp9935ServiceMitarbeiterPlus_IceFac
      es(Portlet)_WebService-exp.war\WEB-INF (Zugriff verweigert) : switching to alter
      nate class loading mechanism
      17:23:08,953 INFO [STDOUT] [INFO] Deploying Exception Occured with java.io.File
      NotFoundException: C:\Programme\JBoss Application Server\jboss-portal-2.7.2\serv
      er\default\.\tmp\deploy\tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebServi
      ce-exp.war\WEB-INF (Zugriff verweigert)
      java.lang.RuntimeException: java.io.FileNotFoundException: C:\Programme\JBoss Ap
      plication Server\jboss-portal-2.7.2\server\default\.\tmp\deploy\tmp9935ServiceMi
      tarbeiterPlus_IceFaces(Portlet)_WebService-exp.war\WEB-INF (Zugriff verweigert)
       at org.apache.axis2.deployment.util.Utils.findLibJars(Utils.java:829)
       at org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:8
      82)
       at org.apache.axis2.jaxws.framework.JAXWSDeployer.deployServicesInWARCla
      ssPath(JAXWSDeployer.java:100)
       at org.apache.axis2.jaxws.framework.JAXWSDeployer.init(JAXWSDeployer.jav
      a:80)
       at org.apache.axis2.deployment.DeploymentEngine.initializeDeployers(Depl
      oymentEngine.java:989)
       at org.apache.axis2.deployment.DeploymentEngine.setConfigContext(Deploym
      entEngine.java:981)
       at org.apache.axis2.deployment.WarBasedAxisConfigurator.setConfigContext
      (WarBasedAxisConfigurator.java:350)
       at org.apache.axis2.context.ConfigurationContextFactory.createConfigurat
      ionContext(ConfigurationContextFactory.java:89)
       at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisSer
      vlet.java:525)
       at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443
      )
       at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:5
      6)
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
      java:1161)
       at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:98
      1)
       at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
      t.java:4071)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
      375)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:790)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
      0)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
      
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.j
      ava:296)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1
      64)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:53
      12)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.j
      ava:296)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1
      64)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(Tom
      catDeployer.java:301)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeplo
      yer.java:104)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
      
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:245)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy201.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:46
      6)
       at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
      .java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
      rServiceMBeanSupport.java:238)
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
      erceptor.java:87)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
      start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
      ptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy202.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:634)
       at org.jboss.deployment.scan
      17:23:09,062 INFO [STDOUT] ner.AbstractDeploymentScanner$ScannerThread.doScan(A
      bstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:225)
      Caused by: java.io.FileNotFoundException: C:\Programme\JBoss Application Server\
      jboss-portal-2.7.2\server\default\.\tmp\deploy\tmp9935ServiceMitarbeiterPlus_Ice
      Faces(Portlet)_WebService-exp.war\WEB-INF (Zugriff verweigert)
       at java.io.FileInputStream.open(Native Method)
       at java.io.FileInputStream.<init>(FileInputStream.java:106)
       at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLC
      onnection.java:105)
       at java.net.URL.openStream(URL.java:1009)
       at org.apache.axis2.deployment.util.Utils.findLibJars(Utils.java:811)
       ... 101 more
      17:23:09,296 INFO [STDOUT] [INFO] Deploying Web service: RandomNumber - file:/C
      :/Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/dep
      loy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/s
      ervices/RandomNumber/
      17:23:09,406 INFO [STDOUT] [INFO] Deploying Web service: version.aar - file:/C:
      /Programme/JBoss Application Server/jboss-portal-2.7.2/server/default/./tmp/depl
      oy/tmp9935ServiceMitarbeiterPlus_IceFaces(Portlet)_WebService-exp.war/WEB-INF/se
      rvices/version.aar
      


      and the errors i get when i click on any tree node are:
      HTTP Status 500 -
      
      type Exception report
      
      message
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      java.lang.RuntimeException: wrapped Exception: java.lang.NullPointerException
       com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:156)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      root cause
      
      java.lang.NullPointerException
       client.ServiceTest.getWebServiceValue(ServiceTest.java:26)
       basic.TreeBean.nodeSelected(TreeBean.java:249)
       sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       java.lang.reflect.Method.invoke(Method.java:597)
       org.apache.el.parser.AstValue.invoke(AstValue.java:131)
       org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
       com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
       javax.faces.component.UICommand.broadcast(UICommand.java:380)
       com.icesoft.faces.component.tree.Tree.broadcast(Tree.java:1075)
       javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
       javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:755)
       com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
       com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
       com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
       com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
       com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
       com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
       com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
       com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
       com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
       com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
       com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
       com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
       com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      


      I am searching for three days now for the problem without finding any solution. Can anyone please help me in this?
      Thanks a lot
      Teo