db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <tdudg...@informaticsmatters.com>
Subject Re: Supporting a new db type
Date Tue, 31 Jan 2006 09:59:41 GMT
I tried reading a MSAcess database using the odbc/jdbc bridge, and got 
the following errror.

Buildfile: build.xml
[dumpMetadata] java.sql.SQLException: [Microsoft][ODBC Driver Manager] 
Invalid descriptor index
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
[dumpMetadata]  at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbc.SQLColAttributes(JdbcOdbc.java:2614)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbcResultSet.getColAttribute(JdbcOdbcResultSet.java:5445)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbcResultSet.getColumnType(JdbcOdbcResultSet.java:6056)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbcResultSet.getMaxCharLen(JdbcOdbcResultSet.java:5473)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:277)
[dumpMetadata]  at 
sun.jdbc.odbc.JdbcOdbcResultSet.getObject(JdbcOdbcResultSet.java:1677)
[dumpMetadata]  at 
org.apache.ddlutils.task.DumpMetadataTask.addResultSetProperty(DumpMetadataTask.java:380)
[dumpMetadata]  at 
org.apache.ddlutils.task.DumpMetadataTask.addProperty(DumpMetadataTask.java:324)
[dumpMetadata]  at 
org.apache.ddlutils.task.DumpMetadataTask.dumpProperty(DumpMetadataTask.java:294)
[dumpMetadata]  at 
org.apache.ddlutils.task.DumpMetadataTask.dumpMetaData(DumpMetadataTask.java:269)
[dumpMetadata]  at 
org.apache.ddlutils.task.DumpMetadataTask.execute(DumpMetadataTask.java:214)
[dumpMetadata]  at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[dumpMetadata]  at org.apache.tools.ant.Task.perform(Task.java:364)
[dumpMetadata]  at org.apache.tools.ant.Target.execute(Target.java:341)
[dumpMetadata]  at 
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
[dumpMetadata]  at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
[dumpMetadata]  at org.apache.tools.ant.Main.runBuild(Main.java:653)
[dumpMetadata]  at org.apache.tools.ant.Main.startAnt(Main.java:187)
[dumpMetadata]  at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[dumpMetadata]  at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[dumpMetadata] Could not dump property getDatabaseMajorVersion because 
of null
[dumpMetadata] Could not dump property getDatabaseMinorVersion because 
of null
[dumpMetadata] Could not dump property getResultSetHoldability because 
of null
[dumpMetadata] Could not dump property locatorsUpdateCopy because of null
[dumpMetadata] Could not dump property supportsStatementPooling because 
of null

BUILD FAILED
C:\tmp\ddlutils\build.xml:66: java.sql.SQLException: [Microsoft][ODBC 
Microsoft Access Driver]Optional feature not implemented

Total time: 1 second
C:\tmp\ddlutils>




I hope I got the config correct, but can't be certain. Here's the ant 
file I used.

<?xml version="1.0" encoding="UTF-8"?>


<project default=""
         name="DdlUtils"
         basedir=".">
  <!-- Allow values set at the commandline or in the environment to 
override the defaults -->
  <property environment="env"/>
  <!-- Load the build properties -->
  <property file="build.properties"/>
 
  <path id="runtime.classpath">
    <fileset dir="/dev/svn/ddlutils/lib">
      <include name="**/*.jar"/>
      <include name="**/*.zip"/>
    </fileset>
    <fileset dir="/dev/svn/ddlutils/dist">
            <include name="**/*.jar"/>
    </fileset>
  </path>

 
   <taskdef name="dumpMetadata"
             classname="org.apache.ddlutils.task.DumpMetadataTask">
             <classpath refid="runtime.classpath"/>
   </taskdef>
  
    <dumpMetadata outputfile="db-metadata.xml"
                      catalogpattern=""
                      schemapattern=""
                      tablepattern=""
                      procedurepattern=""
                      tabletypes="TABLE" >
          <database driverclassname="sun.jdbc.odbc.JdbcOdbcDriver"
                    url="jdbc:odbc:MyAccessDb"
                    username=""
                    password=""/>
    </dumpMetadata>
 
 
</project>


Any ideas?


Tim





Thomas Dudziak wrote:

>On 1/25/06, Tim Dudgeon <tdudgeon@informaticsmatters.com> wrote:
>  
>
>>Thomas Dudziak wrote
>>
>>    
>>
>>>but I don't think that is going to work with the ODBC/JDBC bridge).
>>>
>>>      
>>>
>>Can you explain more?
>>Does this mean it doesn't have a hope of ever working, or needs a little
>>bit of tweaking to get it to work?
>>    
>>
>
>It depends largely on the quality of the ODBC/JDBC bridge as to
>whether database metadata is sufficiently well supported for DdlUtils
>to be able to read a database definition from a live database (ODBC
>itself should give enough info). You can check for yourself by
>utilizing the DumpMetadataTask, just direct it to a database and check
>the resulting xml file.
>
>Tom
>
>  
>

Mime
View raw message