This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JDBC and the fly likes iBator problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "iBator problem" Watch "iBator problem" New topic
Author

iBator problem

James Key
Greenhorn

Joined: Jan 26, 2009
Posts: 2
Hi!

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

Eclipse ver. 3.4
latest Ibator plugin

my ibatorConfig.xml:



exception:

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

Joined: Jul 01, 2003
Posts: 89
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: iBator problem