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

RE: [xml-dbms] Generate Map error

Expand Messages
  • Khan, Terrick
    Well, I took out Hut but now I m getting the following error which I believe is because there is not place to specify a password in the ODBC Data Source dialog
    Message 1 of 5 , Sep 15 1:47 PM
    • 0 Attachment
      Well, I took out Hut but now I'm getting the following error which I believe
      is
      because there is not place to specify a password in the ODBC Data Source
      dialog box
      and Oracle requires a password.

      N:\xml>java GenerateMap CEMBase2.dtd
      java.sql.SQLException: [Oracle][ODBC][Ora]Invalid authorization
      specification.

      I guess I could recompile using Oracle's OCI driver but I'm not sure how
      xml-dbms
      will handle that, so can I modify the following url to include a password or
      is
      there another way to get around this?

      String url = "jdbc:odbc:xmldbms",
      driver = "sun.jdbc.odbc.JdbcOdbcDriver";

      -----Original Message-----
      From: Ronald Bourret [mailto:rpbourret@...]
      Sent: Friday, September 15, 2000 3:26 PM
      To: xml-dbms@egroups.com
      Subject: Re: [xml-dbms] Generate Map error



      Can you tell me how Hut is used in your DTD? The only thing I can think
      of that would cause this error is if Hut was both an element (with
      element or mixed content) and a multi-valued attribute (NMTOKENS,
      ENTITIES, IDREFS). If this is not the case, you may have hit a bug...

      -- Ron

      tkhan@... wrote:
      >
      > I'm getting the following error. Any suggestions?
      >
      > N:\xml>java GenerateMap CEMBaseline.dtd
      > de.tudarmstadt.ito.xmldbms.InvalidMapException: The table Hut is used
      > as both a property table and a class table.
      > at
      > de.tudarmstadt.ito.xmldbms.mapfactories.TempMap.addTempClassTable
      > (TempMap.java, Compiled Code)
      > at
      > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
      > ype(MapFactory_DTD.java, Compiled
      > Code)
      > at
      > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
      > ypes(MapFactory_DTD.java, Compiled
      > Code)
      > at
      > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMap
      > (MapFactory_DTD.java:297)
      > at
      > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMapFromDT
      > D(MapFactory_DTD.java:239)
      > at GenerateMap.createMap(GenerateMap.java:130)
      > at GenerateMap.generateMap(GenerateMap.java:94)
      > at GenerateMap.main(GenerateMap.java:69)

      --
      Ronald Bourret
      Programming, Writing, and Training
      XML, Databases, and Schemas
      http://www.rpbourret.com

      To Post a message, send it to: xml-dbms@...

      To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...


      [Non-text portions of this message have been removed]
    • Ronald Bourret
      You are correct. The only solution at the moment is to modify the URL to include a password and recompile GenerateMap. Also, XML-DBMS definitely won t work
      Message 2 of 5 , Sep 15 3:16 PM
      • 0 Attachment
        You are correct. The only solution at the moment is to modify the URL to
        include a password and recompile GenerateMap.

        Also, XML-DBMS definitely won't work with the OCI (Oracle Call
        Interface) driver. XML-DBMS uses JDBC, not OCI.

        -- Ron

        "Khan, Terrick" wrote:
        >
        > Well, I took out Hut but now I'm getting the following error which I believe
        > is
        > because there is not place to specify a password in the ODBC Data Source
        > dialog box
        > and Oracle requires a password.
        >
        > N:\xml>java GenerateMap CEMBase2.dtd
        > java.sql.SQLException: [Oracle][ODBC][Ora]Invalid authorization
        > specification.
        >
        > I guess I could recompile using Oracle's OCI driver but I'm not sure how
        > xml-dbms
        > will handle that, so can I modify the following url to include a password or
        > is
        > there another way to get around this?
        >
        > String url = "jdbc:odbc:xmldbms",
        > driver = "sun.jdbc.odbc.JdbcOdbcDriver";
        >
        > -----Original Message-----
        > From: Ronald Bourret [mailto:rpbourret@...]
        > Sent: Friday, September 15, 2000 3:26 PM
        > To: xml-dbms@egroups.com
        > Subject: Re: [xml-dbms] Generate Map error
        >
        > Can you tell me how Hut is used in your DTD? The only thing I can think
        > of that would cause this error is if Hut was both an element (with
        > element or mixed content) and a multi-valued attribute (NMTOKENS,
        > ENTITIES, IDREFS). If this is not the case, you may have hit a bug...
        >
        > -- Ron
        >
        > tkhan@... wrote:
        > >
        > > I'm getting the following error. Any suggestions?
        > >
        > > N:\xml>java GenerateMap CEMBaseline.dtd
        > > de.tudarmstadt.ito.xmldbms.InvalidMapException: The table Hut is used
        > > as both a property table and a class table.
        > > at
        > > de.tudarmstadt.ito.xmldbms.mapfactories.TempMap.addTempClassTable
        > > (TempMap.java, Compiled Code)
        > > at
        > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
        > > ype(MapFactory_DTD.java, Compiled
        > > Code)
        > > at
        > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
        > > ypes(MapFactory_DTD.java, Compiled
        > > Code)
        > > at
        > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMap
        > > (MapFactory_DTD.java:297)
        > > at
        > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMapFromDT
        > > D(MapFactory_DTD.java:239)
        > > at GenerateMap.createMap(GenerateMap.java:130)
        > > at GenerateMap.generateMap(GenerateMap.java:94)
        > > at GenerateMap.main(GenerateMap.java:69)
        >
        > --
        > Ronald Bourret
        > Programming, Writing, and Training
        > XML, Databases, and Schemas
        > http://www.rpbourret.com
        >
        > To Post a message, send it to: xml-dbms@...
        >
        > To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...
        >
        > [Non-text portions of this message have been removed]
        >
        > To Post a message, send it to: xml-dbms@...
        >
        > To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...

        --
        Ronald Bourret
        Programming, Writing, and Training
        XML, Databases, and Schemas
        http://www.rpbourret.com
      • Khan, Terrick
        Yes, Hut and Link are both used as an element with element content and as multi-valued attributes (IDREFS). So, what is the workaround and how are IDREF and
        Message 3 of 5 , Sep 18 6:51 AM
        • 0 Attachment
          Yes, Hut and Link are both used as an element with element content and as
          multi-valued attributes (IDREFS). So, what is the workaround and
          how are IDREF and IDREFS supported?

          <!ELEMENT Hut (OPTICALLINEAMPLIFIER)*>
          <!ATTLIST Hut
          Link IDREFS #REQUIRED
          >

          <!ELEMENT Link (FiberPair|LinkRoutingStatistics)*>
          <!ATTLIST Link
          Hut IDREFS #IMPLIED
          >


          > -----Original Message-----
          > From: Ronald Bourret [mailto:rpbourret@...]
          > Sent: Friday, September 15, 2000 3:26 PM
          > To: xml-dbms@egroups.com
          > Subject: Re: [xml-dbms] Generate Map error
          >
          > Can you tell me how Hut is used in your DTD? The only thing I can think
          > of that would cause this error is if Hut was both an element (with
          > element or mixed content) and a multi-valued attribute (NMTOKENS,
          > ENTITIES, IDREFS). If this is not the case, you may have hit a bug...
          >
          > -- Ron
          >
          > tkhan@... wrote:
          > >
          > > I'm getting the following error. Any suggestions?
          > >
          > > N:\xml>java GenerateMap CEMBaseline.dtd
          > > de.tudarmstadt.ito.xmldbms.InvalidMapException: The table Hut is used
          > > as both a property table and a class table.
          > > at
          > > de.tudarmstadt.ito.xmldbms.mapfactories.TempMap.addTempClassTable
          > > (TempMap.java, Compiled Code)
          > > at
          > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
          > > ype(MapFactory_DTD.java, Compiled
          > > Code)
          > > at
          > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
          > > ypes(MapFactory_DTD.java, Compiled
          > > Code)
          > > at
          > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMap
          > > (MapFactory_DTD.java:297)
          > > at
          > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMapFromDT
          > > D(MapFactory_DTD.java:239)
          > > at GenerateMap.createMap(GenerateMap.java:130)
          > > at GenerateMap.generateMap(GenerateMap.java:94)
          > > at GenerateMap.main(GenerateMap.java:69)
          >
          > --
          > Ronald Bourret
          > Programming, Writing, and Training
          > XML, Databases, and Schemas
          > http://www.rpbourret.com
          >
          > To Post a message, send it to: xml-dbms@...
          >
          > To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...
          >
          > [Non-text portions of this message have been removed]
          >
          > To Post a message, send it to: xml-dbms@...
          >
          > To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...

          --
          Ronald Bourret
          Programming, Writing, and Training
          XML, Databases, and Schemas
          http://www.rpbourret.com

          To Post a message, send it to: xml-dbms@...

          To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...


          [Non-text portions of this message have been removed]
        • Ronald Bourret
          Here s the workaround: 1) Make a copy of your DTD. 2) In the copy, change the Hut attribute to HutRef and the Link attribute to LinkRef. (The names are
          Message 4 of 5 , Sep 18 3:26 PM
          • 0 Attachment
            Here's the workaround:

            1) Make a copy of your DTD.

            2) In the copy, change the Hut attribute to HutRef and the Link
            attribute to LinkRef. (The names are unimportant. What is important is
            that they are different from the element names. The names you use here
            will be used as the names of the tables/columns to store the Hut and
            Link attributes. Therefore, they can't duplicate the names of the tables
            used to store the Hut and Link elements.

            3) Run GenerateMap on the copy.

            4) In the generated map document, find the ClassMap element for the Hut
            element. In this, look for the PropertyMap element for the LinkRef
            attribute. Change the name of the LinkRef attribute to Link:

            <ClassMap>
            <ElementType Name="Hut" />
            ...
            <PropertyMap>
            <Attribute Name="Link" /> <!-- was Name="LinkRef" -->
            ...
            </PropertyMap>
            ...
            </ClassMap>

            5) Repeat step (4) for the HutRef attribute of the Link element:

            <ClassMap>
            <ElementType Name="Link" />
            ...
            <PropertyMap>
            <Attribute Name="Hut" /> <!-- was Name="HutRef" -->
            ...
            </PropertyMap>
            ...
            </ClassMap>

            Please note that your XML documents should refer to the original DTD,
            not the copy. You only needed to create the copy to fool GenerateMap
            into using different names for the tables for the Link and Hut elements
            and attributes.

            XML-DBMS does not currently recognize/use ID/IDREF attributes. In the
            future, it should pay attention to these when generating maps from DTDs.
            (I can't think of any reasons for using ID/IDREF attributes while
            actually transferring data.) There are two purposes for this:

            1) To generate PRIMARY KEY/FOREIGN KEY restraints in the CREATE TABLE
            statements.

            2) To use the ID attributes as primary keys. Note that this is a bit
            dangerous, as ID attributes are only guaranteed to be unique within a
            document, not across documents, and XML-DBMS allows you to store data
            from multiple documents in the same table in the database.

            If you can guarantee that IDs are unique across documents and want to
            use the ID attribute as the primary key in the database, you need to
            make the following changes to the map document and CREATE TABLE
            statements:

            a) In the ClassMap element for Hut, find the RelatedTable elements, if
            any.

            b) In each RelatedTable element, find the CandidateKey element. Change
            GenerateKey to "No" and change the Name attribute of the Column element
            from HutPK to the name of the column used to store the ID attribute. (I
            don't actually know what this is, since you haven't told me. Suppose it
            is HutID. If this is the case, the new columns in the CandidateKey
            elements would be:

            <ClassMap>
            <ElementType Name="Hut">
            ...
            <RelatedClass>
            <ElementType Name="foo" />
            <CandidateKey Generate="No" > <!-- was Generate="Yes" -->
            <Column Name="HutID" /> <!-- was Name="HutPK" -->
            </CandidateKey>
            ...
            </RelatedClass>
            ... <!-- Make same change for in other RelatedClass elements -->
            </ClassMap>

            c) Repeat this procedure for the RelatedClass elements in the ClassMap
            for Link.

            Basically, what you are doing here is telling XML-DBMS to use an
            existing column to link the Hut/Link table to its child tables instead
            of generating a new column.

            -- Ron

            "Khan, Terrick" wrote:

            > Yes, Hut and Link are both used as an element with element content and as
            > multi-valued attributes (IDREFS). So, what is the workaround and
            > how are IDREF and IDREFS supported?
            >
            > <!ELEMENT Hut (OPTICALLINEAMPLIFIER)*>
            > <!ATTLIST Hut
            > Link IDREFS #REQUIRED
            > >
            >
            > <!ELEMENT Link (FiberPair|LinkRoutingStatistics)*>
            > <!ATTLIST Link
            > Hut IDREFS #IMPLIED
            > >
            >
            > > -----Original Message-----
            > > From: Ronald Bourret [mailto:rpbourret@...]
            > > Sent: Friday, September 15, 2000 3:26 PM
            > > To: xml-dbms@egroups.com
            > > Subject: Re: [xml-dbms] Generate Map error
            > >
            > > Can you tell me how Hut is used in your DTD? The only thing I can think
            > > of that would cause this error is if Hut was both an element (with
            > > element or mixed content) and a multi-valued attribute (NMTOKENS,
            > > ENTITIES, IDREFS). If this is not the case, you may have hit a bug...
            > >
            > > -- Ron
            > >
            > > tkhan@... wrote:
            > > >
            > > > I'm getting the following error. Any suggestions?
            > > >
            > > > N:\xml>java GenerateMap CEMBaseline.dtd
            > > > de.tudarmstadt.ito.xmldbms.InvalidMapException: The table Hut is used
            > > > as both a property table and a class table.
            > > > at
            > > > de.tudarmstadt.ito.xmldbms.mapfactories.TempMap.addTempClassTable
            > > > (TempMap.java, Compiled Code)
            > > > at
            > > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
            > > > ype(MapFactory_DTD.java, Compiled
            > > > Code)
            > > > at
            > > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.processElementT
            > > > ypes(MapFactory_DTD.java, Compiled
            > > > Code)
            > > > at
            > > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMap
            > > > (MapFactory_DTD.java:297)
            > > > at
            > > > de.tudarmstadt.ito.xmldbms.mapfactories.MapFactory_DTD.createMapFromDT
            > > > D(MapFactory_DTD.java:239)
            > > > at GenerateMap.createMap(GenerateMap.java:130)
            > > > at GenerateMap.generateMap(GenerateMap.java:94)
            > > > at GenerateMap.main(GenerateMap.java:69)

            --
            Ronald Bourret
            Programming, Writing, and Training
            XML, Databases, and Schemas
            http://www.rpbourret.com
          Your message has been successfully submitted and would be delivered to recipients shortly.