Oracle XE here as well. I have sent you sample project. Thanks,
Oracle XE here as well. I have sent you sample project. Thanks,
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
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?
You can create an entity with the --identifierType <some class> which will create a composite key class for you.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.
I suggest you hang in there till I sort out the Oracle driver issue.
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:
"DBRE" is my own schema - use yours as appropriate.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>
Hope this helps
Alan
How do I retrieve the referenced files?
Also would I want to substitute the Oracle 11g driver for the Spring Oracle 10 driver?
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?
Your Oracle XE url must have 'XE' in it like this
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.Code:database.url = jdbc:oracle:thin:@dbserver.com:1521:XE
could you give a hint on what dependencies + bundled files are needed to reverse engineer a a MS-SQL Database ?
with
- JDTS
- MSSQL JDBC