[ 
https://issues.apache.org/jira/browse/DDLUTILS-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Dudziak resolved DDLUTILS-179.
-------------------------------------

    Resolution: Cannot Reproduce

This works fine in the current trunk (as shown by the unit test that I added), 
which however could be because the complete IO has been rewritten using StAX.

> Output trunked when using the method write(Database, OutputStream) of 
> DatabaseIO
> --------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-179
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-179
>             Project: DdlUtils
>          Issue Type: Bug
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04, Sun Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>            Priority: Minor
>             Fix For: 1.1
>
>
> 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();
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to