Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 54

Thread: DBRE - Null pointer

  1. #11
    Join Date
    Oct 2005
    Posts
    8

    Default

    Oracle XE here as well. I have sent you sample project. Thanks,

  2. #12
    Join Date
    Jul 2010
    Posts
    4

    Default Identical issue

    I did successfully add the jar, manually, to my local repository for Oracle 11g. I had a successful test by creating a simple entity with a single field and was able to create an entry in the database via the web app.

    However, when attempting "database reverse engineer" or "database introspect" I receive the following error inside the roo command line app:

    No Spring Roo add-ons were found that offer a similar JDBC driver
    JDBC driver not available for 'oracle.jdbc.OracleDriver'

    It looks like the classpath used by the roo app also needs to have the Oracle driver added somehow? I am not sure if this is the case, or how to approach it.

    As a workaround how would I go about leveraging the composite key functionality without reverse engineering a table. I can perform the old method of introspection by manually creating the entities.

    Thanks,

    -Pete G

  3. #13
    Join Date
    Dec 2005
    Posts
    930

    Default

    Thanks for sending me the project. I will look into it over the weekend. Does the same issue occur if you run Roo from a Git build (ie pulled from master) or just with the downloaded 1.1.0.M3 release?
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  4. #14
    Join Date
    Dec 2005
    Posts
    930

    Default

    As a workaround how would I go about leveraging the composite key functionality without reverse engineering a table. I can perform the old method of introspection by manually creating the entities.
    You can create an entity with the --identifierType <some class> which will create a composite key class for you.

    I suggest you hang in there till I sort out the Oracle driver issue.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #15
    Join Date
    Dec 2005
    Posts
    930

    Default

    My apologies as I have just realised that the oracle jar and its dependencies need to be in the Roo bundle directory. Please copy com.springsource.oracle.jdbc-10.2.0.2.jar, com.springsource.javax.transaction-1.1.0.jar, and com.springsource.javax.resource-1.5.0.jar to the Roo distribution's bundle directory. Restart Roo and you should be set to go.

    We don't package Oracle as the jdbc driver jar is too large. The schema names in Oracle are case sensitive, so when I executed the following command:

    database instropect --schema DBRE

    I get:
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <database name="" schema="DBRE">
        <table name="CONTACT">
            <column index="1" name="CNTA_ID" primaryKey="true" required="true" size="22" type="DECIMAL"/>
            <column index="2" name="CNTA_NAME_FIRST" primaryKey="false" required="false" size="100" type="VARCHAR"/>
            <column index="3" name="CNTA_NAME_LAST" primaryKey="false" required="false" size="100" type="VARCHAR"/>
            <unique name="PK_CONTACT">
                <unique-column name="CNTA_ID" sequenceNumber="1"/>
            </unique>
            <exportedKey foreignTable="CONTACT_NOTE" name="FK_CONTACT_NOTE_ID" onDelete="cascade" onUpdate="cascade">
                <reference foreign="CNTA_ID" local="CNTA_ID" sequenceNumber="1"/>
            </exportedKey>
        </table>
        <table name="CONTACT_NOTE">
            <column index="1" name="CNNO_ID" primaryKey="true" required="true" size="22" type="DECIMAL"/>
            <column index="2" name="CNTA_ID" primaryKey="false" required="true" size="22" type="DECIMAL"/>
            <column index="3" name="CNNO_TYPE" primaryKey="false" required="true" size="22" type="DECIMAL"/>
            <column index="4" name="CNNO_DATE_CREATE" primaryKey="false" required="true" size="7" type="DATE"/>
            <column index="5" name="CNNO_DATE_UPDATE" primaryKey="false" required="true" size="7" type="DATE"/>
            <column index="6" name="CNNO_COMMENT" primaryKey="false" required="false" size="4000" type="CLOB"/>
            <foreignKey foreignTable="CONTACT" name="FK_CONTACT_NOTE_ID" onDelete="cascade" onUpdate="cascade">
                <reference foreign="CNTA_ID" local="CNTA_ID" sequenceNumber="1"/>
            </foreignKey>
            <unique name="PK_CONTACT_NOTE">
                <unique-column name="CNNO_ID" sequenceNumber="1"/>
            </unique>
        </table>
        <sequences>
            <sequence name="DBRE"/>
        </sequences>
    </database>
    "DBRE" is my own schema - use yours as appropriate.

    Hope this helps
    Alan
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  6. #16
    Join Date
    Jul 2010
    Posts
    4

    Default Location of files

    How do I retrieve the referenced files?

    Also would I want to substitute the Oracle 11g driver for the Spring Oracle 10 driver?

  7. #17
    Join Date
    Oct 2009
    Location
    Minneapolis, MN
    Posts
    137

    Default

    Well think you got it right on classpath thing

    Now im past that error and have different cant get connection

    {code}
    roo> database properties list
    database.driverClassName = oracle.jdbc.OracleDriver
    database.password = xxx
    database.url = jdbc:oracle:thin:@dbserver.com:1521/xxxx
    database.username = xxx
    roo> database introspect --schema xxx
    Unable to get connection from driver
    {code}

    will com.springsource.oracle.jdbc-10.2.0.2.jar support oracle 11 driver?

  8. #18
    Join Date
    Dec 2005
    Posts
    930

    Default

    Your Oracle XE url must have 'XE' in it like this

    Code:
    database.url = jdbc:oracle:thin:@dbserver.com:1521:XE
    To use an 11g driver, you will have to check first if the supplied driver from Oracle is OSGi compatible. If not, you will have to create a wrapped jar with the driver in it. If you download Roo from Git, the "wrapping" directory has some examples.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  9. #19
    Join Date
    Aug 2010
    Posts
    2

    Default Ms-sql

    could you give a hint on what dependencies + bundled files are needed to reverse engineer a a MS-SQL Database ?

    with
    - JDTS
    - MSSQL JDBC

  10. #20
    Join Date
    Oct 2005
    Posts
    8

    Default

    Quote Originally Posted by Alan Stewart View Post
    My apologies as I have just realised that the oracle jar and its dependencies need to be in the Roo bundle directory. Please copy com.springsource.oracle.jdbc-10.2.0.2.jar, com.springsource.javax.transaction-1.1.0.jar, and com.springsource.javax.resource-1.5.0.jar to the Roo distribution's bundle directory. Restart Roo and you should be set to go.
    Thanks Alan. It works.

Posting Permissions

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