这是一个奇怪的场景,我要问的是是否有人过去经历过类似的事情以及可能的情况的任何提示
我正在开发的应用程序可用于各种环境。我们通常使用 Tomcat 进行开发,我们的集成环境之一是 Websphere。
现在像这样的声明
BillingPaymentAssembler.java:149
finActivity.setReferenceNo(paymentDetail.getTicketNumber());
在哪里 ticketNumber String
,在单元测试期间可以在 Tomcat 上正常运行。但是当部署在 websphere 上时,会nullPointerException
为同一个测试用例抛出一个。
更新#1
我们在 UI 上使用 JSF2,paymentDetail 是 Bean。
ticket number
ticketNumber
是bean对应的 UI 上的一个字段。
这种情况下,当我没有在 UI 上输入任何内容时ticket number
,将其留空。在那种情况下,我得到了例外
更新#2
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R java.lang.NullPointerException
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.csa.assembler.BillingPaymentAssembler.disassemble(BillingPaymentAssembler.java:149)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.AccelTransformation.disassemble(AccelTransformation.java:79)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at java.lang.reflect.Method.invoke(Method.java:600)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.ServiceHandler.invoke(ServiceHandler.java:59)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.AccelService.callService(AccelService.java:1087)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.csa.process.BillingPaymentBP.process(BillingPaymentBP.java:29)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.AccelBP.process(AccelBP.java:62)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at java.lang.reflect.Method.invoke(Method.java:600)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.service.ServiceControllerBP.process(ServiceControllerBP.java:54)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.service.ServiceControllerAbstract.internalExecute(ServiceControllerAbstract.java:278)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.service.ServiceControllerAbstract.execute(ServiceControllerAbstract.java:197)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.delegate.DirectServiceController.execute(DirectServiceController.java:61)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.delegate.ServiceDelegateDirect.execute(ServiceDelegateDirect.java:70)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.BaseServiceAction.execute(BaseServiceAction.java:584)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.action.policy.services.MaintainBillingPayment.perform(MaintainBillingPayment.java:145)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.BaseServiceAction.perform(BaseServiceAction.java:618)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.ServiceDelegator.execute(ServiceDelegator.java:506)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.ServiceDelegator.processEvent(ServiceDelegator.java:240)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.BeanBase.executeEvent(BeanBase.java:779)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at pagecode.policy.file.Billing.executeBillingPayments(Billing.java:498)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at java.lang.reflect.Method.invoke(Method.java:600)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:67)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at javax.faces.component.UICommand.broadcast(UICommand.java:315)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.csc.fs.accel.ui.filters.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:82)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:895)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:183)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[1/16/13 5:25:02:750 EST] 00000019 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)