9 Replies Latest reply on Apr 24, 2013 10:20 AM by Ricardo Martinelli Oliveira

    JAX-WS: NullPointerException

    Felipe Riccetto Newbie

      I have some applications (+- 10) that eventualy (one or two times per day) crashs with the exception below.

       

      I'm using JBoss 7.1.1 + Spring + JAXA-WS (the one that came with JBoss 7.1.1).

       

      The exception throws when trying to connect to the web service server (HTTPS).

      The server is in another machine, but in the same local network.

       

      The strange is that others applications (5 +-) on this same JBoss instance that uses Apache AXIS don't crash, so the webservice server is not down.

       

      Thanks

       

      10:08:06,876 Grave [javax.enterprise.resource.webcontainer.jsf.application] (http--0.0.0.0-443-11) Error Rendering View[/consultaRamal.xhtml]: javax.el.ELException: /consultaRamal.xhtml @39,56 value="#{ramalBean.inicializar}": javax.xml.ws.soap.SOAPFaultException: NullPointerException invoking https://protheus.cnpem.org.br:8443/ws/WSCNPEMFUNCIONARIOS.apw: null

                at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIOutput.getValue(UIOutput.java:169) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488) [jbossweb-7.0.13.Final.jar:]

                at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706) [jbossweb-7.0.13.Final.jar:]

                at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677) [jbossweb-7.0.13.Final.jar:]

                at org.apache.jsp.index_jsp._jspService(index_jsp.java:63)

                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:]

                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]

      Caused by: javax.xml.ws.soap.SOAPFaultException: NullPointerException invoking https://protheus.cnpem.org.br:8443/ws/WSCNPEMFUNCIONARIOS.apw: null

                at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146) [cxf-2.3.1.jar:2.3.1]

                at $Proxy245.getbynome(Unknown Source)          at br.cnpem.view.RamalBean.buscarPorNome(RamalBean.java:438) [classes:]

                at br.cnpem.view.RamalBean.carregarDados(RamalBean.java:738) [classes:]

                at br.cnpem.view.RamalBean.getInicializar(RamalBean.java:858) [classes:]

                at sun.reflect.GeneratedMethodAccessor607.invoke(Unknown Source) [:1.7.0_05]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_05]

                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_05]

                at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]

                at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at org.apache.el.parser.AstValue.getValue(AstValue.java:169) [jbossweb-7.0.13.Final.jar:]

                at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.0.13.Final.jar:]

                at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.1.7-jbossorg-2.jar:]

                ... 47 more

      Caused by: java.lang.NullPointerException: NullPointerException invoking https://protheus.cnpem.org.br:8443/ws/WSCNPEMFUNCIONARIOS.apw: null

                at sun.reflect.GeneratedConstructorAccessor967.newInstance(Unknown Source) [:1.7.0_05]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_05]

                at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_05]

                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2106) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2096) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) [cxf-2.3.1.jar:2.3.1]

                ... 60 more

      Caused by: java.lang.NullPointerException

                at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:984) [rt.jar:1.7.0_05]

                at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) [rt.jar:1.7.0_05]

                at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1090) [rt.jar:1.7.0_05]

                at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) [rt.jar:1.7.0_05]

                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:2002) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1954) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) [cxf-2.3.1.jar:2.3.1]

                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2022) [cxf-2.3.1.jar:2.3.1]

                ... 69 more