Announcement Announcement Module
No announcement yet.
DBRE and DB2400 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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"

    Thanks in advance.

  • #2
    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.


    • #3
      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, 09:03 PM.


      • #4
        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.


        • #5
          I built Roo M4 from source. First I tried merely copying the org.springframework.roo.wrapping.jtopen- 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"

          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 ''
          java.lang.IllegalArgumentException: JDBC driver not available for ''
          at l(
          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(
          at org.springframework.roo.addon.dbre.DbreModelServic eImpl.getDatabase(
          at org.springframework.roo.addon.dbre.DbreModelServic eImpl.refreshDatabase( 7)
          at org.springframework.roo.addon.dbre.DbreOperationsI mpl.reverseEngineerDatabase(DbreOperationsImpl.jav a:79)
          at rializeDatabaseMetadata(
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Native
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
          at java.lang.reflect.Method.invoke(
          at ls.invokeMethod(
          at org.springframework.roo.process.manager.ProcessMan agerHostedExecutionStrategy$1.callback(ProcessMana
          at org.springframework.roo.process.manager.internal.D efaultProcessManager.doTransactionally(DefaultProc
          at org.springframework.roo.process.manager.internal.D efaultProcessManager.execute(DefaultProcessManager .java:140)
          at org.springframework.roo.process.manager.ProcessMan agerHostedExecutionStrategy.execute(ProcessManager
          at eCommand(
          at mptLoop(
          at (


          • #6
            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* is too much.
            This will require more investigation


            • #7
              Is there anything I can do to assist you?


              • #8
                Perhaps you can make changes to the pom.xml in the jtopen directory underneath the wrapping directory. Previously I was excluding* I changed this to
                However it still gives the same error. You could tweak these settings, by first removing* to see what errors result. The driver needs a minimum set of dependencies for it to work, and making* optional was too severe. Make sure your in the project has the correct connection parameters.
                Procedure is:
                1) make change in pom.xml of <roo dir>/wrapping/jtopen
                2) run mvn clean install in <roo dir>/wrapping/jtopen
                3) run mvn clean install in <roo dir>/addon-jdbc
                4) start roo with
                rm -rf <roo dir>/bootstrap/target/osgi; roo-dev
                You will see errors in the dependencies in the startup. These can then be added to the Import-Package statement. Then repeat the process until no errors occur. The example above of* may need to be* for example, but you will see this in the error message when Roo starts. Let me know if you don't understand what I have said or are having trouble.

                We're doing a release next week and I am flat out at the moment on other things, so would appreciate it.

                Would you also log a bug on this in Jira?


                • #9
                  Thanks Alan. I'm out of town this week working on a bunch of other projects, but I'll try all of this when I'm back at the end of next week. Will keep you posted. I'll also open that JIRA bug.



                  • #10
                    JIRA bug opened ROO-1479


                    • #11
                      I believe I have resolved the issue, but will need you to test as I don't have access to a DB2/400 db as mentioned before. At least the driver is instantiated and not null



                      • #12
                        Well you're quicker than I was, lol.

                        It Worked!!! It is absolutely genius! It had no trouble determining the nearly 400 schemas in my database. I ran both introspect and dbre on my personal schema which doesn't have too many tables in it, and it all worked out just fine.

                        Truly an amazing tool! Btw, will you be in Chicago for SpringOne2GX?


                        • #13
                          That's great news it worked for you. The timing was excellent as well, as Ben and myself had committed a lot of performance enhancements a few days ago (ROO-1506) which made schemas with 400+ tables perform a lot better than before.

                          I can't make SpringOne unfortunately but Ben and Stefan will be there.


                          • #14
                            I had a regression bug as raised by myself in ROO-1528 that affects the referencedColumnName in the @JoinColumn annotation, so get the code and do a new build or wait for RC1.


                            • #15
                              I've just downloaded the 1.1.0-RELEASE version of Roo and it appears to still have this issue. I'm new to Roo, so there's a strong chance I'm doing something wrong, but I am getting the error message described originally in this thread. Here are the steps I've taken

                              roo> persistence setup --provider HIBERNATE --database DB2400

                              I have edited to fill in the hostname, username, and password.

                              I'm trying to introspect my library using the following:

                              roo> database introspect --schema MISKCB
                              No remote OBR repositories have matching add-ons matching your request
                              JDBC driver not available for ''

                              Anything I'm doing wrong?