You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by akzylus <ak...@gmail.com> on 2011/05/25 11:15:05 UTC

Converting xls to xlsx and XmlValueDisconnectedException on WebLogic 9.2.3 (poi 3.7)

Hello. 
I need to update reports in my project from old xls to xlsx. All files xls
are only layout. To create this xls reports we used POI lib (3.0). Because
there is no simple way to convert old xls file to xlsx I created own
converter which working fine for some simple reports. My converter basing on
XSSFWorkbook class (POI 3.7). How it’s all work 
1. All xls file was opened in MS Office 2010 and saved as xlsx 
2. Converter read xlsx file, to do this I used “XSSFWorkbook” class (and
standard java InputStream). 
3. Converter iterates all rows and cells and put correct value to correct
cells. 
4. Saving object XSSFWorkbook as a new xlsx doc. 
All this working joust fine in my stand alone test but my project working on
WebLogic 9.2.3 and unfortunately I’m getting error in place where converter
start iterating cells and reading value (exception appear when I'm calling
toString on first cell).
The error is:

org.apache.xmlbeans.impl.values.XmlValueDisconnectedException
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.check_orphaned(XmlObjectBase.java:1213)
        at
org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTCellImpl.getF(Unknown
Source)
        at
org.apache.poi.xssf.usermodel.XSSFCell.getCellType(XSSFCell.java:454)
        at
org.apache.poi.xssf.usermodel.XSSFCell.toString(XSSFCell.java:708)



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Converting-xls-to-xlsx-and-XmlValueDisconnectedException-on-WebLogic-9-2-3-poi-3-7-tp4424712p4424712.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Converting xls to xlsx and XmlValueDisconnectedException on WebLogic 9.2.3 (poi 3.7)

Posted by akzylus <ak...@gmail.com>.
The exception appearing because or I should say when I using clone method. I
have something like this in my loop iterating sheets
sheet = workbook.getSheetAt(i);
sheetTmp = workbook.cloneSheet(i);

I wont to have one clear not changed sheet for reading data like formula
which will by lost(overreaded) on original sheet.

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Converting-xls-to-xlsx-and-XmlValueDisconnectedException-on-WebLogic-9-2-3-poi-3-7-tp4424712p4425108.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Converting xls to xlsx and XmlValueDisconnectedException on WebLogic 9.2.3 (poi 3.7)

Posted by akzylus <ak...@gmail.com>.
I joust replaced in my test xmlbeans-2.3.0.jar by “apache_xbean.jar” and
“com.bea.core.xml.xmlbeans_2.2.0.0.jar” my WebLogic 9.2.3 have two versions
of xmlbeans.jar and test still working (xlsx file is creating correctly).
Other files:
- ooxml-schemas-1.1.jar
- poi-3.7.jar
- poi-ooxml-3.7-20101029.jar
going with my project ear (I checked WebLogic doesn't have own version of
this lib).


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Converting-xls-to-xlsx-and-XmlValueDisconnectedException-on-WebLogic-9-2-3-poi-3-7-tp4424712p4424783.html
Sent from the POI - User mailing list archive at Nabble.com.

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


Re: Converting xls to xlsx and XmlValueDisconnectedException on WebLogic 9.2.3 (poi 3.7)

Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 25 May 2011, akzylus wrote:
> All this working joust fine in my stand alone test but my project 
> working on WebLogic 9.2.3 and unfortunately I’m getting error in place 
> where converter start iterating cells and reading value (exception 
> appear when I'm calling toString on first cell).

I'd check what jars you have on your production server? Do you have the 
right version of POI? Do you have a new enough copy of xmlbeans? Have 
ensured you don't have multiple copies of any of these?

Nick