You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/01/07 07:48:18 UTC

[Bug 49940] Sometimes writing twice to a .xlsx file throws org.apache.xmlbeans.impl.values.XmlValueDisconnectedException

https://bz.apache.org/bugzilla/show_bug.cgi?id=49940

--- Comment #23 from Avik Dey <de...@gmail.com> ---
I have created an object of the Xls_Reader only once, and saved it at the last,
still I got the exception...

I am creating a .xlsx file every time I am trying to write with date and time
stamp.

Still I have encountered the error.

I am not using the same file to write twice into...

ERROR
=======

org.apache.xmlbeans.impl.values.XmlValueDisconnectedException
    at
org.apache.xmlbeans.impl.values.XmlObjectBase.check_orphaned(XmlObjectBase.java:1244)
    at
org.apache.xmlbeans.impl.values.XmlObjectBase.newCursor(XmlObjectBase.java:272)
    at
org.apache.xmlbeans.impl.values.XmlComplexContentImpl.arraySetterHelper(XmlComplexContentImpl.java:1073)
    at
org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTFontsImpl.setFontArray(Unknown
Source)
    at org.apache.poi.xssf.model.StylesTable.writeTo(StylesTable.java:319)
    at org.apache.poi.xssf.model.StylesTable.commit(StylesTable.java:377)
    at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:177)
    at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:181)
    at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:214)
    at com.soapuitutorial.util.Xls_Reader.save(Xls_Reader.java:547)
    at
com.soapuitutorial.script.ProjectTestRunner.main(ProjectTestRunner.java:73)


CODE - save()
==============

public void save(){
        try{
        fileOut = new FileOutputStream(path);

        workbook.write(fileOut);
        //fileOut.flush();
        fileOut.close();
        fileOut=null;
        }catch(Exception e){
            e.printStackTrace();
        }
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org