• Post Reply Bookmark Topic Watch Topic
  • New Topic

iBator problem  RSS feed

James Key
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm trying to use IBator plugin for Eclipse, but one exception occurred...

Eclipse ver. 3.4
latest Ibator plugin

my ibatorConfig.xml:


java.lang.ArithmeticException: / by zero
at org.apache.ibatis.ibator.eclipse.core.callback.EclipseProgressCallback.generationStarted(EclipseProgressCallback.java:54)
at org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:216)
at org.apache.ibatis.ibator.api.Ibator.generate(Ibator.java:126)
at org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(RunIbatorThread.java:80)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
at org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner.run(RunIbatorAction.java:137)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Could anyone help me, please?

Mark Secrist
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, it was because I hadn't created the database specified by the connection URL in the ibatorConfig.xml file. I had the server running but no DB created. I suspect this error may be a result of anything from a bad URL (not the server:port part) but the name of the database, no tables, etc.

Here's a good way to test this. If you open the Data Source Explorer view and create a connection, you should be able to define the connection such that the same URL can be used for your config... assuming you can view the tables of the database in the explorer.

I notice in your URL:

that there is no Database name specified. I used a Derby database and my URL looks more like this:

I think the same rules apply though. For JDBC, you need to specify both the server AND the database name you are referencing.

Check here for a reference: Guide to JDBC URLs
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!