Package org.dbunit.dataset.datatype

Examples of org.dbunit.dataset.datatype.TypeCastException


        catch (SQLException e)
        {
            // JH_TODO: shouldn't freeTemporary be called in finally {} ?
            // It wasn't done like that in the original reflection-styled DbUnit code.
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }
        catch (IOException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }

        return tempBlob;
    }
View Full Code Here


        {
            tempBlob.freeTemporary();
        }
        catch (SQLException e)
        {
            throw new TypeCastException("Error freeing Oracle BLOB", e);
        }
    }
View Full Code Here

                                  statement.addValue(table.getValue(row,
                                          column.getColumnName()), column.getDataType());
                }
                                catch (TypeCastException e)
                {
                          throw new TypeCastException("Error casting value for table '" + table.getTableMetaData().getTableName()
                              +"' and column '" + column.getColumnName() + "'", e);
                }
                            }
                        }
                        statement.addBatch();
View Full Code Here

            closeMethod.invoke(tempClob, new Object[0]);
        }
        catch (IllegalAccessException e)
        {
            freeTemporaryClob(tempClob);
            throw new TypeCastException(value, this, e);
        }
        catch (NoSuchMethodException e)
        {
            freeTemporaryClob(tempClob);
            throw new TypeCastException(value, this, e);
        }
        catch (IOException e)
        {
            freeTemporaryClob(tempClob);
            throw new TypeCastException(value, this, e);
        }
        catch (InvocationTargetException e)
        {
            freeTemporaryClob(tempClob);
            throw new TypeCastException(value, this, e.getTargetException());
        }
        catch (ClassNotFoundException e)
        {
            freeTemporaryClob(tempClob);
            throw new TypeCastException(value, this, e);
        }

        return tempClob;
    }
View Full Code Here

            Method freeTemporaryMethod = tempClob.getClass().getMethod("freeTemporary", new Class[0]);
            freeTemporaryMethod.invoke(tempClob, new Object[0]);
        }
        catch (NoSuchMethodException e)
        {
            throw new TypeCastException("Error freeing Oracle CLOB", e);
        }
        catch (IllegalAccessException e)
        {
            throw new TypeCastException("Error freeing Oracle CLOB", e);
        }
        catch (InvocationTargetException e)
        {
            throw new TypeCastException("Error freeing Oracle CLOB", e.getTargetException());
        }
    }
View Full Code Here

            closeMethod.invoke(tempBlob, new Object[0]);
        }
        catch (IllegalAccessException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }
        catch (NoSuchMethodException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }
        catch (IOException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }
        catch (InvocationTargetException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }
        catch (ClassNotFoundException e)
        {
            freeTemporaryBlob(tempBlob);
            throw new TypeCastException(value, this, e);
        }

        return tempBlob;
    }
View Full Code Here

            Method freeTemporaryMethod = tempBlob.getClass().getMethod("freeTemporary", new Class[0]);
            freeTemporaryMethod.invoke(tempBlob, new Object[0]);
        }
        catch (NoSuchMethodException e)
        {
            throw new TypeCastException("Error freeing Oracle BLOB", e);
        }
        catch (IllegalAccessException e)
        {
            throw new TypeCastException("Error freeing Oracle BLOB", e);
        }
        catch (InvocationTargetException e)
        {
            throw new TypeCastException("Error freeing Oracle BLOB", e.getTargetException());
        }
    }
View Full Code Here

            Method formOfUse = statementClass.getMethod("setFormOfUse", new Class[] { Integer.TYPE, Short.TYPE });
            formOfUse.invoke(statement, new Object[] { new Integer(column), FORM_NCHAR });
        }
        catch (IllegalAccessException e)
        {
            throw new TypeCastException(value, this, e);
        }
        catch (NoSuchMethodException e)
        {
            throw new TypeCastException(value, this, e);
        }
        catch (InvocationTargetException e)
        {
            throw new TypeCastException(value, this, e.getTargetException());
        }
        catch (ClassNotFoundException e)
        {
            throw new TypeCastException(value, this, e);
        }
       
        statement.setObject(column, getClob(value, statement.getConnection()));
    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.datatype.TypeCastException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.