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 2003/02/10 12:30:08 UTC
DO NOT REPLY [Bug 16926] New: -
Single row created on tomcat server
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16926>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16926
Single row created on tomcat server
Summary: Single row created on tomcat server
Product: POI
Version: 1.5.1
Platform: PC
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Major
Priority: Other
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: david.bernier@unilog.fr
Hi,
i use cocoon to export xml data to xls spreadsheet. In order to, i use the
HSSFSerializer to serialize the xml stream. If i test my export on websphere
server, it's work fine but on tomcat there is only one row created (the last
one). Furthemore, if i use an another serializer (like XMLSerializer) on tomcat,
it's work fine. So i don't know if it's a problem with an incompatibility of
jars between the xls serializer and the libs of tomcat or it's a cocoon's
problem or anything else...
This is my xml file :
<?xml version="1.0" encoding="iso-8859-1"?>
<RowSet>
<properties>
<command>0</command>
<concurrency>1007</concurrency>
<datasource>0</datasource>
<escape-processing>true</escape-processing>
<fetch-direction>0</fetch-direction>
<fetch-size>0</fetch-size>
<isolation-level>2</isolation-level>
<key-columns>
</key-columns>
<map></map>
<max-field-size>0</max-field-size>
<max-rows>0</max-rows>
<query-timeout>0</query-timeout>
<read-only>true</read-only>
<rowset-type>1004</rowset-type>
<show-deleted>false</show-deleted>
<table-name>0</table-name>
<url>0</url>
</properties>
<metadata>
<column-count>10</column-count>
<column-definition>
<column-index>1</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>false</case-sensitive>
<currency>true</currency>
<nullable>0</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>21</column-display-size>
<column-label>DEMANDE_CODE</column-label>
<column-name>DEMANDE_CODE</column-name>
<schema-name></schema-name>
<column-precision>8</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>2</column-type>
<column-type-name>NUMBER</column-type-name>
</column-definition>
<column-definition>
<column-index>2</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>false</case-sensitive>
<currency>true</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>21</column-display-size>
<column-label>DEMANDE_MILLESIME</column-label>
<column-name>DEMANDE_MILLESIME</column-name>
<schema-name></schema-name>
<column-precision>4</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>2</column-type>
<column-type-name>NUMBER</column-type-name>
</column-definition>
<column-definition>
<column-index>3</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>20</column-display-size>
<column-label>DEMANDE_CODEXT</column-label>
<column-name>DEMANDE_CODEXT</column-name>
<schema-name></schema-name>
<column-precision>20</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>4</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>30</column-display-size>
<column-label>TYPDEM_LIB</column-label>
<column-name>TYPDEM_LIB</column-name>
<schema-name></schema-name>
<column-precision>30</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>5</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>30</column-display-size>
<column-label>TIERS_LIB</column-label>
<column-name>TIERS_LIB</column-name>
<schema-name></schema-name>
<column-precision>30</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>6</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>30</column-display-size>
<column-label>CDR_LIB</column-label>
<column-name>CDR_LIB</column-name>
<schema-name></schema-name>
<column-precision>30</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>7</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>0</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>30</column-display-size>
<column-label>ETAT</column-label>
<column-name>ETAT</column-name>
<schema-name></schema-name>
<column-precision>30</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>8</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>true</case-sensitive>
<currency>false</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>3</column-display-size>
<column-label>COMPLET</column-label>
<column-name>COMPLET</column-name>
<schema-name></schema-name>
<column-precision>3</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>12</column-type>
<column-type-name>VARCHAR2</column-type-name>
</column-definition>
<column-definition>
<column-index>9</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>false</case-sensitive>
<currency>true</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>21</column-display-size>
<column-label>TIERS_CODE</column-label>
<column-name>TIERS_CODE</column-name>
<schema-name></schema-name>
<column-precision>8</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>2</column-type>
<column-type-name>NUMBER</column-type-name>
</column-definition>
<column-definition>
<column-index>10</column-index>
<auto-increment>false</auto-increment>
<case-sensitive>false</case-sensitive>
<currency>true</currency>
<nullable>1</nullable>
<signed>true</signed>
<searchable>true</searchable>
<column-display-size>21</column-display-size>
<column-label>LOTDEM_CODE</column-label>
<column-name>LOTDEM_CODE</column-name>
<schema-name></schema-name>
<column-precision>8</column-precision>
<column-scale>0</column-scale>
<table-name></table-name>
<catalog-name></catalog-name>
<column-type>2</column-type>
<column-type-name>NUMBER</column-type-name>
</column-definition>
</metadata>
<data>
<row>
<col>1</col>
<col>2003</col>
<col>APA-Dupont</col>
<col>Test CGIS - Type de demande 1</col>
<col>TRESORIER CAJARC</col>
<col>Dept. des routes (exe)</col>
<col>Sold�e</col>
<col>Non</col>
<col>15</col>
<col>66</col>
</row>
<row>
<col>2</col>
<col>2003</col>
<col>APA-Durand</col>
<col>Aide principale</col>
<col>MARS</col>
<col>Fonctions de bases 1 (exe)</col>
<col>Enregistr�e</col>
<col>Non</col>
<col>1498</col>
<col>0</col>
</row>
</data>
</RowSet>
And this is my XSL stylesheet :
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gmr="http://www.gnome.org/gnumeric/v7" >
<xsl:output method="xml"
version="4.0"
doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"
encoding="iso-8859-1"
indent="yes"/>
<xsl:template match="RowSet">
<gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/v7">
<gmr:Sheets>
<xsl:call-template name="worksheet1" />
<xsl:call-template name="worksheet2" />
</gmr:Sheets>
</gmr:Workbook>
</xsl:template>
<xsl:template name="WorkbookAttributes">
<gmr:Attributes>
<gmr:Attribute>
<gmr:name>WorkbookView::show_horizontal_scrollbar</gmr:name>
<gmr:type>4</gmr:type>
<gmr:value>TRUE</gmr:value>
</gmr:Attribute>
<gmr:Attribute>
<gmr:name>WorkbookView::show_vertical_scrollbar</gmr:name>
<gmr:type>4</gmr:type>
<gmr:value>TRUE</gmr:value>
</gmr:Attribute>
<gmr:Attribute>
<gmr:name>WorkbookView::show_notebook_tabs</gmr:name>
<gmr:type>4</gmr:type>
<gmr:value>TRUE</gmr:value>
</gmr:Attribute>
</gmr:Attributes>
</xsl:template>
<xsl:template name="DocumentProperties">
<gmr:Summary>
<gmr:Item>
<gmr:name>codepage</gmr:name>
<gmr:val-string>1252</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>last_saved</gmr:name>
<gmr:val-string/>
</gmr:Item>
<gmr:Item>
<gmr:name>created</gmr:name>
<gmr:val-string/>
</gmr:Item>
<gmr:Item>
<gmr:name>security</gmr:name>
<gmr:val-int>0</gmr:val-int>
</gmr:Item>
<gmr:Item>
<gmr:name>thumbnail_scaling</gmr:name>
<gmr:val-string>False</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>links_uptodate</gmr:name>
<gmr:val-string>False</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>last_author</gmr:name>
<gmr:val-string>Unilog IT Service GDA</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>application</gmr:name>
<gmr:val-string>Microsoft Excel</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>author</gmr:name>
<gmr:val-string>Unilog IT Service Grand Angle</gmr:val-string>
</gmr:Item>
<gmr:Item>
<gmr:name>company</gmr:name>
<gmr:val-string>Unilog Grand Angle</gmr:val-string>
</gmr:Item>
</gmr:Summary>
</xsl:template>
<xsl:template name="worksheet2">
<gmr:Sheet DisplayFormulas="false" HideZero="false" HideGrid="false"
HideColHeader="false" HideRowHeader="false" DisplayOutlines="true"
OutlineSymbolsBelow="true" OutlineSymbolsRight="true">
<gmr:Name>Feuille supplementaire</gmr:Name>
<xsl:call-template name="ColsInfo" />
<xsl:call-template name="RowsInfo" />
<xsl:call-template name="SelectionInfo" />
<xsl:call-template name="ObjectsInfo" />
<gmr:Cells>
<gmr:Cell Col="0" Row="0" ValueType="60">
<gmr:Content><null/></gmr:Content>
</gmr:Cell>
</gmr:Cells>
</gmr:Sheet>
</xsl:template>
<xsl:template name="worksheet1">
<gmr:Sheet DisplayFormulas="false" HideZero="false" HideGrid="false"
HideColHeader="false" HideRowHeader="false" DisplayOutlines="true"
OutlineSymbolsBelow="true" OutlineSymbolsRight="true">
<gmr:Name>Donnees Exportees</gmr:Name>
<xsl:call-template name="ColsInfo" />
<xsl:call-template name="RowsInfo" />
<xsl:call-template name="SelectionInfo" />
<xsl:call-template name="ObjectsInfo" />
<xsl:call-template name="Cells"/>
</gmr:Sheet>
</xsl:template>
<xsl:template name="ColsInfo">
<gmr:Cols DefaultSizePts="60">
<gmr:ColInfo No="0" Unit="78.8" MarginA="2" MarginB="2" HardSize="1"/>
</gmr:Cols>
</xsl:template>
<xsl:template name="RowsInfo">
<gmr:Rows DefaultSizePts="12.8">
<gmr:RowInfo No="0" Unit="17.2" MarginA="0" MarginB="0" HardSize="1"
Count="13"/>
</gmr:Rows>
</xsl:template>
<xsl:template name="SelectionInfo">
<gmr:Selections CursorCol="1" CursorRow="1">
<gmr:Selection startCol="1" startRow="1" endCol="1" endRow="1"/>
</gmr:Selections>
</xsl:template>
<xsl:template name="ObjectsInfo">
<gmr:Objects>
<gmr:SheetObjectFilled />
</gmr:Objects>
</xsl:template>
<xsl:template name="Cells">
<gmr:Cells>
<xsl:apply-templates select="metadata"/>
<xsl:apply-templates select="data"/>
</gmr:Cells>
</xsl:template>
<xsl:template match="metadata">
<xsl:apply-templates select="column-definition"/>
</xsl:template>
<xsl:template match="column-definition">
<xsl:variable name="cpt" select="position()-1"/>
<gmr:Cell Col="{$cpt}" Row="0" ValueType="60">
<gmr:Content><xsl:value-of select="column-label"/></gmr:Content>
</gmr:Cell>
</xsl:template>
<xsl:template match="data">
<xsl:for-each select="row">
<xsl:apply-templates select="col">
<xsl:with-param name="numRow" select="position()" />
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="col">
<xsl:param name="numRow"/>
<xsl:variable name="cpt" select="position()-1"/>
<gmr:Cell Col="{$cpt}" Row="{$numRow}" >
<xsl:call-template name="type"/>
<gmr:Content><xsl:value-of select="."/></gmr:Content>
</gmr:Cell>
</xsl:template>
<xsl:template name="styles">
</xsl:template>
<xsl:template name="type">
<xsl:variable name="cpteur" select="position()"/>
<xsl:variable name="type"
select="//metadata/column-definition[$cpteur]/column-type" />
<xsl:choose>
<!-- Nombres : Mysql 2 == DECIMAL
Oracle 3 == Number -->
<xsl:when test="$type=2 or $type=3">
<xsl:attribute name="ValueType">40</xsl:attribute>
</xsl:when>
<!-- Date : Mysql 91
Oracle 93 -->
<xsl:when test="$type=91 or $type=93">
<!-- <xsl:attribute name="ss:Type">DateTime</xsl:attribute> -->
<xsl:attribute name="ValueType">60</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="ValueType">60</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Please help.