Back Forum Reply New

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 quot;database reverse engineerquot; 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:
roogt; database reverse engineer --schema lt;myschemagt;
addon search --requiresDescription quot;#jdbcdriver,driverclassracle.jdbc.OracleDri  verquot; 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 --licenseucl from----description quot;#jdbcdriver,driverclassracle.jdbc.OracleDri  verquot;
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 quot;database reverse engineerquot; working with Oracle, I would be extremely greatful.  Thanks!

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.

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

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 lt;artifactIdgt;maven-bundle-pluginlt;/artifactIdgt;
Within the lt;instructionsgt; section, add this line:

lt;Import-Packagegt;!oracle.security.pki,!oracle.ons,!oracle.i  18n.text.converter,*lt;/Import-Packagegt;

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

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:

lt;Import-Packagegt;!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,*lt;/Import-Packagegt;

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

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:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;project xmlns=quotOM/4.0.0quot; xmlns:xsi=quot;2001/XMLSchema-instancequot; xsi:schemaLocation=quotOM/4.0.0 maven-v4_0_0.xsdquot;gt;
lt;modelVersiongt;4.0.0lt;/modelVersiongt;
lt;groupIdgt;oraclelt;/groupIdgt;
lt;artifactIdgt;oracle.ojdbc14lt;/artifactIdgt;
lt;packaginggt;bundlelt;/packaginggt;
lt;versiongt;10.2.0.2.0001lt;/versiongt;
lt;namegt;oraclelt;/namegt;
lt;descriptiongt;This bundle wraps the standard Maven artifact: ${pkgArtifactId}-${pkgVersion}.lt;/descriptiongt;
lt;propertiesgt;
lt;pkgArtifactIdgt;ojdbc14lt;/pkgArtifactIdgt;
lt;pkgVersiongt;10.2.0.2lt;/pkgVersiongt;
lt;osgiVersiongt;${pkgVersion}.0001lt;/osgiVersiongt;
lt;pkgVendorgt;Oraclelt;/pkgVendorgt;
lt;pkgDocucl/gt;
lt;pkgLicensegt;technetwork/licenses/distribution-license-152002.htmllt;/pkgLicensegt;
lt;/propertiesgt;

lt;dependenciesgt;
lt;dependencygt;
lt;groupIdgt;oracle.jdbc.driverlt;/groupIdgt;
lt;artifactIdgt;ojdbc14lt;/artifactIdgt;
lt;versiongt;${pkgVersion}lt;/versiongt;
lt;optionalgt;truelt;/optionalgt;
lt;/dependencygt;
lt;/dependenciesgt;
   lt;buildgt;       lt;pluginsgt;
lt;plugingt;
lt;groupIdgt;org.apache.felixlt;/groupIdgt;
lt;artifactIdgt;maven-bundle-pluginlt;/artifactIdgt;    lt;versiongt;2.3.4lt;/versiongt;
lt;extensionsgt;truelt;/extensionsgt;
lt;configurationgt;
lt;instructionsgt;
lt;Bundle-SymbolicNamegt;${pom.artifactId}lt;/Bundle-SymbolicNamegt;
lt;Export-Packagegt;*;version=${pom.version}lt;/Export-Packagegt;
lt;Bundle-Vendorgt;${pkgVendor} (wrapped into an OSGi bundle by the Spring Roo project build system)lt;/Bundle-Vendorgt;
lt;Bundle-Docuclgt;${pkgDocucl}lt;/Bundle-Docuclgt;
lt;Bundle-Licensegt;${pkgLicense}lt;/Bundle-Licensegt;            lt;Import-Packagegt;oracle.i18n.*;resolution:=optional,oracle.ons.*;resolution:=optional,oracle.security.pki.*;resolution:=optional,*lt;/Import-Packagegt;
lt;/instructionsgt;
lt;/configurationgt;
lt;/plugingt;       lt;/pluginsgt;   lt;/buildgt;

lt;/projectgt;
¥
Back Forum Reply New