Announcement Announcement Module
Collapse
No announcement yet.
Issue with DBRE Oracle JDBC Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with DBRE Oracle JDBC

    I have been trying for a number of hours to get the Oracle JDBC stuff working with no success. I have read a number of posts and I'm aware that this has to be done manually due to Oracle licensing issues. Can someone please post exactly what to do to get "database reverse engineer" working with Oracle and assume I'm new to development (please be detailed and do not skip over any steps).

    I have the following installed:
    STS 2.5.2
    ROO 1.1.1.RELEASE

    Currently I get the following error:
    roo> database reverse engineer --schema <myschema>
    addon search --requiresDescription "#jdbcdriver,driverclass:oracle.jdbc.OracleDri ver" found no matches
    JDBC driver not available for 'oracle.jdbc.OracleDriver'.

    I've read that I need to do extra stuff like running commands such as:

    persistence setup --provider HIBERNATE --database ORACLE

    addon create wrapper --topLevelPackage com.oracle.roo.JDBC --groupId com.oracle --artifactId ojdbc14 --version 10.2.0.2 --vendorName Oracle --licenseUrl http://www.oracle.com --description "#jdbcdriver,driverclass:oracle.jdbc.OracleDri ver"

    After running above command roo spits out:
    File 'C:\Dev\workspace_spring_roo\test2\pom.xml' already exists

    Is this an error that the command did not work, or is just an informational message
    Also, does the above command generate a file somewhere that I'm supposed to do something with?


    Anyway...if you can just list the commands to run from the beginning of a new project until you get "database reverse engineer" working with Oracle, I would be extremely greatful. Thanks!

  • #2
    A few more steps for Oracle JDBC

    I was trying to do the same thing but postponed my efforts when I realized that since my company uses Oracle 11 and JDK 6, I probably need to add ojdbc6 not ojdbc14 to my Roo project.

    Here is what I have learned so far that may help you.
    First, you need to create TWO Roo projects. One where you will create ODBC bundle and one where your real work is.
    Example:
    mkdir OdbcWrapper
    cd OdbcWrapper
    roo
    roo> addon create ...
    roo> quit

    You may need to edit the (newly) generated pom.xml as per http://forum.springsource.org/showthread.php?t=100985

    Unfortunately, there are several dependencies that you also need to add to your OdbcWrapper 'project'. I found the first two

    http://grepcode.com/snapshot/reposit...nsaction/1.1.0
    http://grepcode.com/snapshot/reposit...resource/1.5.0

    cd to directory where you downloaded these .jar files
    mvn install:install-file –DgroupId=javax.transaction –DartifactId=spring-jta –Dversion=1.1.0 –Dpackaging=jar –Dfile=com.springsource.javax.transaction-1.1.0.jar
    mvn install:install-file –DgroupId=javax.resource –DartifactId=spring-resource –Dversion=1.5.0 –Dpackaging=jar –Dfile=com.springsource.javax.resource-1.5.0.jar

    (warning: files in my local Maven Repository were renamed spring-jta-1.1.0.jar and spring-resource-1.5.0.jar respectively so you may want to use different artifactId values)

    Back in OdbcWrapper dir
    Edit pom.xml to use above artifactIds
    mvn bundle:bundle

    (this succeeded for me. If you get 'Missing artifacts' error, you have more dependencies to track down)

    roo
    roo> osgi install --url file:///c:/springsource/spring-roo-1.1.1.RELEASE/project
    s/OdbcWrapper/target/oracle.ojdbc14-10.2.0.2.0001.jar
    roo> quit

    (you may need to run 'mvn install' so that your bundled ODBC is copied to your local Maven repository)

    cd to your real project directory
    edit pom.xml
    Add or edit the odjbc14 dependency to match group id, artifactId and version for your bundled ODBC
    e.g.
    <dependency>
    <groupId>oracle</groupid>
    <artifactId>oracle.ojdbc14</artifactId>
    <version>10.2.0.2.0001</version>
    </dependency>

    Unfortunately, I'm not done. When I tried to do database introspection (similar to DBRE), I got this error:

    roo> database introspect --schema myschema

    --> [Thread-2] [oracle.ojdbc14 [73]] FrameworkEvent ERROR
    org.apache.felix.log.LogException: org.osgi.framework.BundleException
    : Unresolved constraint in bundle oracle.ojdbc14 [73]: package; (package=oracle.
    security.pki)
    ...
    JDBC driver not available for 'oracle.jdbc.OracleDriver'

    This is where I stopped. I need to wrap more Oracle jars and add them to my project.

    fyi, findjar.com claims oracle.security.pki is in oraclepki.jar or oraclekpi103.jar
    I found these jars in our installed Oracle 11g directory structure, under ORACLE_HOME/jlib and ORACLE_HOME/oc4j/jlib.

    I hope this gets you a little closer.

    Comment


    • #3
      Okay...I got it working. There is one reference I found this morning that really helped me:

      http://saber.b2b2000.com/display/BLU...ring+on+Oracle

      I followed exactly what this link said to do with one exception. On step #7, it said to modify the MANIFEST.MF file and remove the unneeded dependencies. I did not do this.

      I removed the dependencies a different way. After completing step #5 (modifying the pom.xml file), I added the following to the pom.xml file:

      Find <artifactId>maven-bundle-plugin</artifactId>
      Within the <instructions> section, add this line:

      <Import-Package>!oracle.security.pki,!oracle.ons,!oracle.i 18n.text.converter,*</Import-Package>

      This is an easier/cleaner way to remove the unneeded dependencies.

      Comment


      • #4
        After doing the above setup, when hitting a newer 10.2.0.5 database, I was getting JDBC errors, so I also configured the ojdbc6 jar. I followed the same steps as above, but had to exclude additional dependencies. This is what I excluded and it seems to be working.

        I did the exclusion using pom.xml as before by adding this line:

        <Import-Package>!oracle.security.pki,!oracle.ons,!oracle.i 18n.text,!oracle.i18n.text.converter,!oracle.xml.p arser.v2,!sun.security.krb5.internal,!oracle.xdb,! com.sun.security.auth.module,!sun.security.util,!s un.security.krb5,*</Import-Package>

        Basically it means, do not import any entry with ! in front of it, and the last * means include everything else that is needed.

        Comment


        • #5
          This wrapping pom works for the 10.2.0.2 jar (Oracle XE).

          Use the extra exclusions in the ImportPackage to get later versions to work, as you have already observed.

          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          	<modelVersion>4.0.0</modelVersion>
          	<groupId>oracle</groupId>
          	<artifactId>oracle.ojdbc14</artifactId>
          	<packaging>bundle</packaging>
          	<version>10.2.0.2.0001</version>
          	<name>oracle</name>
          	<description>This bundle wraps the standard Maven artifact: ${pkgArtifactId}-${pkgVersion}.</description>
          	<properties>
          		<pkgArtifactId>ojdbc14</pkgArtifactId>
          		<pkgVersion>10.2.0.2</pkgVersion>
          		<osgiVersion>${pkgVersion}.0001</osgiVersion>
          		<pkgVendor>Oracle</pkgVendor>
          		<pkgDocUrl/>
          		<pkgLicense>http://www.oracle.com/technetwork/licenses/distribution-license-152002.html</pkgLicense>
          	</properties>
          
          	<dependencies>
          		<dependency>
          			<groupId>oracle.jdbc.driver</groupId>
          			<artifactId>ojdbc14</artifactId>
          			<version>${pkgVersion}</version>
          			<optional>true</optional>
          		</dependency>
          	</dependencies>
          
              <build>
                  <plugins>
          			<plugin>
          				<groupId>org.apache.felix</groupId>
          				<artifactId>maven-bundle-plugin</artifactId>
                          <version>2.3.4</version>
          				<extensions>true</extensions>
          				<configuration>
          					<instructions>
          						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
          						<Export-Package>*;version=${pom.version}</Export-Package>
          						<Bundle-Vendor>${pkgVendor} (wrapped into an OSGi bundle by the Spring Roo project build system)</Bundle-Vendor>
          						<Bundle-DocURL>${pkgDocUrl}</Bundle-DocURL>
          						<Bundle-License>${pkgLicense}</Bundle-License>
                                  <Import-Package>oracle.i18n.*;resolution:=optional,oracle.ons.*;resolution:=optional,oracle.security.pki.*;resolution:=optional,*</Import-Package>
          					</instructions>
          				</configuration>
          			</plugin>
                  </plugins>
              </build>
          
          </project>

          Comment


          • #6
            Hello,

            I have created my oracle bundle and I can use the command "database reverse engineer --schema mySchema". It works fine.

            It created for each tables a java file, but there is no attributs, it's normal?

            Comment


            • #7
              They will be in each entity's _Roo_DbManaged.aj ITD file
              Alan

              Comment


              • #8
                If I use a persistence provider HIBERNATE, it just create java file :
                Code:
                com.dbre03.3 roo> database reverse engineer --schema OKARMA --package ~.okarma
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Bu.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Category.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\ConfStatus.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\ConfType.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\CpeType.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DeviceStatus.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DeviceType.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DownloadedStatus.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DownloadProtocol.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DownloadServer.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\DownloadServerStatus.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\FirmwareStatus.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\GlobalParameterPK.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\GlobalParameter.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\KarmaRequestTrigger.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\KrmProtocol.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Publisher.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\RequestType.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Right.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Role.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Test.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Toto.java
                Created SRC_MAIN_JAVA\com\dbre03\3\okarma\Users.java
                Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml
                Created ROOT\.roo-dbre
                com.dbre03.3 roo>
                But if use a ECLIPSELINK persistence provider :
                Code:
                roo> database reverse engineer --schema OKARMA --package okarma
                Created SRC_MAIN_JAVA\okarma
                Created SRC_MAIN_JAVA\okarma\Bu.java
                Created SRC_MAIN_JAVA\okarma\Category.java
                Created SRC_MAIN_JAVA\okarma\ConfStatus.java
                Created SRC_MAIN_JAVA\okarma\ConfType.java
                Created SRC_MAIN_JAVA\okarma\CpeType.java
                Created SRC_MAIN_JAVA\okarma\DeviceStatus.java
                Created SRC_MAIN_JAVA\okarma\DeviceType.java
                Created SRC_MAIN_JAVA\okarma\DownloadedStatus.java
                Created SRC_MAIN_JAVA\okarma\DownloadProtocol.java
                Created SRC_MAIN_JAVA\okarma\DownloadServer.java
                Created SRC_MAIN_JAVA\okarma\DownloadServerStatus.java
                Created SRC_MAIN_JAVA\okarma\FirmwareStatus.java            Created okarma.Users
                Created SRC_MAIN_JAVA\okarma\GlobalParameterPK.java
                Created SRC_MAIN_JAVA\okarma\GlobalParameter.java
                Created SRC_MAIN_JAVA\okarma\KarmaRequestTrigger.java
                Created SRC_MAIN_JAVA\okarma\KrmProtocol.java
                Created SRC_MAIN_JAVA\okarma\Publisher.java
                Created SRC_MAIN_JAVA\okarma\RequestType.java
                Created SRC_MAIN_JAVA\okarma\Right.java
                Created SRC_MAIN_JAVA\okarma\Role.java
                Created SRC_MAIN_JAVA\okarma\Test.java
                Created SRC_MAIN_JAVA\okarma\Toto.java
                Created SRC_MAIN_JAVA\okarma\Users.java
                Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml
                Created SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_DbManaged.aj
                Created SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_ToString.aj
                Created SRC_MAIN_JAVA\okarma\Test_Roo_Entity.aj
                Created SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_Entity.aj
                Created SRC_MAIN_JAVA\okarma\RequestType_Roo_Entity.aj
                Created SRC_MAIN_JAVA\okarma\Test_Roo_DbManaged.aj
                Created SRC_MAIN_JAVA\okarma\RequestType_Roo_Configurable.aj
                Created ROOT\.roo-dbre
                Created SRC_MAIN_JAVA\okarma\Test_Roo_Configurable.aj
                Created SRC_MAIN_JAVA\okarma\Test_Roo_ToString.aj
                Created SRC_MAIN_JAVA\okarma\RequestType_Roo_ToString.aj
                Created SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_Configurable.aj
                Undo create SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_Configurable.aj
                Undo create SRC_MAIN_JAVA\okarma\RequestType_Roo_ToString.aj
                Undo create SRC_MAIN_JAVA\okarma\Test_Roo_ToString.aj
                Undo create SRC_MAIN_JAVA\okarma\Test_Roo_Configurable.aj
                Undo create ROOT\.roo-dbre
                Undo create SRC_MAIN_JAVA\okarma\RequestType_Roo_Configurable.aj
                Undo create SRC_MAIN_JAVA\okarma\Test_Roo_DbManaged.aj
                Undo create SRC_MAIN_JAVA\okarma\RequestType_Roo_Entity.aj
                Undo create SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_Entity.aj
                Undo create SRC_MAIN_JAVA\okarma\Test_Roo_Entity.aj
                Undo create SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_ToString.aj
                Undo create SRC_MAIN_JAVA\okarma\KrmProtocol_Roo_DbManaged.aj
                Undo manage SRC_MAIN_RESOURCES\META-INF\persistence.xml
                Undo create SRC_MAIN_JAVA\okarma\Users.java
                Undo create SRC_MAIN_JAVA\okarma\Toto.java
                Undo create SRC_MAIN_JAVA\okarma\Test.java
                Undo create SRC_MAIN_JAVA\okarma\Role.java
                Undo create SRC_MAIN_JAVA\okarma\Right.java
                Undo create SRC_MAIN_JAVA\okarma\RequestType.java
                Undo create SRC_MAIN_JAVA\okarma\Publisher.java
                Undo create SRC_MAIN_JAVA\okarma\KrmProtocol.java
                Undo create SRC_MAIN_JAVA\okarma\KarmaRequestTrigger.java
                Undo create SRC_MAIN_JAVA\okarma\GlobalParameter.java
                Undo create SRC_MAIN_JAVA\okarma\GlobalParameterPK.java
                Undo create SRC_MAIN_JAVA\okarma\FirmwareStatus.java
                Undo create SRC_MAIN_JAVA\okarma\DownloadServerStatus.java
                Undo create SRC_MAIN_JAVA\okarma\DownloadServer.java
                Undo create SRC_MAIN_JAVA\okarma\DownloadProtocol.java
                Undo create SRC_MAIN_JAVA\okarma\DownloadedStatus.java
                Undo create SRC_MAIN_JAVA\okarma\DeviceType.java
                Undo create SRC_MAIN_JAVA\okarma\DeviceStatus.java
                Undo create SRC_MAIN_JAVA\okarma\CpeType.java
                Undo create SRC_MAIN_JAVA\okarma\ConfType.java
                Undo create SRC_MAIN_JAVA\okarma\ConfStatus.java
                Undo create SRC_MAIN_JAVA\okarma\Category.java
                Undo create SRC_MAIN_JAVA\okarma\Bu.java
                Undo create SRC_MAIN_JAVA\okarma
                NullPointerException at org.springframework.roo.addon.dbre.DbreMetadata.addOneTo
                OneFields(DbreMetadata.java:208)

                Comment


                • #9
                  Can you please try this with 1.1.3 or better still a snapshot build of 1.1.4? The NPE you get has been resolved in these versions

                  Comment


                  • #10
                    I install Roo 1.1.3, regenerate a new bundle and I got this error :

                    with ECLIPSELINK persistence and oracle :
                    Code:
                    roo> database reverse engineer --schema OKARMA --package okarma
                    Updated SRC_MAIN_RESOURCES\dbre.xml
                    java.lang.IllegalStateException: java.net.UnknownHostException: db.apache.org
                            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabas
                    eStructureFromInputStream(DatabaseXmlUtils.java:71)
                            at org.springframework.roo.addon.dbre.model.DbreModelServiceImpl.getData
                    base(DbreModelServiceImpl.java:92)
                            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.deseriali
                    zeDatabase(DbreDatabaseListenerImpl.java:100)
                            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.onFileEve
                    nt(DbreDatabaseListenerImpl.java:82)
                            at org.springframework.roo.file.monitor.polling.PollingFileMonitorServic
                    e.publish(PollingFileMonitorService.java:330)
                            at org.springframework.roo.file.monitor.polling.PollingFileMonitorServic
                    e.scanNotified(PollingFileMonitorService.java:213)
                            at org.springframework.roo.process.manager.internal.DefaultProcessManage
                    r.doTransactionally(DefaultProcessManager.java:189)
                            at org.springframework.roo.process.manager.internal.DefaultProcessManage
                    r.execute(DefaultProcessManager.java:143)
                            at org.springframework.roo.process.manager.ProcessManagerHostedExecution
                    Strategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
                            at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractSh
                    ell.java:182)
                            at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.
                    java:373)
                            at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:13
                    4)
                            at java.lang.Thread.run(Unknown Source)
                    Caused by: java.net.UnknownHostException: db.apache.org
                            at java.net.PlainSocketImpl.connect(Unknown Source)
                            at java.net.SocksSocketImpl.connect(Unknown Source)
                            at java.net.Socket.connect(Unknown Source)
                            at java.net.Socket.connect(Unknown Source)
                            at sun.net.NetworkClient.doConnect(Unknown Source)
                            at sun.net.www.http.HttpClient.openServer(Unknown Source)
                            at sun.net.www.http.HttpClient.openServer(Unknown Source)
                            at sun.net.www.http.HttpClient.<init>(Unknown Source)
                            at sun.net.www.http.HttpClient.New(Unknown Source)
                            at sun.net.www.http.HttpClient.New(Unknown Source)
                            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
                    Source)
                            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
                    ce)
                            at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
                            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
                    urce)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent
                    Entity(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(
                    Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEnti
                    ty(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSou
                    rce(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri
                    ver.dispatch(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri
                    ver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog
                    Driver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
                    l.scanDocument(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
                    urce)
                            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
                    known Source)
                            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
                    arse(Unknown Source)
                            at javax.xml.parsers.SAXParser.parse(Unknown Source)
                            at javax.xml.parsers.SAXParser.parse(Unknown Source)
                            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabas
                    eStructureFromInputStream(DatabaseXmlUtils.java:66)
                            ... 12 more
                    roo>
                    with HIBERNATE persistence and oracle :
                    Code:
                    roo> database reverse engineer --schema OKARMA --package okarma
                    Created SRC_MAIN_RESOURCES\dbre.xml
                    Updated ROOT\pom.xml
                    Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml
                    java.lang.IllegalStateException: java.net.UnknownHostException: db.apache.org
                            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabas
                    eStructureFromInputStream(DatabaseXmlUtils.java:71)
                            at org.springframework.roo.addon.dbre.model.DbreModelServiceImpl.getData
                    base(DbreModelServiceImpl.java:92)
                            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.deseriali
                    zeDatabase(DbreDatabaseListenerImpl.java:100)
                            at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.onFileEve
                    nt(DbreDatabaseListenerImpl.java:82)
                            at org.springframework.roo.file.monitor.polling.PollingFileMonitorServic
                    e.publish(PollingFileMonitorService.java:330)
                            at org.springframework.roo.file.monitor.polling.PollingFileMonitorServic
                    e.scanNotified(PollingFileMonitorService.java:213)
                            at org.springframework.roo.process.manager.internal.DefaultProcessManage
                    r.doTransactionally(DefaultProcessManager.java:189)
                            at org.springframework.roo.process.manager.internal.DefaultProcessManage
                    r.execute(DefaultProcessManager.java:143)
                            at org.springframework.roo.process.manager.ProcessManagerHostedExecution
                    Strategy.execute(ProcessManagerHostedExecutionStrategy.java:47)
                            at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractSh
                    ell.java:182)
                            at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.
                    java:373)
                            at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:13
                    4)
                            at java.lang.Thread.run(Unknown Source)
                    Caused by: java.net.UnknownHostException: db.apache.org
                            at java.net.PlainSocketImpl.connect(Unknown Source)
                            at java.net.SocksSocketImpl.connect(Unknown Source)
                            at java.net.Socket.connect(Unknown Source)
                            at java.net.Socket.connect(Unknown Source)
                            at sun.net.NetworkClient.doConnect(Unknown Source)
                            at sun.net.www.http.HttpClient.openServer(Unknown Source)
                            at sun.net.www.http.HttpClient.openServer(Unknown Source)
                            at sun.net.www.http.HttpClient.<init>(Unknown Source)
                            at sun.net.www.http.HttpClient.New(Unknown Source)
                            at sun.net.www.http.HttpClient.New(Unknown Source)
                            at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
                    Source)
                            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
                    ce)
                            at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
                            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
                    urce)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent
                    Entity(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(
                    Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEnti
                    ty(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSou
                    rce(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri
                    ver.dispatch(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri
                    ver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog
                    Driver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
                    l.scanDocument(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(U
                    nknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown So
                    urce)
                            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Un
                    known Source)
                            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
                    arse(Unknown Source)
                            at javax.xml.parsers.SAXParser.parse(Unknown Source)
                            at javax.xml.parsers.SAXParser.parse(Unknown Source)
                            at org.springframework.roo.addon.dbre.model.DatabaseXmlUtils.readDatabas
                    eStructureFromInputStream(DatabaseXmlUtils.java:66)
                            ... 12 more

                    Comment


                    • #11
                      Your error indicates the apache server is doen. Since this is problematic I removed the doctype declaration from the xml for 1.1.4, so this error won't occur again.

                      Either try again or use the latest 1.1.4 snapshot

                      Alan

                      Comment


                      • #12
                        with 1.1.4 snapshot, i took first link here : 1.1.4 downloads


                        With Hibernate or Eclipselink it's same result, it just created java files and no aj files, so there isn't attibuts in classes :s

                        Maybe I can do something with "dbre.xml".

                        Thank's for your help

                        Manuel.

                        Comment


                        • #13
                          Hi, i still having problem with Ojdbc6. can you please share you pom.xml file ?
                          and which version of roo you are using ? i am using 1.1.5.
                          thanks.
                          Originally posted by ryanallen View Post
                          After doing the above setup, when hitting a newer 10.2.0.5 database, I was getting JDBC errors, so I also configured the ojdbc6 jar. I followed the same steps as above, but had to exclude additional dependencies. This is what I excluded and it seems to be working.

                          I did the exclusion using pom.xml as before by adding this line:

                          <Import-Package>!oracle.security.pki,!oracle.ons,!oracle.i 18n.text,!oracle.i18n.text.converter,!oracle.xml.p arser.v2,!sun.security.krb5.internal,!oracle.xdb,! com.sun.security.auth.module,!sun.security.util,!s un.security.krb5,*</Import-Package>

                          Basically it means, do not import any entry with ! in front of it, and the last * means include everything else that is needed.

                          Comment


                          • #14
                            The link you provided in your post doesn't appear to work now

                            Originally posted by ryanallen View Post
                            Okay...I got it working. There is one reference I found this morning that really helped me:

                            http://saber.b2b2000.com/display/BLU...ring+on+Oracle

                            I followed exactly what this link said to do with one exception. On step #7, it said to modify the MANIFEST.MF file and remove the unneeded dependencies. I did not do this.

                            I removed the dependencies a different way. After completing step #5 (modifying the pom.xml file), I added the following to the pom.xml file:

                            Find <artifactId>maven-bundle-plugin</artifactId>
                            Within the <instructions> section, add this line:

                            <Import-Package>!oracle.security.pki,!oracle.ons,!oracle.i 18n.text.converter,*</Import-Package>

                            This is an easier/cleaner way to remove the unneeded dependencies.
                            I am having the same problem , but it seems like the link you provided is not working any more.

                            Comment


                            • #15
                              Originally posted by manik971 View Post
                              Hello,

                              I have created my oracle bundle and I can use the command "database reverse engineer --schema mySchema". It works fine.

                              It created for each tables a java file, but there is no attributs, it's normal?
                              Manik can ou please shoare how did you created oracle bundle and how did you configure it for ROO. I am stuck while trying to create OSGI bundle for oracle driver "OJDBC6" and I am using Spring roo 1.2.1.

                              Comment

                              Working...
                              X