i've been working on this for the past 2 hours and can't seem to figure out where this exception is coming from. it is very intermitant.
i am calling the same method with the same customerID and it only throws an exception sometimes.
Quote:
|
getProducts() java.lang.NumberFormatException: multiple points
|
Code:
private static SimpleDateFormat formatDateOut = new SimpleDateFormat("yyyy-MM-dd");
...
public static ArrayList getProducts(String customerID){
ArrayList al = new ArrayList();
String sql = "SELECT SVPRID,SVMODN,SVSERL,SVPCHD,SVPSTR,SVPCTY,SVPSTA FROM MRKCPRD WHERE SVCUSN='" + customerID + "' AND SVSTAT='1'";
try{
Connection con = Pool.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(sql);
while(rs.next()){
Product prd = new Product();
prd.setProductID(rs.getInt("SVPRID"));
prd.setModelID(rs.getString("SVMODN"));
prd.setSerial(rs.getString("SVSERL"));
prd.setDatePurchased((Date)formatDateOut.parse(rs.getString("SVPCHD")));
prd.setStorePurchased(rs.getString("SVPSTR"));
prd.setCityPurchased(rs.getString("SVPCTY"));
prd.setStatePurchased(rs.getString("SVPSTA"));
al.add(prd);
}
con.close();
}catch(Exception e){
System.out.println("getProducts() " + e.toString());
}
return al;
} is there anything obviously wrong that might be throwing this exception?