This is my method ... which give me this message :
exception occured at the DAO Layer Exception class is java.lang.ArrayIndexOutOfBoundsException error message is 1


Now this is driving me nuts since it works fine on my WSAD but once I put it in the integration environment of Websphere I get an exception on the line :

PropertyUtils.copyProperties(newRow,oldRow);


Can anyone help me since I am really stuck with this :


thanx in advance,


BP

public static Collection invokeCollectionResultSetWrapper(ResultSet rs,String fullyQualifiedCollectionName,String nameTOObject) throws SQLException{
System.out.println("Debugging the SOB issue.In the Method Invoke Collection ResultSetWrapper");
System.out.println("Debugging the SOB issue.fullyQualifiedCollectionName " + fullyQualifiedCollectionName);
System.out.println("Debugging the SOB issue.nameTOObject " + nameTOObject);


if(fullyQualifiedCollectionName == null || nameTOObject == null){
throw new IllegalArgumentException("Illegal Parameters Passed to the function");
}


Collection obj = null;
try{
obj = (Collection)Class.forName(fullyQualifiedCollectionName).newInstance();
ResultSetDynaClass rsdc = new ResultSetDynaClass(rs,false);


                        DynaProperty [] prop = rsdc.getDynaProperties();
                        for(int i=0;i<prop.length;i++){
                                DynaProperty pro = prop[i];
                                System.out.println("Property " + pro.getName());
                        }

Iterator rows = rsdc.iterator();
BasicDynaClass bdc = new BasicDynaClass(nameTOObject,SOBBasicDynaBean.class,rsdc.getDynaProperties());
System.out.println(obj.size());
while(rows.hasNext()){
DynaBean oldRow = (DynaBean)rows.next();
System.out.println("OLDROW " + oldRow);
DynaBean newRow = bdc.newInstance();
System.out.println("NEWROW " + newRow);
PropertyUtils.copyProperties(newRow,oldRow);
System.out.println("Adding new row " + obj.size() );
obj.add(newRow);
}
}catch(SQLException ex){
throw new SQLException("SQLException " + ex.getMessage());
}catch(IllegalAccessException ex){
throw new SQLException("IllegalAccessException " + ex.getMessage());
}catch(InstantiationException ex){
throw new SQLException("InstantiationException " + ex.getMessage());
}catch(ClassNotFoundException ex){
throw new SQLException("ClassNotFoundException " + ex.getMessage());
}catch(InvocationTargetException ex){
throw new SQLException("InvocationTargetException " + ex.getMessage());
}catch(NoSuchMethodException ex){
throw new SQLException("NoSuchMethodException " +ex.getMessage());
}catch(Exception ex){
throw new SQLException("Exception class is " + ex.getClass().getName() + " error message is " + ex.getMessage());
}
return obj;
}


_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar � get it now! http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to