Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
1.0 RC2
-
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(); }