Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Spring Roo DB2 introspection fails

  1. #11
    Join Date
    Dec 2005
    Posts
    929

    Default

    If you simply press TAB on the --database option in the persistence setup command you will see two options for DB2: DB2_400 and DB2_EXPRESS_C. There is no option for the string "DB2" itself
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  2. #12

    Default

    So I followed wallenborn direction but got an issue on Step 6

    persistence setup --provider HIBERNATE --database DB2 --hostName localhost --databaseName foo --userName foo --password bar

    As Alan pointed out you will get only two options for DB2 i.e DB2_400 and DB2_EXPRESS_C.
    I went ahead to change DB2 in above command to DB2_400
    This allowed me to get persistence.xml and database.properties file that get roo automatically generates. I manually went and changed these files to reflect the actual values

    Changes in persistence.xml
    Change <property name="hibernate.dialect" value="org.hibernate.dialect.DB2400Dialect"/>
    to <property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>

    Changes in database.properties
    1. Change database.url=jdbc\:as400\://dummy/dummy
    to database.url=jdbc:db2://yourhost:yourport/databasename
    2. Change database.driverClassName=com.ibm.as400.access.AS40 0JDBCDriver
    to database.driverClassName=com.ibm.db2.jcc.DB2Driver

    After making this change, it was smooth sailing. Steps below just worked fine.

    database introspect --schema foo
    database reverse engineer --schema foo

    Hope this helps.

  3. #13
    Join Date
    Dec 2005
    Posts
    929

    Default

    The DB2_EXPRESS_C option will give you the closest configuration for most DB2 platforms apart from AS/400. The DB2_400 option is unique in that it uses a completely different driver (jt400), which is not supplied by IBM.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  4. #14
    Join Date
    Jan 2013
    Posts
    1

    Default

    I've also tried the same thing, and some variations of it. And I always stop on the step 4. mvn bundle:bundle with the following resulting message:

    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building com-ibm-db2-roo-jdbc 9.7.2.0001
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-bundle-plugin:2.3.4:bundle (default-cli) @ com.ibm.db2.roo.jdbc.db2jcc ---
    [WARNING] Warning building bundle com.ibm.db2.roo.jdbc:com.ibm.db2.roo.jdbc.db2jcc:b undle:9.7.2.0001 : Split package MET
    A-INF
    Use directive -split-package:=(merge-first|merge-last|error|first) on Export/Private Package instruction to get rid of t
    his warning
    Package found in [Jar:., Jar:db2jcc]
    Reference from C:\WINDOWS\Profiles\mapereira\.m2\repository\com\i bm\db2jcc\9.7.2\db2jcc-9.7.2.jar
    Classpath [Jar:., Jar:db2jcc]
    [WARNING] Warning building bundle com.ibm.db2.roo.jdbc:com.ibm.db2.roo.jdbc.db2jcc:b undle:9.7.2.0001 : Did not find matc
    hing referal for com.ibm.websphere.*
    [WARNING] Warning building bundle com.ibm.db2.roo.jdbc:com.ibm.db2.roo.jdbc.db2jcc:b undle:9.7.2.0001 : Did not find matc
    hing referal for org.w3c.*
    [WARNING] Warning building bundle com.ibm.db2.roo.jdbc:com.ibm.db2.roo.jdbc.db2jcc:b undle:9.7.2.0001 : Did not find matc
    hing referal for org.xml.*
    [ERROR] Error building bundle com.ibm.db2.roo.jdbc:com.ibm.db2.roo.jdbc.db2jcc:b undle:9.7.2.0001 : Unresolved references
    to [com.ibm.jvm, com.ibm.jvm.classloader] by class(es) on the Bundle-Classpath[Jar:dot]: [com/ibm/db2/jcc/b/md.class, C
    OM/ibm/db2os390/dsn/JARLoader.class]
    [ERROR] Error(s) found in bundle configuration
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 6.125s
    [INFO] Finished at: Mon Jan 14 13:09:05 EST 2013
    [INFO] Final Memory: 4M/15M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:2.3.4:bundle (default-cli) on project com.ibm.db2.ro
    o.jdbc.db2jcc: Error(s) found in bundle configuration -> [Help 1]

    I'm still trying to search for a solution on other means, withouy success so far. Nevertheless, I thank you in advance for any help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •