Package com.celum.dbtool

Examples of com.celum.dbtool.DbException


        };

        try {
            stepEntryMethod.invoke(null, stepEntryArgs);
        } catch (IllegalAccessException e) {
            throw new DbException("error in dbmain() in class " + stepEntryMethod.getDeclaringClass().getName(), e.getCause());
        } catch (InvocationTargetException e) {
            throw new DbException("error in dbmain() in class " + stepEntryMethod.getDeclaringClass().getName(), e.getCause());
        } catch (Exception e) {
            throw new DbException("exception occured during dbmain() in class " + stepEntryMethod.getDeclaringClass().getName() + " execution.", e);
        }
    }
View Full Code Here


            context = new VelocityContext();
            for (Map.Entry<String, ?> e : values.entrySet()) {
                context.put(e.getKey(), e.getValue());
            }
        } catch (Exception e) {
            throw new DbException("Error in velocity interceptor:" + e.getMessage(), e);
        }
    }
View Full Code Here

            StringWriter sw = new StringWriter();
            engine.evaluate(context, sw, "sql", new StringReader(sql));
            sw.flush();
            return sw.toString();
        } catch (IOException e) {
            throw new DbException("Error in velocity decoration:" + e.getMessage());
        }
    }
View Full Code Here

            while (rs.next()) {
                rm.map(rs,rownum);
                rownum++;
            }
        } catch (SQLException e) {
            throw new DbException("SQL error:" + e.getMessage(), e);
        } finally {
            DbUtils.closeQuietly(rs);
            DbUtils.closeQuietly(stmt);
        }
    }
View Full Code Here

                return rs.getString(1);
            } else {
                return defaultValue;
            }
        } catch (SQLException e) {
            throw new DbException("SQL error:" + e.getMessage(), e);
        } finally {
            DbUtils.closeQuietly(rs);
            DbUtils.closeQuietly(stmt);
        }
    }
View Full Code Here

                return rs.getLong(1);
            } else {
                return defaultValue;
            }
        } catch (SQLException e) {
            throw new DbException("SQL error:" + e.getMessage(), e);
        } finally {
            DbUtils.closeQuietly(rs);
            DbUtils.closeQuietly(stmt);
        }
    }
View Full Code Here

                return rs.getBoolean(1);
            } else {
                return defaultValue;
            }
        } catch (SQLException e) {
            throw new DbException("SQL error:" + e.getMessage(), e);
        } finally {
            DbUtils.closeQuietly(rs);
            DbUtils.closeQuietly(stmt);
        }
    }
View Full Code Here

                }
            }

            return steps;
        } catch (Exception e) {
            throw new DbException("error loading steps from package " + pckgName, e);
        }
    }
View Full Code Here

                Method m = cls.getMethod("dbmain", Connection.class, Map.class);
                toList.add(new JavaStep(m, className, v));
            }

        } catch (ClassNotFoundException e) {
            throw new DbException("class not found:" + className);
        } catch (NoSuchMethodException e) {
            //if 'dbmain' is missing, the class is ignored
        }
        return toList;
    }
View Full Code Here

                executeViaExecutor(step);
                updateDbVersion(step);
            }
        } catch (Exception e) {
            eventListener.onError(step, e);
            throw new DbException("error in step " + step.getName() + ". See the problem below in caused exception. ", e);
        }
    }
View Full Code Here

TOP

Related Classes of com.celum.dbtool.DbException

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.