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

How to specify DatabaseMetaData Object

Expand Messages
  • nudagal omprakash
    Dear Friends, Please help me this problem.......... I Have used JDBC1DataSource ****************************************************** db.props file contains
    Message 1 of 2 , Aug 6, 2003
    • 0 Attachment
      Dear Friends,
      Please help me this problem..........
      I Have used JDBC1DataSource
      ******************************************************
      db.props file contains
      ----------
      #Properties for XML-DBMS
      URL=jdbc:odbc:xmldbms
      Driver=sun.jdbc.odbc.JdbcOdbcDriver
      DataSourceClass=org.xmlmiddleware.db.JDBC1DataSource
      DBName=xmldbms
      DatabaseMetadata=emp.mdb
      User=""
      Password=""
      *****************************************************8

      Emp.dtd file contains
      ---------------------

      <!ELEMENT Employee (Emp+)>
      <!ELEMENT Emp (Ename,Sal)>
      <!ATTLIST Emp
      EmpNumber CDATA #REQUIRED>

      <!ELEMENT Ename (#PCDATA)>
      <!ELEMENT Sal (#PCDATA)>

      ***********************************************
      I Have encountered the following errors................


      F:\Omprakash\xml\xmldbms20alpha3\samples>java
      org.xmlmiddleware.xmldbms.tools.Ma
      pManager File1=parser.props File2=db.props File3=empmap.props
      java.lang.IllegalArgumentException: No DatabaseMetaData object
      specified for the
      Default database.
      at
      org.xmlmiddleware.xmldbms.maps.utils.DDLGenerator.getCreateTableStrin
      g(DDLGenerator.java:201)
      at
      org.xmlmiddleware.xmldbms.maps.utils.DDLGenerator.getCreateTableStrin
      gs(DDLGenerator.java:175)
      at
      org.xmlmiddleware.xmldbms.tools.MapManager.createSQL(MapManager.java:
      964)
      at
      org.xmlmiddleware.xmldbms.tools.MapManager.dispatch(MapManager.java:4
      90)
      at
      org.xmlmiddleware.xmldbms.tools.MapManager.main(MapManager.java:348)

      with Regards,
      Omprakash

      ___________________________________________________
      Download the hottest & happening ringtones here!
      OR SMS: Top tone to 7333
      Click here now:
      http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
    • xmldbms
      I assume that you are using the DTD as input and want to get CREATE TABLE statements as output? If so, then the problem is as follows. 1) You do not specify a
      Message 2 of 2 , Aug 11, 2003
      • 0 Attachment
        I assume that you are using the DTD as input and want to get CREATE
        TABLE statements as output? If so, then the problem is as follows.

        1) You do not specify a DatabaseName property. Therefore, the map is
        built using the database name "Default".

        2) You do specify a DBName property of "xmldbms". Therefore,
        MapManager builds a connection to the database whose logical name is
        "xmldbms".

        Because the connection's logical database name (xmldbms) is different
        from the map's logical database name (Default), you get this error.

        The solution is to either:

        a) Remove the DBName property from your dbprops file, ***OR***
        b) Add the property DatabaseName=xmldbms to your property file that
        contains the propertys like Method, Input, and Output.

        I remember deliberately using two different properties when I wrote
        the code, but this looks like a design bug now. The above workaround
        should solve your problem for the moment, though.

        -- Ron

        --- In xml-dbms@yahoogroups.com, "nudagal omprakash"
        <om_om_prakash@r...> wrote:
        > Dear Friends,
        > Please help me this problem..........
        > I Have used JDBC1DataSource
        > ******************************************************
        > db.props file contains
        > ----------
        > #Properties for XML-DBMS
        > URL=jdbc:odbc:xmldbms
        > Driver=sun.jdbc.odbc.JdbcOdbcDriver
        > DataSourceClass=org.xmlmiddleware.db.JDBC1DataSource
        > DBName=xmldbms
        > DatabaseMetadata=emp.mdb
        > User=""
        > Password=""
        > *****************************************************8
        >
        > Emp.dtd file contains
        > ---------------------
        >
        > <!ELEMENT Employee (Emp+)>
        > <!ELEMENT Emp (Ename,Sal)>
        > <!ATTLIST Emp
        > EmpNumber CDATA #REQUIRED>
        >
        > <!ELEMENT Ename (#PCDATA)>
        > <!ELEMENT Sal (#PCDATA)>
        >
        > ***********************************************
        > I Have encountered the following errors................
        >
        >
        > F:\Omprakash\xml\xmldbms20alpha3\samples>java
        > org.xmlmiddleware.xmldbms.tools.Ma
        > pManager File1=parser.props File2=db.props File3=empmap.props
        > java.lang.IllegalArgumentException: No DatabaseMetaData object
        > specified for the
        > Default database.
        > at
        >
        org.xmlmiddleware.xmldbms.maps.utils.DDLGenerator.getCreateTableStrin
        > g(DDLGenerator.java:201)
        > at
        >
        org.xmlmiddleware.xmldbms.maps.utils.DDLGenerator.getCreateTableStrin
        > gs(DDLGenerator.java:175)
        > at
        >
        org.xmlmiddleware.xmldbms.tools.MapManager.createSQL(MapManager.java:
        > 964)
        > at
        >
        org.xmlmiddleware.xmldbms.tools.MapManager.dispatch(MapManager.java:4
        > 90)
        > at
        > org.xmlmiddleware.xmldbms.tools.MapManager.main(MapManager.java:348)
        >
        > with Regards,
        > Omprakash
        >
        > ___________________________________________________
        > Download the hottest & happening ringtones here!
        > OR SMS: Top tone to 7333
        > Click here now:
        > http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
      Your message has been successfully submitted and would be delivered to recipients shortly.