zkn | 1 Mar 21:48 2009
Picon

division by zero with ibator in eclipse

Hi,

I'm getting "/ by zero" when trying to run ibator in eclipse. Here is the full stack trace:

01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933] java.lang.ArithmeticException: / by zero 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.apache.ibatis.ibator.eclipse.core.callback.EclipseProgressCallback.generationStarted(EclipseProgressCallback.java:54) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:216) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:126) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(RunIbatorThread.java:80) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner.run(RunIbatorAction.java:137) 
01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) 
01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] !ENTRY org.apache.ibatis.ibator.eclipse.ui 4  
01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] 4 2009-03-01 22:33:33.127 
01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] !MESSAGE  
01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] Unexpected error while running Ibator. 


This is my first use of ibator and I suppose there is a problem with my configuration but I really don't understand where to look at. This is my configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ibatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN" "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd" >
<ibatorConfiguration >
<classPathEntry location="mysql-connector-java-5.1.6-bin.jar" />
  <ibatorContext id="context1" targetRuntime="Ibatis2Java5">
    <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost/yudb?useUnicode=true" userId="..." password="..." />
    <javaModelGenerator targetPackage="ibator" targetProject="yu" />
    <sqlMapGenerator targetPackage="ibator" targetProject="yu" />
    <daoGenerator targetPackage="ibator" targetProject="yu" type="GENERIC-CI" />
    <table schema="" tableName="categories" >
    </table>
  </ibatorContext>
</ibatorConfiguration>
Jeff Butler | 1 Mar 22:41 2009
Picon

Re: division by zero with ibator in eclipse

I'm sorry for your trouble - I'll fix the divide by zero error.

This is happening because there are no tables in the database that
match the <table> configuration you've given.  I think that you should
remove the schema="" attribute in your <table> element - then it will
probably work.

Jeff Butler

On Sun, Mar 1, 2009 at 2:48 PM, zkn <zkn <at> abv.bg> wrote:
> Hi,
> I'm getting "/ by zero" when trying to run ibator in eclipse. Here is the
> full stack trace:
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]
> java.lang.ArithmeticException: / by zero
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.apache.ibatis.ibator.eclipse.core.callback.EclipseProgressCallback.generationStarted(EclipseProgressCallback.java:54)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:216)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:126)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(RunIbatorThread.java:80)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner.run(RunIbatorAction.java:137)
> 01.03.09 22:33:16 [0x0-0xbf0bf].org.eclipse.eclipse[933]  at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> 01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] !ENTRY
> org.apache.ibatis.ibator.eclipse.ui 4
> 01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] 4 2009-03-01
> 22:33:33.127
> 01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] !MESSAGE
> 01.03.09 22:33:33 [0x0-0xbf0bf].org.eclipse.eclipse[933] Unexpected error
> while running Ibator.
>
> This is my first use of ibator and I suppose there is a problem with my
> configuration but I really don't understand where to look at. This is my
> configuration:
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE ibatorConfiguration PUBLIC "-//Apache Software Foundation//DTD
> Apache iBATIS Ibator Configuration 1.0//EN"
> "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd" >
> <ibatorConfiguration >
> <classPathEntry location="mysql-connector-java-5.1.6-bin.jar" />
>   <ibatorContext id="context1" targetRuntime="Ibatis2Java5">
>     <jdbcConnection driverClass="com.mysql.jdbc.Driver"
> connectionURL="jdbc:mysql://localhost/yudb?useUnicode=true" userId="..."
> password="..." />
>     <javaModelGenerator targetPackage="ibator" targetProject="yu" />
>     <sqlMapGenerator targetPackage="ibator" targetProject="yu" />
>     <daoGenerator targetPackage="ibator" targetProject="yu"
> type="GENERIC-CI" />
>     <table schema="" tableName="categories" >
>     </table>
>   </ibatorContext>
> </ibatorConfiguration>

