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

URGENT-InvalidMapException

Expand Messages
  • debaditya4u
    Hi, I m new to XML DBMS. I m doing a project on data migration from Access(Windows XP) to MySql(in Linux box). I plan to convert the data into XML format and
    Message 1 of 2 , Nov 22, 2002
      Hi,
      I'm new to XML DBMS. I'm doing a project on data migration from
      Access(Windows XP) to MySql(in Linux box). I plan to convert the
      data into XML format and then ftp the XML files across the network.

      To test the functionality, I tried a simple example. I've a
      database of a single table with just two fields :

      Table Name : Emp
      Columns: EmpID, Name

      When using TransferResultSet I'm getting the following errors :

      C:\Java\xmldbms101\samples>java TransferResultSet -t Emp emp.map
      emp1.xml
      de.tudarmstadt.ito.xmldbms.InvalidMapException: \C:\Java\xmldbms101
      \samples\emp1.map
      at
      de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.create
      Map(MapFactory_MapDocument.java:331)
      at TransferResultSet.createMap(TransferResultSet.java:171)
      at TransferResultSet.toXML(TransferResultSet.java:138)
      at TransferResultSet.main(TransferResultSet.java:106)


      My emp.map file is as follows :
      <?xml version="1.0" ?>
      <!DOCTYPE XMLToDBMS SYSTEM "..\xmldbms.dtd">
      <XMLToDBMS Version="1.0">
      <Options>
      </Options>
      <Maps>
      <ClassMap>
      <ElementType Name="Employee"/>
      <ToRootTable>
      <Table Name="Result Set"/>
      <CandidateKey Generate="No">
      <Column Name="EmpID"/>
      </CandidateKey>
      </ToRootTable>

      <PropertyMap>
      <Attribute Name="EmployeeID"/>
      <ToColumn>
      <Column Name="EmpID"/>
      </ToColumn>
      </PropertyMap>

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

      </ClassMap>
      </Maps>
      </XMLToDBMS>


      Please help me in resolving this problem. I have to finish of this
      project very soon, so I'll really appreciate if you please post your
      contributions as soon as possible.

      thanks,
      Deb
    • Ronald Bourret
      I m not sure what is causing this error. However, the error refers to emp1.map, which is not in your command. Therefore, my first guess is that you really
      Message 2 of 2 , Nov 26, 2002
        I'm not sure what is causing this error. However, the error refers to
        emp1.map, which is not in your command. Therefore, my first guess is
        that you really typed:

        java TransferResultSet -t Emp emp1.map emp1.xml

        not

        java TransferResultSet -t Emp emp.map emp1.xml

        If this is not the case, then I will guess that the error message (which
        is not useful), is coming from the parser and is being truncated when it
        is converted to an InvalidMapException. To check if this is the case,
        modify the code in MapFactory_MapDocument.createMap(InputSource) to
        print out the full contents of any exceptions that are caught.

        Your map file looks correct.

        -- Ron


        debaditya4u wrote:

        > To test the functionality, I tried a simple example. I've a
        > database of a single table with just two fields :
        >
        > Table Name : Emp
        > Columns: EmpID, Name
        >
        > When using TransferResultSet I'm getting the following errors :
        >
        > C:\Java\xmldbms101\samples>java TransferResultSet -t Emp emp.map
        > emp1.xml
        > de.tudarmstadt.ito.xmldbms.InvalidMapException: \C:\Java\xmldbms101
        > \samples\emp1.map
        > at
        > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_MapDocument.create
        > Map(MapFactory_MapDocument.java:331)
        > at TransferResultSet.createMap(TransferResultSet.java:171)
        > at TransferResultSet.toXML(TransferResultSet.java:138)
        > at TransferResultSet.main(TransferResultSet.java:106)
        >
        > My emp.map file is as follows :
        > <?xml version="1.0" ?>
        > <!DOCTYPE XMLToDBMS SYSTEM "..\xmldbms.dtd">
        > <XMLToDBMS Version="1.0">
        > <Options>
        > </Options>
        > <Maps>
        > <ClassMap>
        > <ElementType Name="Employee"/>
        > <ToRootTable>
        > <Table Name="Result Set"/>
        > <CandidateKey Generate="No">
        > <Column Name="EmpID"/>
        > </CandidateKey>
        > </ToRootTable>
        >
        > <PropertyMap>
        > <Attribute Name="EmployeeID"/>
        > <ToColumn>
        > <Column Name="EmpID"/>
        > </ToColumn>
        > </PropertyMap>
        >
        > <PropertyMap>
        > <ElementType Name="EmployeeName"/>
        > <ToColumn>
        > <Column Name="Name"/>
        > </ToColumn>
        > </PropertyMap>
        >
        > </ClassMap>
        > </Maps>
        > </XMLToDBMS>
        >
        > Please help me in resolving this problem. I have to finish of this
        > project very soon, so I'll really appreciate if you please post your
        > contributions as soon as possible.
      Your message has been successfully submitted and would be delivered to recipients shortly.