Package com.celum.dbtool

Examples of com.celum.dbtool.DbException


            if (executor.getType() == type) {
                executor.execute(step);
                return;
            }
        }
        throw new DbException("Unsupported type:" + type.toString() + ". No Executor for this type.");
    }
View Full Code Here


        };

        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

                }
            }

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

                Method m = cls.getMethod("dbmain", DataSource.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

            if (executor.getType() == type) {
                executor.execute(step);
                return;
            }
        }
        throw new DbException("Unsupported type:" + type.toString() + ". No Executor for this type.");
    }
View Full Code Here

            context = new VelocityContext();
            for (Map.Entry<String, Object> e : values.entrySet()) {
                context.put(e.getKey(), e.getValue());
            }
        } catch (Exception e) {
            throw new DbException("Error in velocity decorator:" + 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

    }

    @Override
    public void onError(DbScript script, Throwable e)
    {
        throw new DbException("error in script " + script.getName() + ": " + e.getMessage(), e);
    }
View Full Code Here

            }

            Collections.sort(scripts);
            return scripts;
        } catch (Exception e) {
            throw new DbException("error loading scripts from package " + pckgName, 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.