ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Butler <jeffgbut...@gmail.com>
Subject Re: Abator - Java Code Generator for iBATIS - Runtime Errors
Date Mon, 12 Dec 2005 14:32:08 GMT
Hmmm...I think SQL Server uses catalogs more than schemas.  So the
configuration should look like this:

<table catalog="testdb" tableName="COMPANY">

But it occurs to me that I didn't take that possibility into account in some
other areas of Abator.  So the generated code might not be exactly right.
I'll take a look at that too.

Jeff Butler

On 12/12/05, Jeff Butler <jeffgbutler@gmail.com> wrote:
>
> Hi Kevin,
>
> Sorry about this bug.  My intent is to show a warning message, rather than
> ending so ungracefully.  I'll try to get a fix released soon.
>
> The underlying problem is the same - Abator cannot see the table
> testdb.COMPANY.  The JDBC code in your case is like this:
>
>     DatabaseMetaData dbmd = connection.getMetaData();
>     ResultSet rs = dbmd.getColumns(null, 'testdb', 'COMPANY', null);
>
> That query must be returning an empty result set.  I'm not sure what SQL
> Server is expecting, but obviously we've not hit on the proper combination
> yet.  I'll do a little research to see what I can find out.
>
> Jeff Butler
>
>
>
>  On 12/12/05, Broderick, Kevin <kevin.broderick@iona.com> wrote:
> >
> >  Hi,
> >
> > I'm using SQL Server and I'm seeing the "/ by zero" error aswell.
> >
> > Is there anything I can do in my config file below to work around the
> > error?
> >
> > I've tried matching capitalization as suggested for Oracle earlier. Ever
> > the optimist J
> >
> > Great tool, looking forward to using it in a project as soon as I get
> > over this bump J.
> >
> > Cheers,
> >
> > Kev
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <!DOCTYPE abatorConfiguration PUBLIC "-//Apache Software Foundation//DTD
> > Abator for iBATIS Configuration 1.0//EN"
> >
> >   "http://ibatis.apache.org/dtd/abator-config_1_0.dtd ">
> >
> >
> >
> > <abatorConfiguration>
> >
> >   <abatorContext>
> >
> >     <!-- TODO: Add Database Connection Information -->
> >
> >     <jdbcConnection driverClass="
> > com.microsoft.sqlserver.jdbc.SQLServerDriver"
> >
> >         connectionURL="jdbc:
> > sqlserver://myserver.test.com:1433;DatabaseName=testdb"
> >
> >         userId="TESTDB"
> >
> >         password="TESTDB">
> >
> >       <classPathEntry
> > location="C:/development/eclipse/workspace/AbatorTest/WebRoot/WEB-INF/lib/sqljdbc.jar"
> > />
> >
> >     </jdbcConnection>
> >
> >
> >
> >     <javaModelGenerator targetPackage="com.test.database.ibatis.abator"
> > targetProject="AbatorTest" />
> >
> >     <sqlMapGenerator targetPackage="com.test.database.ibatis.sqlmap"
> > targetProject="AbatorTest" />
> >
> >     <daoGenerator type="IBATIS" targetPackage="
> > com.test.database.ibatis.dao" targetProject="AbatorTest" />
> >
> >
> >
> >     <table schema="testdb" tableName="COMPANY">
> >
> >        <property name="trimStrings" value="true" />
> >
> >     </table>
> >
> >
> >
> >   </abatorContext>
> >
> > </abatorConfiguration>
> >
>
>

Mime
View raw message