zkn | 2 Mar 00:30 2009
Picon

Re: division by zero with ibator in eclipse

Thanks for the quick reply.

On 01.03.2009, at 23:41, Jeff Butler wrote:

> I'm sorry for your trouble - I'll fix the divide by zero error.
>
> This is happening because there are no tables in the database that
> match the <table> configuration you've given.  I think that you should
> remove the schema="" attribute in your <table> element - then it will
> probably work.

Same error after I removed the schema attribute.

Jeff Butler | 2 Mar 03:21 2009
Picon

Re: division by zero with ibator in eclipse

Well the problem is that Ibator can't find the table you specified.
Make sure that the table name is spelled correctly, and that the table
is in the database specified in the connection URL.

Jeff Butler

On Sun, Mar 1, 2009 at 5:30 PM, zkn <zkn <at> abv.bg> wrote:
> Thanks for the quick reply.
>
> On 01.03.2009, at 23:41, Jeff Butler wrote:
>
>> I'm sorry for your trouble - I'll fix the divide by zero error.
>>
>> This is happening because there are no tables in the database that
>> match the <table> configuration you've given.  I think that you should
>> remove the schema="" attribute in your <table> element - then it will
>> probably work.
>
> Same error after I removed the schema attribute.
>

zkn | 2 Mar 12:12 2009
Picon

Re: division by zero with ibator in eclipse

Yeah, the problem was in the login information. The user had no access  
to the table.

Thanks.

On 02.03.2009, at 04:21, Jeff Butler wrote:

> Well the problem is that Ibator can't find the table you specified.
> Make sure that the table name is spelled correctly, and that the table
> is in the database specified in the connection URL.
>
> Jeff Butler
>
>
> On Sun, Mar 1, 2009 at 5:30 PM, zkn <zkn <at> abv.bg> wrote:
>> Thanks for the quick reply.
> .
>
>> On 01.03.2009, at 23:41, Jeff Butler wrote:
> .
>
>>> I'm sorry for your trouble - I'll fix the divide by zero error.
>>>
>>> This is happening because there are no tables in the database that
>>> match the <table> configuration you've given.  I think that you  
>>> should
>>> remove the schema="" attribute in your <table> element - then it  
>>> will
>>> probably work.
> .
>
>> Same error after I removed the schema attribute.
> .
>
>

ahmad husain | 2 Mar 12:38 2009
Picon

Re: Ibator for postgresql

Thanks for your replay,


I have change the connectionURL, but it still having the same error.

Thanks

On Fri, Feb 27, 2009 at 9:27 PM, vicky yes <afzaal11 <at> hotmail.com> wrote:

Hi Ahmad

change ur connectionURL,

try like this connectionURL="jdbc:postgresql:db_koperasi"



ahmad husain wrote:
>
> Dear All expert
> Does anyone here knows about abatorConfig.xml with PostgreSQL?
>
> I have here one file, but still giving me warning message :
>
> Table MUsers does not exist, or contains only LOB fields
>
> Please help
>
> Thanks
>
> <?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="org.postgresql.Driver"
>         connectionURL="jdbc:postgresql://localhost/db_koperasi"
>         userId="user_koperasi"
>         password="user_koperasi">
>       <classPathEntry location="postgresql-8.3-604.jdbc3.jar" />
>     </jdbcConnection>
>
>     <javaTypeResolver>
>       <property name="forceBigDecimals" value="false" />
>     </javaTypeResolver>
>
>     <javaModelGenerator targetPackage="com.koperasi.persistence"
>         targetProject="d:\tools\test\src">
>       <property name="enableSubPackages" value="true" />
>       <property name="trimStrings" value="true" />
>     </javaModelGenerator>
>
>     <sqlMapGenerator targetPackage="com.koperasi.persistence.xml"
>         targetProject="d:\tools\test\src">
>       <property name="enableSubPackages" value="true" />
>     </sqlMapGenerator>
>
>     <daoGenerator type="IBATIS" targetPackage="com.koperasi.dao"
>         targetProject="d:\tools\test\src">
>       <property name="enableSubPackages" value="true" />
>     </daoGenerator>
>
>     <table tableName="MAnggota" domainObjectName="MAnggota">
>        <property name="useActualColumnNames" value="false"/>
>     </table>
>
> <!--
>     <table tableName="MAnggota">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="MJenisKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="MMerkKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="MProgram">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="MTipeKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="TCicilanDPKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="TCicilanKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
>
>     <table tableName="TKreditKendaraan">
>       <property name="useActualColumnNames" value="true"/>
>     </table>
> -->
>   </abatorContext>
> </abatorConfiguration>
>
>

--
View this message in context: http://www.nabble.com/Ibator-for-postgresql-tp22240734p22246917.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Jeff Butler | 2 Mar 18:01 2009
Picon

Re: Ibator for postgresql

I think there are two possibilities:

1. The table doesn't exist, or the userID in the config doesn't have
privileges to the table, or there is a misspelling in the table name,
or the table is in a different schema than you expect.

2. The table contains only LOB fields (A/Ibator does not support that
kind of table).

BTW - the message you report does not match the config you sent (there
is no MUsers table in the config you sent).

Jeff Butler

On Mon, Mar 2, 2009 at 5:38 AM, ahmad husain <husainahmad <at> gmail.com> wrote:
> Thanks for your replay,
> I have change the connectionURL, but it still having the same error.
> Thanks
>
> On Fri, Feb 27, 2009 at 9:27 PM, vicky yes <afzaal11 <at> hotmail.com> wrote:
>>
>> Hi Ahmad
>>
>> change ur connectionURL,
>>
>> try like this connectionURL="jdbc:postgresql:db_koperasi"
>>
>>
>>
>> ahmad husain wrote:
>> >
>> > Dear All expert
>> > Does anyone here knows about abatorConfig.xml with PostgreSQL?
>> >
>> > I have here one file, but still giving me warning message :
>> >
>> > Table MUsers does not exist, or contains only LOB fields
>> >
>> > Please help
>> >
>> > Thanks
>> >
>> > <?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="org.postgresql.Driver"
>> >         connectionURL="jdbc:postgresql://localhost/db_koperasi"
>> >         userId="user_koperasi"
>> >         password="user_koperasi">
>> >       <classPathEntry location="postgresql-8.3-604.jdbc3.jar" />
>> >     </jdbcConnection>
>> >
>> >     <javaTypeResolver>
>> >       <property name="forceBigDecimals" value="false" />
>> >     </javaTypeResolver>
>> >
>> >     <javaModelGenerator targetPackage="com.koperasi.persistence"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >       <property name="trimStrings" value="true" />
>> >     </javaModelGenerator>
>> >
>> >     <sqlMapGenerator targetPackage="com.koperasi.persistence.xml"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >     </sqlMapGenerator>
>> >
>> >     <daoGenerator type="IBATIS" targetPackage="com.koperasi.dao"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >     </daoGenerator>
>> >
>> >     <table tableName="MAnggota" domainObjectName="MAnggota">
>> >        <property name="useActualColumnNames" value="false"/>
>> >     </table>
>> >
>> > <!--
>> >     <table tableName="MAnggota">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MJenisKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MMerkKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MProgram">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MTipeKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TCicilanDPKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TCicilanKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TKreditKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> > -->
>> >   </abatorContext>
>> > </abatorConfiguration>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ibator-for-postgresql-tp22240734p22246917.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>
>

ahmad husain | 3 Mar 04:52 2009
Picon

Re: Ibator for postgresql

Hi Jeff


Thanks for your reply

I'm using postgres user on the config file, i have changed a few configuration like shcema, catalog, but it still give me errors, 
and i send the detail the database in pdAdmin, and the error.

Thanks


