Loading ...
Sorry, an error occurred while loading the content.
 

CreateMap error-Table not found

Expand Messages
  • affarimultilivello@yahoo.com
    This is my MAP file ______________________________________________
    Message 1 of 2 , Apr 9 8:28 AM
      This is my MAP file
      ______________________________________________
      <?xml version='1.0' ?>
      <!DOCTYPE XMLToDBMS SYSTEM "xmldbms.dtd" >
      <XMLToDBMS Version="1.0">
      <Options>
      </Options>
      <Maps>

      <IgnoreRoot>
      <ElementType Name="STATS"/>
      <PseudoRoot>
      <ElementType Name="AIR"/>

      </PseudoRoot>
      </IgnoreRoot>

      <ClassMap>
      <ElementType Name="AIR"/>
      <ToClassTable>
      <Table Name="AIR"/>
      </ToClassTable>

      <PropertyMap>
      <ElementType Name="AZIENDA"/>
      <ToColumn>
      <Column Name="AZIENDA"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="DATA"/>
      <ToColumn>
      <Column Name="DATA"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="PROGRESSIVO"/>
      <ToColumn>
      <Column Name="PROGRESSIVO"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="NR_HAWB"/>
      <ToColumn>
      <Column Name="NR_HAWB"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="NR_AWB"/>
      <ToColumn>
      <Column Name="NR_AWB"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="FLIGHT_DATE"/>
      <ToColumn>
      <Column Name="FLIGHT_DATE"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="LORDO_KOS"/>
      <ToColumn>
      <Column Name="LORDO_KOS"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="VOLUME"/>
      <ToColumn>
      <Column Name="VOLUME"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="COMMODITY_CODE"/>
      <ToColumn>
      <Column Name="COMMODITY_CODE"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="NEWPORTO_IMB_CODE"/>
      <ToColumn>
      <Column Name="PORTO_IMB_CODE"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="NEWPORTO_SBA_CODE"/>
      <ToColumn>
      <Column Name="PORTO_SBA_CODE"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="COD_UFFICIO"/>
      <ToColumn>
      <Column Name="COD_UFFICIO"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="UFFICIO_DESTIN"/>
      <ToColumn>
      <Column Name="UFFICIO_DESTIN"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="UFFICIO_DESTII"/>
      <ToColumn>
      <Column Name="UFFICIO_DESTII"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="UFFICIO_DESTIL"/>
      <ToColumn>
      <Column Name="UFFICIO_DESTIL"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="COD_CLIENTE"/>
      <ToColumn>
      <Column Name="COD_CLIENTE"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="CLI_FINALEN"/>
      <ToColumn>
      <Column Name="CLI_FINALEN"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="CLI_FINALEI"/>
      <ToColumn>
      <Column Name="CLI_FINALEI"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="CLI_FINALEL"/>
      <ToColumn>
      <Column Name="CLI_FINALEL"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="TIPO_RECORD"/>
      <ToColumn>
      <Column Name="TIPO_RECORD"/>
      </ToColumn>
      </PropertyMap>

      <PropertyMap>
      <ElementType Name="REPARTO"/>
      <ToColumn>
      <Column Name="REPARTO"/>
      </ToColumn>
      </PropertyMap>
      </ClassMap>

      </Maps>
      </XMLToDBMS>
      ______________________________________________

      while my DOM OBJECT contains exactly these values
      _____________________________________________________
      <STATS>
      <AIR>
      <DATA>20000811</DATA>
      <AZIENDA>74</AZIENDA>
      <PROGRESSIVO>3641</PROGRESSIVO>
      <NR_HAWB>00</NR_HAWB>
      <NR_AWB>055-2345345111</NR_AWB>
      <FLIGHT_DATE>20000813</FLIGHT_DATE>
      <LORDO_KOS>692.0</LORDO_KOS>
      <VOLUME>0.0</VOLUME>
      <PORTO_IMB_CODE>MXP</PORTO_IMB_CODE>
      <PORTO_SBA_CODE>4701</PORTO_SBA_CODE>
      <COD_CLIENTE>002547</COD_CLIENTE>
      <CLI_FINALEN>NEELLEN ER</CLI_FINALEN>
      <CLI_FINALEI>22 ITER STREET, 113</CLI_FINALEI>
      <CLI_FINALEL>DALLAS 10013</CLI_FINALEL>
      <COD_UFFICIO>001116</COD_UFFICIO>
      <UFFICIO_DESTIN>SAV PISA</UFFICIO_DESTIN>
      <UFFICIO_DESTII>VIA A. LERI, 44</UFFICIO_DESTII>
      <UFFICIO_DESTIL>PISA</UFFICIO_DESTIL>
      <REPARTO/>
      <COMMODITY_CODE/>
      <TIPO_RECORD/>
      <NEWPORTO_SBA_CODE>USJFK</NEWPORTO_SBA_CODE>
      </AIR>
      <AIR>
      <DATA>20010301</DATA>
      <AZIENDA>74</AZIENDA>
      <PROGRESSIVO>3642</PROGRESSIVO>
      <NR_HAWB>00</NR_HAWB>
      <NR_AWB>057-74455492</NR_AWB>
      <FLIGHT_DATE>000</FLIGHT_DATE>
      <LORDO_KOS>135.0</LORDO_KOS>
      <VOLUME>0.0</VOLUME>
      <PORTO_IMB_CODE/>
      <PORTO_SBA_CODE/>
      <COD_CLIENTE>000512</COD_CLIENTE>
      <CLI_FINALEN>GENESCO INC.</CLI_FINALEN>
      <CLI_FINALEI>GENESCO PARK, SUITE 660</CLI_FINALEI>
      <CLI_FINALEL>NASHVILLE - TN, 37202</CLI_FINALEL>
      <COD_UFFICIO>001117</COD_UFFICIO>
      <UFFICIO_DESTIN>SAV PORTUGUESA LTD</UFFICIO_DESTIN>
      <UFFICIO_DESTII>RUA DE XADRES, 1644-2 BRITOS</UFFICIO_DESTII>
      <UFFICIO_DESTIL>FRE 4460 PERAFITA</UFFICIO_DESTIL>
      <REPARTO/>
      <COMMODITY_CODE/>
      <TIPO_RECORD/>
      </AIR>
      </STATS>
      _______________________________________

      While the create table is this:
      stats=# CREATE TABLE AIR (AZIENDA varchar(3), DATA varchar(10),
      PROGRESSIVO varchar(7),NR_HAWB varchar(20), NR_AWB varchar(20),
      FLIGHT_DATE varchar(10), LORDO_KOS varchar(20), VOLUME varchar(20),
      COMMODITY_CODE varchar(10), PORTO_IMB_CODE varchar(5),PORTO_SBA_CODE
      varchar(5), COD_UFFICIO varchar(6), UFFICIO_DESTIN
      varchar(40),UFFICIO_DESTII varchar(40), UFFICIO_DESTIL varchar(40),
      COD_CLIENTE varchar(40),CLI_FINALEN varchar(40), CLI_FINALEI
      varchar(40), CLI_FINALEL varchar(40),REPARTO varchar(3), TIPO_RECORD
      varchar(3) );

      and the database is POSTGRES 7.0.2 under RedHat Linux 7.0



      During the execution of 'CreateMap' method I have this error

      de.tudarmstadt.ito.xmldbms.InvalidMapException: Table not found: AIR.
      Check that the table exists, that its name is spelled correctly, and
      that the case used in the map document exactly matches the case used
      in the database. This might be different from the case you used when
      creating the table.
      at
      de.tudarmstadt.ito.xmldbms.Map.addColumnMetadata(Map.java:1774)
      at
      de.tudarmstadt.ito.xmldbms.Map.getTableMetadata(Map.java:1613)
      at
      de.tudarmstadt.ito.xmldbms.Map.initColumnMetadata(Map.java:236)
      at
      de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory
      _MapDocument.createMap(MapFactory_MapDocument.java:339)
      at
      com.lulli.XMLtoDB.TransferBean.createMap(TransferBean.java:529)

      Database 'stats' is owned by user 'postgres' while I am executing my
      application as user 'root'

      Tips???
      Thks in advance
      Leonardo

      PS: The same 'MAP' file works great with IBM DB2 database!
    • Ronald Bourret
      This is a known problem with Postgres. For a workaround, see: http://groups.yahoo.com/group/xml-dbms/message/213 -- Ron
      Message 2 of 2 , Apr 12 12:13 PM
        This is a known problem with Postgres. For a workaround, see:

        http://groups.yahoo.com/group/xml-dbms/message/213

        -- Ron

        affarimultilivello@... wrote:
        > and the database is POSTGRES 7.0.2 under RedHat Linux 7.0
        >
        > During the execution of 'CreateMap' method I have this error
        >
        > de.tudarmstadt.ito.xmldbms.InvalidMapException: Table not found: AIR.
        > Check that the table exists, that its name is spelled correctly, and
        > that the case used in the map document exactly matches the case used
        > in the database. This might be different from the case you used when
        > creating the table.
        > at
        > de.tudarmstadt.ito.xmldbms.Map.addColumnMetadata(Map.java:1774)
        > at
        > de.tudarmstadt.ito.xmldbms.Map.getTableMetadata(Map.java:1613)
        > at
        > de.tudarmstadt.ito.xmldbms.Map.initColumnMetadata(Map.java:236)
        > at
        > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory
        > _MapDocument.createMap(MapFactory_MapDocument.java:339)
        > at
        > com.lulli.XMLtoDB.TransferBean.createMap(TransferBean.java:529)
        >
        > Database 'stats' is owned by user 'postgres' while I am executing my
        > application as user 'root'
      Your message has been successfully submitted and would be delivered to recipients shortly.