Sep 28th, 2010, 08:05 AM
DBRE and DB2400
I'm hoping Alan Stewart can help me here. I'm attempting DBRE on my DB2400 datasource. Alan you added support for DB2400 back in August when I showed you there was an open source JDBC driver for it. I hadn't had the chance to fully test DBRE on it before the M3 launch. Anyways, I'm trying it now and I keep getting a message saying the following:
"No Spring Roo add-ons were found that offer a similar JDBC driver
JDBC driver not available for com.ibm.as400.access.AS400JDBCDriver"
Thanks in advance.
Sep 28th, 2010, 06:57 PM
DB2/400 uses the JTOpen driver from memory? The jar was large (4.3Mb) and was is not shipped with Roo. If you build Roo from Git, do a mvn clean install in the wrapping directory first and then you can copy the jar from your mvn repo to the Roo bundle directrory for M3, or just use the Git code after doing the same mvn clean install from Roo root directory.
Sep 28th, 2010, 08:00 PM
That's right, it does use JTOpen. I can understand that the jar is quite large, in probably 99.9% of any of my projects, it's always the biggest jar because IBM has packed in so much for the System i/AS400. It has grown in size even since I started using earlier versions.
So given that the jar is too large to ship with Roo, what does that mean for the future of DBRE support for DB2400? Could the add-on be setup to scan the application dependencies for the available driver? That would be beneficial for DB2400 as well as for any other datasource that might use a proprietary JDBC driver that is not available open source. What do you think?
Last edited by pgrimard; Sep 28th, 2010 at 08:03 PM.
Sep 28th, 2010, 08:40 PM
It simply means Roo won't ship it, as we don't for other jars like Oracle and DB2, though these databases are available for DBRE. To test it, build the wrapping directory, then all of Roo.
Sep 28th, 2010, 10:06 PM
I built Roo M4 from source. First I tried merely copying the org.springframework.roo.wrapping.jtopen-6.7.0.0001.jar file to the M3 bundle directory and restarting the roo shell followed by the "database reverse engineer" command. That resulted in an IllegalArgumentException. So next I tried just doing the DBRE from Roo M4 that I just built and I got the same exception and the same message as before re "JDBC driver not available for com.ibm.as400.access.AS400JDBCDriver"
test2 roo> database reverse engineer --schema patrick --package test2
No Spring Roo add-ons were found that offer a similar JDBC driver
JDBC driver not available for 'com.ibm.as400.access.AS400JDBCDriver'
java.lang.IllegalArgumentException: JDBC driver not available for 'com.ibm.as400.access.AS400JDBCDriver'
at org.springframework.roo.support.util.Assert.notNul l(Assert.java:112)
at org.springframework.roo.addon.dbre.jdbc.Connection ProviderImpl.getConnection(ConnectionProviderImpl. java:41)
at org.springframework.roo.addon.dbre.jdbc.Connection ProviderImpl.getConnection(ConnectionProviderImpl. java:53)
at org.springframework.roo.addon.dbre.DbreModelServic eImpl.getConnection(DbreModelServiceImpl.java:285)
at org.springframework.roo.addon.dbre.DbreModelServic eImpl.getDatabase(DbreModelServiceImpl.java:184)
at org.springframework.roo.addon.dbre.DbreModelServic eImpl.refreshDatabase(DbreModelServiceImpl.java:13 7)
at org.springframework.roo.addon.dbre.DbreOperationsI mpl.reverseEngineerDatabase(DbreOperationsImpl.jav a:79)
at org.springframework.roo.addon.dbre.DbreCommands.se rializeDatabaseMetadata(DbreCommands.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at org.springframework.roo.support.util.ReflectionUti ls.invokeMethod(ReflectionUtils.java:191)
at org.springframework.roo.process.manager.ProcessMan agerHostedExecutionStrategy$1.callback(ProcessMana gerHostedExecutionStrategy.java:49)
at org.springframework.roo.process.manager.internal.D efaultProcessManager.doTransactionally(DefaultProc essManager.java:177)
at org.springframework.roo.process.manager.internal.D efaultProcessManager.execute(DefaultProcessManager .java:140)
at org.springframework.roo.process.manager.ProcessMan agerHostedExecutionStrategy.execute(ProcessManager HostedExecutionStrategy.java:47)
at org.springframework.roo.shell.AbstractShell.execut eCommand(AbstractShell.java:159)
at org.springframework.roo.shell.jline.JLineShell.pro mptLoop(JLineShell.java:324)
at org.springframework.roo.shell.jline.JLineShell.run (JLineShell.java:117)
Sep 29th, 2010, 12:17 AM
It would appear then that there are missing dependencies. In the pom in the wrapping directory for jtopen, the Import-Package element in the build plugin needs to be modified. However, it will be a trial and error process.Perhaps the exclusion com.ibm.* is too much.
This will require more investigation