Commit 5c3f17c3 authored by vkadam's avatar vkadam

((Node) localObject2).getFirstChild() is not NULL to resolve NullPointer Exception in [D16ASUN012]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101663 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7daab5a1
package ibase.webitm.ejb.dis.adv; package ibase.webitm.ejb.dis.adv;
//import ibase.scheduler.ejb.BaseRegisteredEJB; import ibase.scheduler.ejb.BaseRegisteredEJB;
import ibase.scheduler.utility.interfaces.Schedule; import ibase.scheduler.utility.interfaces.Schedule;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.utility.BaseException; import ibase.utility.BaseException;
...@@ -32,7 +32,7 @@ import javax.xml.rpc.ParameterMode; ...@@ -32,7 +32,7 @@ import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call; import org.apache.axis.client.Call;
import org.apache.axis.client.Service; import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType; import org.apache.axis.encoding.XMLType;
//import org.apache.poi.hsmf.datatypes.PropertyValue.TimePropertyValue; import org.apache.poi.hsmf.datatypes.PropertyValue.TimePropertyValue;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node; import org.w3c.dom.Node;
...@@ -40,8 +40,7 @@ import org.w3c.dom.NodeList; ...@@ -40,8 +40,7 @@ import org.w3c.dom.NodeList;
public class PorcpConfirmEJB implements Schedule public class PorcpConfirmEJB implements Schedule
{ {
//GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
Document dom = null; Document dom = null;
boolean isError = false; boolean isError = false;
...@@ -422,7 +421,7 @@ public class PorcpConfirmEJB implements Schedule ...@@ -422,7 +421,7 @@ public class PorcpConfirmEJB implements Schedule
localStatement3.close(); localStatement3.close();
localStatement3 = null; localStatement3 = null;
} }
Node localNode1 = null; Node localNode1 = null,localNode3=null;
localObject2 = null; localObject2 = null;
NamedNodeMap localNamedNodeMap = null; NamedNodeMap localNamedNodeMap = null;
String str15 = ""; String str15 = "";
...@@ -472,7 +471,7 @@ public class PorcpConfirmEJB implements Schedule ...@@ -472,7 +471,7 @@ public class PorcpConfirmEJB implements Schedule
{ {
System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error message from response"); System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error message from response");
} }
if (localNode1 != null) if (localNode1 != null && localNode1.getFirstChild()!=null)
{ {
str16 = localNode1.getFirstChild().getNodeValue(); str16 = localNode1.getFirstChild().getNodeValue();
} }
...@@ -486,15 +485,20 @@ public class PorcpConfirmEJB implements Schedule ...@@ -486,15 +485,20 @@ public class PorcpConfirmEJB implements Schedule
try try
{ {
localObject2 = localDocument2.getElementsByTagName("description").item(0); localObject2 = localDocument2.getElementsByTagName("description").item(0);
// localNode3 = localDocument2.getElementsByTagName("description").item(0);
} catch (Exception localException8) } catch (Exception localException8)
{ {
System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error description from response"); System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error description from response");
} }
if (localObject2 != null) if (localObject2 != null && ((Node) localObject2).getFirstChild()!=null)
{ {
str17 = ((Node) localObject2).getFirstChild().getNodeValue(); str17 = ((Node) localObject2).getFirstChild().getNodeValue();
} }
// if (localNode3 != null && localNode3.getFirstChild()!=null)
// {
// str17 = localNode3.getFirstChild().getNodeValue();
// }
localBufferedWriter.write("<ERR_DESCR>'" + str17 + "'</ERR_DESCR>"); localBufferedWriter.write("<ERR_DESCR>'" + str17 + "'</ERR_DESCR>");
localBufferedWriter.newLine(); localBufferedWriter.newLine();
localBufferedWriter.write(" "); localBufferedWriter.write(" ");
...@@ -772,6 +776,7 @@ public class PorcpConfirmEJB implements Schedule ...@@ -772,6 +776,7 @@ public class PorcpConfirmEJB implements Schedule
String str1 = null; String str1 = null;
String str2 = null; String str2 = null;
String str3 = ""; String str3 = "";
String runMode="I";
localNodeList1 = paramDocument.getElementsByTagName("CRITERIA"); localNodeList1 = paramDocument.getElementsByTagName("CRITERIA");
if (localNodeList1 != null) if (localNodeList1 != null)
...@@ -820,7 +825,8 @@ public class PorcpConfirmEJB implements Schedule ...@@ -820,7 +825,8 @@ public class PorcpConfirmEJB implements Schedule
if ((str2 != null) && (str1 != null)) if ((str2 != null) && (str1 != null))
{ {
str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1; // str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1;
str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1+"~~runMode="+runMode;
System.out.println("xtraParams.." + str3); System.out.println("xtraParams.." + str3);
} else } else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment