Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-179

Output trunked when using the method write(Database, OutputStream) of DatabaseIO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • 1.0 RC2
    • 1.1
    • None
    • None
    • PostgreSQL 8.2 on Ubuntu 7.04, Sun Java 6.

    Description

      The output is trunked when executing Output trunked when using the method write(Database, OutputStream), the last lines of the XML database model are lost.

      This problem can be easily avoided using the method write(Database, Writer) instead write(Database, OutputStream).

      The java code executed is:

      BasicDataSource ds = new BasicDataSource();
      ds.setDriverClassName("org.postgresql.Driver");
      ds.setUrl("jdbc:postgresql://localhost:5432/ddlutilstest");
      ds.setUsername("tad");
      ds.setPassword("tad");

      try

      { Platform platform = PlatformFactory.createNewPlatformInstance(ds); Database db = platform.readModelFromDatabase("model"); OutputStream out = new FileOutputStream(new File("/home/adrian/openbravo-ddlutils-tests-2.xml")); new DatabaseIO().write(db, out); out.flush(); out.close(); }

      catch (Exception e)

      { e.printStackTrace(); }

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            adrianopenbravo Adrián Romero
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: