Package org.apache.ddlutils

Examples of org.apache.ddlutils.DatabaseOperationException


                          " but changed " + count + " row(s).");
            }
        }
        catch (SQLException ex)
        {
            throw new DatabaseOperationException("Error while deleting from the database", ex);
        }
        finally
        {
            closeStatement(statement);
        }
View Full Code Here


            postprocessModelFromDatabase(model);
            return model;
        }
        catch (SQLException ex)
        {
            throw new DatabaseOperationException(ex);
        }
    }
View Full Code Here

            }
            return model;
        }
        catch (SQLException ex)
        {
            throw new DatabaseOperationException(ex);
        }
    }
View Full Code Here

      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
  }
View Full Code Here

              .getValue());
        }
      }
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
    String databaseName = null;
    _databaseName = null;       
    try
    {
      databaseName = (String) parameters.get(DATASOURCE_DATABASENAME);
      if (databaseName != null)
      {
        platform = PlatformFactory.createNewPlatformInstance(databaseName);
        if (platform != null)
          _databaseName = databaseName;
      }
    } catch (Exception ex)
    {
      log.warn("Exception in trying to establish connection to " + databaseName + " : " + ex.getLocalizedMessage());
      log.warn(ex);
    }
    if (_databaseName == null)
    {
      _databaseName = new PlatformUtils().determineDatabaseType(dataSource);
      if (_databaseName == null)
      {
        throw new DatabaseOperationException(
          "Could not determine platform from datasource, please specify it in the jdbc.properties via the ddlutils.platform property");
      }
      else
      {
        try
        {
          platform = PlatformFactory.createNewPlatformInstance(_databaseName);
        } catch (Exception ex)
        {
          throw new DatabaseOperationException(
          "Could not establish connection to " + _databaseName + " : " + ex.getLocalizedMessage(),ex);
        }
      }
    }
//    com.mysql.jdbc.Driver
View Full Code Here

      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
  }
View Full Code Here

      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
  }
View Full Code Here

              .getValue());
        }
      }
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
    String databaseName = null;
    _databaseName = null;       
    try
    {
      databaseName = (String) parameters.get(DATASOURCE_DATABASENAME);
      if (databaseName != null)
      {
        platform = PlatformFactory.createNewPlatformInstance(databaseName);
        if (platform != null)
          _databaseName = databaseName;
      }
    } catch (Exception ex)
    {
      log.warn("Exception in trying to establish connection to " + databaseName + " : " + ex.getLocalizedMessage());
      log.warn(ex);
    }
    if (_databaseName == null)
    {
      _databaseName = new PlatformUtils().determineDatabaseType(dataSource);
      if (_databaseName == null)
      {
        throw new DatabaseOperationException(
          "Could not determine platform from datasource, please specify it in the jdbc.properties via the ddlutils.platform property");
      }
      else
      {
        try
        {
          platform = PlatformFactory.createNewPlatformInstance(_databaseName);
        } catch (Exception ex)
        {
          throw new DatabaseOperationException(
          "Could not establish connection to " + _databaseName + " : " + ex.getLocalizedMessage(),ex);
        }
      }
    }
//    com.mysql.jdbc.Driver
View Full Code Here

      dataReader.setSink(new DataToDatabaseSink(platform, model));
      dataReader.parse(new StringReader(dataXml));
      return model;
    } catch (Exception ex)
    {
      throw new DatabaseOperationException(ex);
    }
  }
View Full Code Here

                        );
                    }
                }
        );
        if ( !success ) {
            throw new DatabaseOperationException("Failed to create tables.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ddlutils.DatabaseOperationException

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.