Commit 65306830 authored by mchauhan's avatar mchauhan

Added ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204893 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 00e60535
......@@ -124,7 +124,7 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
System.out.println("XML String after modification ||||||||||||||| ---> "+valueXmlString);
return valueXmlString;
}
private Document replaceField(Document dom,String targetField,String currentFormNo,String xtraParams)
private Document replaceField(Document dom,String targetField,String currentFormNo,String xtraParams) throws ITMException
{
StringBuffer xmlString = new StringBuffer();
StringBuffer xmlString2 = new StringBuffer();
......@@ -159,6 +159,7 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(Exception e)
{
System.out.println("Exception while creating connection......");
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
try
{
......@@ -593,7 +594,7 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
return dom;
}//replaceField()
private Document replaceAllFields(Document dom,String targetField,String formNo,String xtraParams)
private Document replaceAllFields(Document dom,String targetField,String formNo,String xtraParams) throws ITMException
{
try
{
......@@ -609,11 +610,12 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
{
System.out.println("Exception [replaceAllFields()]::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
return dom;
}//replaceAllFields()
private String serializeDom(Node dom)
private String serializeDom(Node dom) throws ITMException
{
String retString = null;
try
......@@ -630,11 +632,12 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch (Exception e)
{
System.out.println("Exception : In : serializeDom :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retString;
}
private double getDailyExchRateSellBuy(String as_curr_code,String as_curr_code__to,String as_login_site,String as_tran_date,String as_type)
private double getDailyExchRateSellBuy(String as_curr_code,String as_curr_code__to,String as_login_site,String as_tran_date,String as_type) throws ITMException
{
String ls_fin_entity ="",ls_curr_code__to = "",var_value = "";
double lc_exch_rate = 0.00;
......@@ -676,6 +679,7 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(Exception e)
{
System.out.println("Exception :: [1][getDailyExchRateSellBuy] ::"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
}
......@@ -720,11 +724,13 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(SQLException e)
{
System.out.println("Exception :: [2][getDailyExchRateSellBuy]"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
catch(Exception ex)
{
System.out.println("Exception [2a]::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
}
else if (as_type.equals("S"))
......@@ -765,11 +771,13 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(SQLException e)
{
System.out.println("Exception :: [3][getDailyExchRateSellBuy][type 'S']"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
catch(Exception ex)
{
System.out.println("Exception [3a]::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
}
if (lc_exch_rate == 0)
......@@ -809,11 +817,13 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(SQLException e)
{
System.out.println("Exception ::[4][getDailyExchRateSellBuy]"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
catch(Exception ex)
{
System.out.println("Exception [4a]::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
}
if (lc_exch_rate == 0)
......@@ -856,11 +866,13 @@ public class ChargeBack implements ChargeBackLocal, ChargeBackRemote // added fo
catch(SQLException e)
{
System.out.println("Exception [5][getDailyExchRateSellBuy]"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
catch(Exception ex)
{
System.out.println("Exception [5a]::"+ex.getMessage());
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
}
try
......
......@@ -61,6 +61,7 @@ public class ChargeBackFormIc extends ValidatorEJB implements ChargeBackFormIcLo
} catch (Exception e)
{
System.out.println("Exception : AssetRegisterICEJB : wfValData(String xmlString) : ==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (errString);
}
......@@ -753,6 +754,7 @@ public class ChargeBackFormIc extends ValidatorEJB implements ChargeBackFormIcLo
{
System.out.println("Exception ::" + e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
// errCode = "VALEXCEP";
// errString = getErrorString("", errCode, userId);
// errList.add(errCode);
......@@ -787,7 +789,7 @@ public class ChargeBackFormIc extends ValidatorEJB implements ChargeBackFormIcLo
System.out.println("ErrString ::" + errString);
return errString;
}// END OF VALIDATION
private String errorType(Connection conn , String errorCode)
private String errorType(Connection conn , String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -806,6 +808,7 @@ public class ChargeBackFormIc extends ValidatorEJB implements ChargeBackFormIcLo
catch(Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -69,6 +69,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} catch (Exception e)
{
System.out.println("Exception : AssetRegisterICEJB : wfValData(String xmlString) : ==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (errString);
}
......@@ -1318,6 +1319,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
{
System.out.println("Exception ::" + e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
// errCode = "VALEXCEP";
// errString = getErrorString("", errCode, userId);
// errList.add(errCode);
......@@ -1352,7 +1354,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
System.out.println("ErrString ::" + errString);
return errString;
}// END OF VALIDATION
private String errorType(Connection conn , String errorCode)
private String errorType(Connection conn , String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -1371,6 +1373,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
catch(Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -1419,6 +1422,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} catch (Exception e)
{
System.out.println("Exception : [AssetRegisterICEJB][itemChanged] :==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......@@ -3390,7 +3394,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
return minRate;
}
//Added by AMOL S on 01-JUL-2019 [D19CMES002] START
private StringBuffer getCountRate(StringBuffer valueXmlString, Connection conn, String itemCodeRepl, Document dom)
private StringBuffer getCountRate(StringBuffer valueXmlString, Connection conn, String itemCodeRepl, Document dom) throws ITMException
{
double countRate = 0, amount = 0, freeQunt = 0;
......@@ -3405,6 +3409,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
catch (ITMException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
try
{
......@@ -3415,13 +3420,14 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
valueXmlString.append("<amount><![CDATA[").append(amount).append("]]></amount>");
valueXmlString.append("<rate__count><![CDATA[").append(countRate).append("]]></rate__count>"); //Added by AMOL
return valueXmlString;
}
private String getPriceList(Connection conn)
private String getPriceList(Connection conn) throws ITMException
{
String priceList = "";
PreparedStatement preparedStatement = null;
......@@ -3441,6 +3447,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -3450,7 +3457,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
return priceList;
}
private double getPriceListRate(String priceList, String itemCodeRepl, Connection conn)
private double getPriceListRate(String priceList, String itemCodeRepl, Connection conn) throws ITMException
{
double countRate = 0;
String rate = "";
......@@ -3476,6 +3483,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -3484,7 +3492,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
return countRate;
}
private StringBuffer getOfferData(StringBuffer valueXmlString, Connection conn, String tranId)
private StringBuffer getOfferData(StringBuffer valueXmlString, Connection conn, String tranId) throws ITMException
{
//offer means scheme_code
PreparedStatement preparedStatement = null;
......@@ -3540,6 +3548,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -3559,7 +3568,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
valueXmlString.append("<amount protect =\"1\"><![CDATA[").append(amount).append("]]></amount>");
return valueXmlString;
}
private void closeResources(PreparedStatement preparedStatement, ResultSet resultSet)
private void closeResources(PreparedStatement preparedStatement, ResultSet resultSet) throws ITMException
{
if(preparedStatement != null)
{
......@@ -3580,14 +3589,13 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
}
catch (SQLException e)
{
e.printStackTrace();
}
resultSet = null;
}
}
private String getSchmeAprDetTranId(String offer, Connection conn)
private String getSchmeAprDetTranId(String offer, Connection conn) throws ITMException
{
String tranId = "";
PreparedStatement preparedStatement= null;
......@@ -3607,6 +3615,7 @@ public class ChargeBackLoc extends ValidatorEJB implements ChargeBackLocLocal, C
} catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return tranId;
......
......@@ -199,8 +199,8 @@ public class ChargeBackLocPostSave extends ValidatorEJB implements
}
System.out.println("Exception ::" + e);
e.printStackTrace();
error = e.getMessage();
/*error = e.getMessage();*/ //Commented By Mukesh Chauhan on 02/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} finally
{
......
......@@ -1119,6 +1119,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
System.out.println("ChrgBckLocConfEJB..."+e1);
e1.printStackTrace();
}
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -2391,7 +2392,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
}
return retString;
}*/
private String getCurrdateInAppFormat()
private String getCurrdateInAppFormat() throws ITMException
{
String currAppdate =null;
java.sql.Timestamp currDate = null;
......@@ -2411,10 +2412,11 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
catch(Exception e)
{
System.out.println("Exception in getCurrdateInAppFormat:::"+e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (currAppdate);
}
private String generateTranId(String windowName, String tranDate, String siteCode ,String signBy,String tranType)
private String generateTranId(String windowName, String tranDate, String siteCode ,String signBy,String tranType) throws ITMException
{
Connection conn = null;
PreparedStatement pstmt = null;
......@@ -2475,10 +2477,12 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
catch (SQLException ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -3986,7 +3990,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
{
return (input == null || "null".equalsIgnoreCase(input.trim())) ? "" : input.trim();
}
private String autoConfirmRecord(String objName, String tranIdForIssue, String xtraParams) {
private String autoConfirmRecord(String objName, String tranIdForIssue, String xtraParams) throws ITMException {
InitialContext ctx = null;
String xmlInEditMode = "", retString = "";
MasterStatefulLocal masterStateful = null;
......@@ -4009,6 +4013,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
System.out.println("retString ::: " + retString);
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retString;
}
......@@ -4032,7 +4037,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
return retValue;
}
private String getXmlInEditMode(String objName, String tranId, String xtraParams) {
private String getXmlInEditMode(String objName, String tranId, String xtraParams) throws ITMException {
InitialContext ctx = null;
String xmlInEditMode = "";
MasterStatefulLocal masterStateful = null;
......@@ -4052,12 +4057,13 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
xmlInEditMode = masterStateful.getDetailXMLDomString(objName, "1", "E", tranId, "");
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("Returning from MasterStateful xmlInEditMode ::: " + xmlInEditMode);
return xmlInEditMode;
}
public void insertDataInSchemeBal(Map<String,String> map)
public void insertDataInSchemeBal(Map<String,String> map) throws ITMException
{
System.out.println("ChrgBckLocConf.insertDataInSchemeBal() : "+map);
PreparedStatement pStmt=null;
......@@ -4115,6 +4121,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
catch(Exception e)
{
System.out.println(e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -4162,7 +4169,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
return map;
}
//Added by Saiprasad G. on 24-JAN-19 START [For inserting the data in scheme trace]
public void insertSchemeTrace(Timestamp tranDate,String schemeAprvId,String custCode,String schemeCode,int usedAmt,int balanceAmt)
public void insertSchemeTrace(Timestamp tranDate,String schemeAprvId,String custCode,String schemeCode,int usedAmt,int balanceAmt) throws ITMException
{
System.out.println("In ChrgBckLocConf.insertSchemeTrace():");
PreparedStatement schemeTracePstmt=null;
......@@ -4203,6 +4210,7 @@ public class ChrgBckLocConf extends ActionHandlerEJB implements ChrgBckLocConfLo
catch(Exception e)
{
System.out.println("Excption in ChrgBckLocConf.insertSchemeTrace():");
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -811,6 +811,7 @@ public class CommissiondetIC extends ValidatorEJB implements CommissiondetICLoca
catch(Exception e)
{
System.out.println("Exception : [TrainingEJB][itemChanged(String,String)] :==>\n"+e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......
......@@ -2754,6 +2754,7 @@ public class CreateDistIssue
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("chandni inside detail::"+detail2hdr.toString());
return detail2hdr.toString();
......@@ -2853,7 +2854,7 @@ public class CreateDistIssue
//System.out.println("integralQty :"+integralQty);
return integralQty;
} */
private double getIntegralQty(String siteCode, String itemCode, String lotNo, String packCode, String checkIntegralQty)
private double getIntegralQty(String siteCode, String itemCode, String lotNo, String packCode, String checkIntegralQty) throws ITMException
{
double integralQty = 0;
String sql = "";
......@@ -3008,12 +3009,13 @@ public class CreateDistIssue
catch(Exception e)
{
System.out.println("the exception occurs in getIntegralQty :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("integralQty :"+integralQty);
return integralQty;
}
private String calcExpiry(String tranDate, int months)
private String calcExpiry(String tranDate, int months) throws ITMException
{
java.util.Date expDate = new java.util.Date();
java.util.Date retDate = new java.util.Date();
......@@ -3046,12 +3048,13 @@ public class CreateDistIssue
catch(Exception e)
{
//System.out.println("The Exception occurs in calcExpiry :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
//System.out.println("retStrInDate :"+retStrInDate);
return retStrInDate;
}
private int getNoArt(String siteCode, String custCode, String itemCode, String packCode, double qty, char type, double shipperQty, double integralQty1)
private int getNoArt(String siteCode, String custCode, String itemCode, String packCode, double qty, char type, double shipperQty, double integralQty1) throws ITMException
{
String sql = "";
ResultSet rs = null;
......@@ -3273,6 +3276,7 @@ public class CreateDistIssue
catch(Exception e)
{
System.out.println("Exception occures in getNoArt :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("(int)noArt :"+(int)noArt);
return (int)noArt;
......
......@@ -114,6 +114,7 @@ public class CreateDistOrder
e.printStackTrace();
retString="ERROR";
//throw new ITMException(e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -461,6 +462,7 @@ public class CreateDistOrder
e.printStackTrace();
retString="ERROR";
//throw new ITMException(e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("retString create dist order :: "+retString);
return retString;
......@@ -548,7 +550,7 @@ public class CreateDistOrder
return retString;
}
private String createDistIssue()
private String createDistIssue() throws ITMException
{
StringBuffer xmlBuff = new StringBuffer();
try
......@@ -658,11 +660,12 @@ public class CreateDistOrder
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return "";
}
private void createDistReceipt()
private void createDistReceipt() throws ITMException
{
StringBuffer xmlBuff = new StringBuffer();
try
......@@ -753,9 +756,10 @@ public class CreateDistOrder
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
}
private String getCurrdateAppFormat()
private String getCurrdateAppFormat() throws ITMException
{
String s = "";
//GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -774,6 +778,7 @@ public class CreateDistOrder
catch(Exception exception)
{
System.out.println("Exception in [MPSOrder] getCurrdateAppFormat " + exception.getMessage());
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return s;
}
......
......@@ -48,6 +48,7 @@ public class CreateDistReceipt
catch(Exception e)
{
System.out.println("Exception : CreateDistReceipt : "+e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (errString);
}
......@@ -925,9 +926,9 @@ public class CreateDistReceipt
}
catch (Exception e)
{
e.printStackTrace();
System.out.println(" Error calling getXMLdata");
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retString;
......@@ -962,7 +963,7 @@ public class CreateDistReceipt
}
return retString;
}
private String getCurrdateAppFormat()
private String getCurrdateAppFormat() throws ITMException
{
String s = "";
//GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -981,6 +982,7 @@ public class CreateDistReceipt
catch(Exception exception)
{
System.out.println("Exception in getCurrdateAppFormat " + exception.getMessage());
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return s;
}
......
......@@ -75,7 +75,8 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
catch (Exception e)
{
System.out.println("Exception :CreditNotePrcEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
rtrStr = e.getMessage();
/*rtrStr = e.getMessage();*/ //Commented By Mukesh Chauhan on 07/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return rtrStr;
}//END OF GETDATA(1)
......@@ -401,7 +402,8 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
System.out.println("Exception :CreditNotePrcEJB :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
e.printStackTrace();
retStr = e.getMessage();
/*retStr = e.getMessage();*/ //Commented By Mukesh Chauhan on 02/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retStr;
}//END OF PROCESS (1)
......@@ -591,7 +593,7 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
return errorString;
}//END OF PROCESS(2)
private String insertRecord(String complaintNo,String acctCodeDet, String cctrCodeDet, Connection con)
private String insertRecord(String complaintNo,String acctCodeDet, String cctrCodeDet, Connection con) throws ITMException
{
ResultSet rsHdr=null,rsDet=null;
PreparedStatement pstmt1=null,pstmt2=null;
......@@ -777,7 +779,8 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
catch (Exception e)
{
e.printStackTrace();
errString=e.getMessage();
/*errString=e.getMessage();*/ //Commented By Mukesh Chauhan on 02/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("[CreditNotePrcEJB]==>errString=>"+errString);
return errString;
......@@ -791,7 +794,7 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
return s;
}//end of blanknull()
private String generateTranId(String windowName,String xmlValues)
private String generateTranId(String windowName,String xmlValues) throws ITMException
{
System.out.println("[CreditNotePrcEJB]==inside generateTranId>");
Statement stmt = null;
......@@ -851,17 +854,19 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
System.out.println("Exception ::" +sql+ ex.getMessage() + ":");
ex.printStackTrace();
tranId=null;
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
catch(Exception e)
{
System.out.println("Exception ::" + e.getMessage() + ":");
e.printStackTrace();
tranId=null;
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return tranId;
}//generateTranTd()
private Timestamp getCurrdateAppFormat()
private Timestamp getCurrdateAppFormat() throws ITMException
{
String currAppdate ="";
java.sql.Timestamp currDate = null;
......@@ -877,6 +882,7 @@ public class CreditNotePrc extends ProcessEJB implements CreditNotePrcLocal, Cre
{
System.out.println("Exception in :::CreditNotePrcEJB"+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (currDate);
}//end of getCurrdateAppFormat()
......
......@@ -546,6 +546,7 @@ public class CreditTermIC extends ValidatorEJB implements CreditTermICLocal, Cre
catch(Exception e)
{
System.out.println("Exception : [CreditTermIc][itemChanged( String, String )] :==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......@@ -734,7 +735,7 @@ public class CreditTermIC extends ValidatorEJB implements CreditTermICLocal, Cre
}
}
private String errorType(Connection conn , String errorCode)
private String errorType(Connection conn , String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -753,6 +754,7 @@ public class CreditTermIC extends ValidatorEJB implements CreditTermICLocal, Cre
catch(Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -69,6 +69,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
System.out.println ( "Exception: CustBillPrefIC: wfValData(String xmlString): " + e.getMessage() + ":" );
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println ( "Returning from CustBillPrefIC wfValData" );
return ( errString );
......@@ -513,6 +514,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
System.out.println ( "Exception: CustBillPrefIC: wfValData(String xmlString): " + e.getMessage() + ":" );
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -576,6 +578,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
{
System.out.println ( "Exception :CustBillPrefIC :itemChanged(String,String):" + e.getMessage() + ":" );
errString = genericUtility.createErrorString(e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println ( "returning from CustBillPrefIC itemChanged" );
......@@ -713,6 +716,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
{
System.out.println( "Exception :CustBillPrefHdr :itemChanged(Document,String):" + e.getMessage() + ":" );
valueXmlString = valueXmlString.append( genericUtility.createErrorString( e ) );
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -746,7 +750,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
System.out.println( "\n****ValueXmlString :" + valueXmlString.toString() + ":********" );
return valueXmlString.toString();
}
private String errorType( Connection conn , String errorCode )
private String errorType( Connection conn , String errorCode ) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -770,6 +774,7 @@ public class CustBillPrefIC extends ValidatorEJB implements CustBillPrefICRemote
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -58,6 +58,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
System.out
.println("Exception : CrlimitValid : wfValData(String xmlString) : ==>\n"
+ e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return (errString);
}
......@@ -323,6 +324,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
e.printStackTrace();
errCode = "VALEXCEP";
errString = getErrorString("", errCode, userId);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} finally {
try {
if (conn != null) {
......@@ -378,6 +380,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
+ e.getMessage() + ":");
valueXmlString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
System.out.println("returning from CrLimitValid itemChanged");
return (valueXmlString);
......@@ -514,8 +517,8 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
.println("Exception :CrLimitValid•@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@••••••(Document,String):"
+ e.getMessage() + ":");
valueXmlString.delete(0, valueXmlString.length());
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} finally {
try {
if (rs != null) {
......
......@@ -53,7 +53,8 @@ public class CustSeriesPrcEjb extends ProcessEJB implements CustSeriesPrcEjbLoc
System.out.println("Exception :ConsolidationPrcEJB :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
e.printStackTrace();
System.out.println("exception :"+e.getMessage());
retStr = e.getMessage();
/*retStr = e.getMessage();*/ // Commented By Mukesh Chauhan on 02/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return retStr;
......
......@@ -6134,6 +6134,7 @@ public class CustStockGWTIC extends ValidatorEJB implements CustStockGWTICLocal,
{
System.out.println("Exception ::"+e.getMessage());
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -8208,7 +8209,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
}*/
private ArrayList getItemFromCust(String custCode, String itemSerHdr,String resultitemSer,String siteCode, String orderType,java.sql.Timestamp frmDateTstmp, java.sql.Timestamp toDateTstmp,java.sql.Timestamp prdFrDateTstmp, java.sql.Timestamp prdToDateTstmp,String lastTranId,String newTranId,String selectedInvList, Connection conn ,String calCriItemSerIn,List<String> itemListLast,boolean isItemSer,HashMap<String,Integer> dataMap,String objName)
private ArrayList getItemFromCust(String custCode, String itemSerHdr,String resultitemSer,String siteCode, String orderType,java.sql.Timestamp frmDateTstmp, java.sql.Timestamp toDateTstmp,java.sql.Timestamp prdFrDateTstmp, java.sql.Timestamp prdToDateTstmp,String lastTranId,String newTranId,String selectedInvList, Connection conn ,String calCriItemSerIn,List<String> itemListLast,boolean isItemSer,HashMap<String,Integer> dataMap,String objName) throws ITMException
{
//long llCount = 0, llRowNum = 0;
//String lsErrCode = null, lsCode = null, lsDescr = null, lsUnit = null, lsLocType = null,lsOpStock=null,
......@@ -8457,6 +8458,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
}catch( Exception ex )
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}finally
{
try{
......@@ -8467,7 +8469,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
return defData;
}
private ItemDescr getItemBean(String invItemCode, Timestamp frmDateTstmp,String custCode, String lastTranId,String resultitemSer,boolean isItemSer,Connection conn)
private ItemDescr getItemBean(String invItemCode, Timestamp frmDateTstmp,String custCode, String lastTranId,String resultitemSer,boolean isItemSer,Connection conn) throws ITMException
{
String clStock="0.0",rate="0.0",rateOrg="0.0",tranIdLast="",itemSer="",sql="",itemDescription="",itemUsage="";
// String itemSerNew="",itemSerOld="";
......@@ -8614,11 +8616,12 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
{
// TODO: handle exception
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return itemDescr;
}
private HashMap<String,ArrayList<String>> getItemwiseInvoice(String custCode, String itemSerHdr,String resultitemSer,String siteCode, String orderType,java.sql.Timestamp frmDateTstmp, java.sql.Timestamp toDateTstmp,java.sql.Timestamp prdFrDateTstmp, java.sql.Timestamp prdToDateTstmp,String lastTranId,String newTranId,String selectedInvList, Connection conn ,boolean isItemSer)
private HashMap<String,ArrayList<String>> getItemwiseInvoice(String custCode, String itemSerHdr,String resultitemSer,String siteCode, String orderType,java.sql.Timestamp frmDateTstmp, java.sql.Timestamp toDateTstmp,java.sql.Timestamp prdFrDateTstmp, java.sql.Timestamp prdToDateTstmp,String lastTranId,String newTranId,String selectedInvList, Connection conn ,boolean isItemSer) throws ITMException
{
//long llCount = 0, llRowNum = 0;
//String lsErrCode = null, lsCode = null, lsDescr = null, lsUnit = null, lsLocType = null,lsOpStock=null,lsItemSer = null,lsTranId = null;
......@@ -8780,6 +8783,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
catch( Exception ex )
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
return invHashMapStr;
}
......@@ -8979,7 +8983,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
e.printStackTrace();
throw new ITMException(e);
}
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -9042,7 +9046,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
return dlvFlag ;
}
private Timestamp getPreviousDate(java.sql.Timestamp FromDate, Connection conn)
private Timestamp getPreviousDate(java.sql.Timestamp FromDate, Connection conn) throws ITMException
{
String varValueStr="";
int varValue = 0;
......@@ -9081,6 +9085,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
}
catch(Exception e)
{
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return prdFrom;
}
......@@ -9845,7 +9850,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
return decFormat.format(actVal);
}
public String getItemSerList(String itemser, Connection conn)
public String getItemSerList(String itemser, Connection conn) throws ITMException
{
String itemSerGrpValue="",itemSerSplit="",resultItemSer="";
PreparedStatement pstmt = null;//,pstmt2 = null,pstmt3 = null;
......@@ -9890,13 +9895,14 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
{
e.printStackTrace();
}
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return resultItemSer;
}
//private ArrayList addPreviousItems(List<String> itemListLast,ArrayList defData,String tranIdLast, Connection conn)
private ArrayList addPreviousItems(String custCodeHd ,String itemSerDom ,String resultitemSer ,boolean isItemSerLocal ,
java.sql.Timestamp frmDateTstmp,java.sql.Timestamp prvMFromDate,java.sql.Timestamp prvMToDate,List<String> itemListLast,
ArrayList defData,String tranIdLast, Connection conn)
ArrayList defData,String tranIdLast, Connection conn) throws ITMException
{
String sql = null;
......@@ -10026,6 +10032,7 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
{
e.printStackTrace();
}
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return defData;
}
......
......@@ -96,6 +96,7 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
e.printStackTrace();
System.out.println("Exception ::"+e.getMessage());
errString = itmDBAccessEJB.getErrorString("", "VTICFAIL","", "", conn);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -119,7 +120,7 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
}
//Added by saurabh for duplicate customer validation[10/03/17|Start]
private String checkValidCust(String tranId, Connection conn) {
private String checkValidCust(String tranId, Connection conn) throws ITMException {
// TODO Auto-generated method stub
String sql="",custCodeDom="",itemSerHd="",prdCode="",errString="";
int custCnt=0;
......@@ -164,7 +165,8 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
}
catch(Exception e)
{
errString = e.getMessage();
/*errString = e.getMessage();*///Commented By Mukesh Chauhan on 02/08/19
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return errString;
}
......@@ -549,6 +551,7 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
e.printStackTrace();
errString = itmDBAccessEJB.getErrorString("", "VTICFAIL","", "", conn);
//errString=e.getMessage();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -680,7 +683,7 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
System.out.println("return openingRate>>>>"+openingRate);
return openingRate;
}*/
public String getItemSerList(String itemser, Connection conn)
public String getItemSerList(String itemser, Connection conn) throws ITMException
{
String itemSerGrpValue="",itemSerSplit="",resultItemSer="";
PreparedStatement pstmt = null;
......@@ -716,6 +719,7 @@ public class CustStockGWTPostSave extends ValidatorEJB implements CustStockGWTPo
{
e.printStackTrace();
}
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
}
return resultItemSer;
}
......
......@@ -449,6 +449,7 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
}catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -2696,8 +2696,9 @@ implements CustomerLocal, CustomerRemote
* @param xtraParams
* @param dom
* @return
* @throws ITMException
*/
private StringBuffer setCustomerDefaultData( String custType, Connection conn, String xtraParams, Document dom )
private StringBuffer setCustomerDefaultData( String custType, Connection conn, String xtraParams, Document dom ) throws ITMException
{
String colName="";
String colValue="";
......@@ -2811,6 +2812,7 @@ implements CustomerLocal, CustomerRemote
catch(Exception e)
{
System.out.println("Customer.setCustomerDefaultData() "+ e.getStackTrace());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......@@ -2832,7 +2834,7 @@ implements CustomerLocal, CustomerRemote
//Added by AMEY on 24/09/2018 [start] to get data from supplier default master from cust_type
//changed by Pooja.S on[2-Nov-2018] to set the address anf fields by using Json Start
private HashMap<String, String> getAddressMap(String value )
private HashMap<String, String> getAddressMap(String value ) throws ITMException
{
HashMap<String, String> map=new HashMap();
try
......@@ -2910,11 +2912,12 @@ implements CustomerLocal, CustomerRemote
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return map;
}
private HashMap< String, String > getAddressDetailMap( org.json.simple.JSONArray adddrcomp, Connection conn )
private HashMap< String, String > getAddressDetailMap( org.json.simple.JSONArray adddrcomp, Connection conn ) throws ITMException
{
HashMap<String, String> map=new HashMap();
String keyaddr = "", valueaddr = "", longName = "";
......@@ -3013,6 +3016,7 @@ implements CustomerLocal, CustomerRemote
catch (Exception e)
{
System.out.println("Exception of the SetFields Method"+e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return map;
}
......@@ -3053,6 +3057,7 @@ implements CustomerLocal, CustomerRemote
e.printStackTrace();
throw new ITMException(e);
}
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -1153,6 +1153,7 @@ public class CustomerDefaultEJB extends ValidatorEJB implements CustomerDefaultR
e.printStackTrace();
throw new ITMException(e);
}
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -18,7 +18,7 @@ public class CustomerDetails extends ValidatorEJB
}
//Added by sarita on 02nd JAN 2018 to ser userInfo [end]
@SuppressWarnings({ "unchecked", "rawtypes" })
public ArrayList getCustomerDetails(String custCode)
public ArrayList getCustomerDetails(String custCode) throws ITMException
{
String sql = "";
Connection conn = null;
......@@ -206,6 +206,7 @@ public class CustomerDetails extends ValidatorEJB
{
System.out.println(" Exception in CustomerDetails.getCustomerDetails()["+e.getMessage()+"]");
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -374,6 +374,7 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust
catch(Exception e)
{
System.out.println("Exception : [Custitem][itemChanged( String, String )] :==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......@@ -488,7 +489,7 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust
return valueXmlString.toString();
}
private String errorType(Connection conn , String errorCode)
private String errorType(Connection conn , String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -507,6 +508,7 @@ public class CustomerItem extends ValidatorEJB implements CustomerItemLocal,Cust
catch(Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -525,6 +525,7 @@ public class CustomerMasterWfEJB extends ValidatorEJB implements CustomerMasterW
}
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
finally{
try {
......
......@@ -312,6 +312,7 @@ public class CustomerPriceList extends ValidatorEJB implements CustomerPriceList
catch(Exception e)
{
System.out.println("Exception : [TrainingEJB][itemChanged(String,String)] :==>\n"+e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......@@ -424,7 +425,7 @@ public class CustomerPriceList extends ValidatorEJB implements CustomerPriceList
return valueXmlString.toString();
} //END OF ITEMCHANGE
private String errorType( Connection conn , String errorCode )
private String errorType( Connection conn , String errorCode ) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -443,6 +444,7 @@ public class CustomerPriceList extends ValidatorEJB implements CustomerPriceList
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
......@@ -493,6 +493,7 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
catch(Exception e)
{
System.out.println("Exception : [CustomerSerCredit][itemChanged( String, String )] :==>\n" + e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
}
return valueXmlString;
}
......@@ -807,7 +808,7 @@ public class CustomerSerCredit extends ValidatorEJB implements CustomerSerCredit
return valueXmlString.toString();
}
private String errorType(Connection conn , String errorCode)
private String errorType(Connection conn , String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -826,6 +827,7 @@ private String errorType(Connection conn , String errorCode)
catch(Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 02/08/19
}
finally
{
......
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