axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santosh Raman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5944) NullPointer Exception on AbstractContext.needPropertyDifferences
Date Fri, 21 Dec 2018 22:04:00 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16727095#comment-16727095
] 

Santosh Raman commented on AXIS2-5944:
--------------------------------------

The code is as below

@Override
 public NFWSElectronicDQDetailsList onlineQueryByID(
 NFEPIOnlineQueryByIDRequestDetails nfEPIOnlineQueryByIDRequestDetails) throws AppException,
 InformationalException {

DHHS_EDRSService_V_1_0Stub stub;

ServiceClient serviceClient = null;

NFWSElectronicDQDetailsList electronicDQDetailsList =
 new NFWSElectronicDQDetailsList();

// check if services to be invoked or not
 if (!Configuration.getBooleanProperty(NFWSHelper.INVOKE_SERVICES_IND)) {
 electronicDQDetailsList.infoMsgDtls = helper.logAppException();
 return electronicDQDetailsList;
 }

try {
 String serviceName =
 Configuration.getProperty(NFWSHelper.EDRS_SERVICE_NAME);
 String serviceVersion =
 Configuration.getProperty(NFWSHelper.EDRS_SERVICE_VERSION);
 NFWSOutboundHeaderIntf nfwsWrapper =
 NFWSOutboundHeaderFactory.newInstance(serviceName,
 serviceVersion, NFWSHelper.EDRS_OPERATION_GET_QUERYBY_ID);

NFElectronicDQUtil nfElectronicDQUtil = new NFElectronicDQUtil();

stub =
 new DHHS_EDRSService_V_1_0Stub(
 nfElectronicDQUtil.getESBServiceURL());

serviceClient = stub._getServiceClient();
 serviceClient.setOptions(helper.getEDRSClientAxis2Options());

nfwsWrapper.populateHeader(serviceClient, null);

// define request
 DHHS_EDRSService_V_1_0Stub.OnlineQueryByIdRequest onlineQueryByIdRequest =
 new DHHS_EDRSService_V_1_0Stub.OnlineQueryByIdRequest();

// define requestType
 DHHS_EDRSService_V_1_0Stub.OnlineQueryByIdRequestType onlineQueryByIdRequestType =
 new DHHS_EDRSService_V_1_0Stub.OnlineQueryByIdRequestType();
 
 
 CodeTableEntry entry = helper.determineIdentificationTypeForOnlineQueryByID(nfEPIOnlineQueryByIDRequestDetails);
 
 String code = entry.getCode();
 
 onlineQueryByIdRequestType.setPurpose(PurposeType.A);
 
 onlineQueryByIdRequest
 .setOnlineQueryByIdRequest(onlineQueryByIdRequestType);
 
 String webserviceCallInformation =
 NFWSUtil.getWebserviceCallInformation(nfwsWrapper);

Trace.kTopLevelLogger.info("Calling Webservice: "
 + webserviceCallInformation);

OMFactory omFactory =
 org.apache.axiom.om.OMAbstractFactory.getOMFactory();
 OMElement omElement =
 onlineQueryByIdRequest.getOMElement(
 OnlineQueryByIdRequest.MY_QNAME, omFactory);

OMElement omResponse = serviceClient.sendReceive(omElement);

electronicDQDetailsList =
 helper.mapDOMToNFElectronicDQDetails(omResponse);

} catch (AxisFault axisFault) {
 
 if (!nfEPIOnlineQueryByIDRequestDetails.skipErrorHandling) {
 electronicDQDetailsList.infoMsgDtls =
 helper.handleAxisFault(axisFault);
 TransactionInfo.getInformationalManager().failOperation();
 }
 
 } catch (ADBException e) {

AppException informationalText =
 helper.logException(electronicDQDetailsList);
 helper.logADBException(e, informationalText.getMessage());

} finally {
 try {
 if (null != serviceClient) {
 serviceClient.cleanupTransport();
 }
 } catch (AxisFault e) {
 AppException appException =
 new AppRuntimeException(e).getAppException();
 throw appException;
 }

}
 return electronicDQDetailsList;
 }

> NullPointer Exception on AbstractContext.needPropertyDifferences
> ----------------------------------------------------------------
>
>                 Key: AXIS2-5944
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5944
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>            Reporter: Santosh Raman
>            Priority: Critical
>
> In Production, we are seeing NullPointer exception being thrown randomly when calling
an Axis2 webservice.
> From the stack trace it looks like it happens when the axis2  client is trying to process
the response.
> The webservice calls an ESB layer and the ESB layer calls the external interface.The
ESB layer is just a pass through.
> The stack trace is 
> Caused by: java.lang.NullPointerException
> at org.apache.axis2.context.AbstractContext.needPropertyDifferences(AbstractContext.java:239)
> at org.apache.axis2.context.AbstractContext.setProperty(AbstractContext.java:202)
> at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:270)
> at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
> at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
> at curam.custom.webservices.edrs.impl.NFWSElectronicDQRecipientService.onlineQueryByID(NFWSElectronicDQRecipientService.java:175)
> at curam.custom.webservices.edrs.impl.NFElectronicDQUtil.invokeOnlineQueryByID(NFElectronicDQUtil.java:452)
> at curam.custom.nfprogramintegrity.disqualification.facade.impl.NFEPIDisqualification.getElectornicDQDetailsListBySsn(NFEPIDisqualification.java:555)
> at curam.custom.nfprogramintegrity.disqualification.facade.impl.NFEPIDisqualification.getDQSearchRecordsFromEDRS(NFEPIDisqualification.java:491)
> at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
> at java.lang.reflect.Method.invoke(Method.java:508)
> at curam.util.internal.CuramSessionBean.invoke(CuramSessionBean.java:297)
>  
> Thanks 
> Santosh
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message