On Tue, Mar 3, 2009 at 12:01 AM, Jeff Butler <jeffgbutler <at> gmail.com> wrote:
I think there are two possibilities:

1. The table doesn't exist, or the userID in the config doesn't have
privileges to the table, or there is a misspelling in the table name,
or the table is in a different schema than you expect.

2. The table contains only LOB fields (A/Ibator does not support that
kind of table).

BTW - the message you report does not match the config you sent (there
is no MUsers table in the config you sent).

Jeff Butler


On Mon, Mar 2, 2009 at 5:38 AM, ahmad husain <husainahmad <at> gmail.com> wrote:
> Thanks for your replay,
> I have change the connectionURL, but it still having the same error.
> Thanks
>
> On Fri, Feb 27, 2009 at 9:27 PM, vicky yes <afzaal11 <at> hotmail.com> wrote:
>>
>> Hi Ahmad
>>
>> change ur connectionURL,
>>
>> try like this connectionURL="jdbc:postgresql:db_koperasi"
>>
>>
>>
>> ahmad husain wrote:
>> >
>> > Dear All expert
>> > Does anyone here knows about abatorConfig.xml with PostgreSQL?
>> >
>> > I have here one file, but still giving me warning message :
>> >
>> > Table MUsers does not exist, or contains only LOB fields
>> >
>> > Please help
>> >
>> > Thanks
>> >
>> > <?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="org.postgresql.Driver"
>> >         connectionURL="jdbc:postgresql://localhost/db_koperasi"
>> >         userId="user_koperasi"
>> >         password="user_koperasi">
>> >       <classPathEntry location="postgresql-8.3-604.jdbc3.jar" />
>> >     </jdbcConnection>
>> >
>> >     <javaTypeResolver>
>> >       <property name="forceBigDecimals" value="false" />
>> >     </javaTypeResolver>
>> >
>> >     <javaModelGenerator targetPackage="com.koperasi.persistence"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >       <property name="trimStrings" value="true" />
>> >     </javaModelGenerator>
>> >
>> >     <sqlMapGenerator targetPackage="com.koperasi.persistence.xml"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >     </sqlMapGenerator>
>> >
>> >     <daoGenerator type="IBATIS" targetPackage="com.koperasi.dao"
>> >         targetProject="d:\tools\test\src">
>> >       <property name="enableSubPackages" value="true" />
>> >     </daoGenerator>
>> >
>> >     <table tableName="MAnggota" domainObjectName="MAnggota">
>> >        <property name="useActualColumnNames" value="false"/>
>> >     </table>
>> >
>> > <!--
>> >     <table tableName="MAnggota">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MJenisKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MMerkKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MProgram">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="MTipeKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TCicilanDPKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TCicilanKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> >
>> >     <table tableName="TKreditKendaraan">
>> >       <property name="useActualColumnNames" value="true"/>
>> >     </table>
>> > -->
>> >   </abatorContext>
>> > </abatorConfiguration>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ibator-for-postgresql-tp22240734p22246917.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>
>

Attachment (ibatorConfig.xml): text/xml, 3570 bytes
Andrey Rogov | 4 Mar 11:57 2009
Picon

Navision jdbc drivers

Prompt me, please, the correct way to work with ms navision.
What driver considered reliable and rapid ?

TIA.

Larry Meadors | 4 Mar 13:14 2009
Picon

Re: Navision jdbc drivers

Which data store is it using?

If you mean with the "native" (c/side) database, you probably won't
find one. While you *can* use the jdbc/odbc bridge, it's really
crapware. If it's using the native database, c# is a better option
than java.

But, if it's using MSDE or SQL Server as the storage, that's a
completely different story.

Larry

On Wed, Mar 4, 2009 at 3:57 AM, Andrey Rogov <andrey.rogov <at> gmail.com> wrote:
> Prompt me, please, the correct way to work with ms navision.
> What driver considered reliable and rapid ?
>
> TIA.
>


Gmane