|
I had the airline sample built and deployed successfully when using HSQLDB. Now I’m trying to deploy it using Oracle without much success. It seems like there are a number of problems I’m running into. First of all, if I go with the sequenceblock element, build works fine, but I get a run-time error from JBoss during deployment:
Caused by: java.sql.SQLException: Wrong data type: VARCHAR2 in statement [CREATE TABLE SEQ_BLOCK (name VARCHAR 2(255) NOT NULL, idx NUMBER(10) NOT NULL, CONSTRAINT PK_SEQ_BLOCK PRIMARY KEY (name))] at org.hsqldb.Trace.getError(Trace.java:180) at org.hsqldb.Result.<init>(Result.java:175) at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907) at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718) at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686) at org.hsqldb.jdbcStatement.executeUpdate(jdbcStatement.java:85) at org.jboss.resource.adapter.jdbc.local.LocalStatement.executeUpdate(LocalStatement.java:231) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:166) ... 83 more
Looks like for some reason it’s trying to use the HSQL database for SEQ_BLOCK table, even though I’m deploying on Oracle (The create table, and build really did use oracle. I verified that the database was set up correctly). Without getting too much into trying to figure out why it’s using HSQLDB for SEQ_BLOCK table, I decided to try using oracleSequence, without much success. I’ve seen someone mention a work-around for Weblogic, but I’m using JBoss.
Ideally, I’d like to use the oracleSequence element, but I get the following errors message, despite the fact that documentation (mentioned above) suggests that such element is supported by cmp20 plugin:
BUILD FAILED file:c:/middlegen-2.0-b1/samples/build.xml:139: Class middlegen.plugins.entitybean.CMP20Plugin doesn't support the nested "oraclesequence" element.
When trying to use the sequenceblock nested element (with schema attribute which is required for Oracle), I get the following error:
BUILD FAILED file:c:/middlegen-2.0-b1/samples/build.xml:139: Class middlegen.plugins.entitybean.SequenceBlock doesn't suppo rt the "schema" attribute.
According to documentation (http://boss.bekk.no/boss/middlegen/plugins/cmp20.html#sequenceblock), there is a schema attribute for sequenceblock and there also is a oracleSequence nested element for cmp20 plug-in.
I’m using jboss-3.0.4_tomcat-4.1.12, Middlegen 2.0-b1, XDoclet 1.2b2 and Oracle 9i.
Any help would be much appreciated.
Y. |
- RE: [Middlegen-user] Oracle Sequences Yuri Kouzmov
- RE: [Middlegen-user] Oracle Sequences Yuri Kouzmov
- RE: [Middlegen-user] Oracle Sequences Yuri Kouzmov
- RE: [Middlegen-user] Oracle Sequences Yuri Kouzmov
