Hi,
I'm running middlegen with ant and I have a Oracle database and want to middlegen to create both hbm.xml and java files if possible. But right now I can't get Middegen to find my oracle jdbc driver.
The driver I got today (working fine in Websphere) is classes12.zip but what I can find see in in build.xml and build.properties.sample middlegen only manages .jar files. Is anyone using classes12.jar?
Has anybody connected to oracle with middlegen and can help me?
build.xml
------------
Code:
<!DOCTYPE project [
<!ENTITY database SYSTEM "file:./config/database/hsqldb.xml">
<!ENTITY database SYSTEM "file:./config/database/oracle.xml">
<!ENTITY ejb SYSTEM "file:./config/ejb/jboss.xml">
<!--ENTITY ejb SYSTEM "file:./config/ejb/weblogic.xml"-->
<!--ENTITY ejb SYSTEM "file:./config/ejb/mvcsoft.xml"-->
]>
build.properties.sample
--------------------------'
Code:
#middlegen.skip=dummy
build.compiler=modern
#Tell Middlegen where weblogic.jar is located. Works with 6.1 and 7.0
#weblogic.jar=D:/bea/wlserver6.1/lib/weblogic.jar
weblogic.jar=D:/bea/weblogic700/server/lib/weblogic.jar
#Tell Middlegen where JBoss is located.
jboss.home=D:/jboss-3.0.0
#Tell Middlegen where to deploy the ear file.
deploy.dir=${jboss.home}/server/default/deploy
#deploy.dir=D:/bea/user_projects/ApplicationDomain/applications
#Tell Middlegen where MVCSoft is located.
mvcsoft.home=D:/persistence_mvcsoft
#Tell Middlegen where Oracle is located.
oracle.home=C:/OracleJDBC/Lib/classes12/oracle/jdbc
#Gui or not?
gui=true
# Middlegen is only bundled with JDBC drivers for HsqlDB, MySql and PostgreSQL.
# If you edit build.xml to use a different database, you should point
# out the location of the jar containing the driver here.
#McKoi
mckoi.home=D:/mckoi0.93
mckoidb.jar=${mckoi.home}/mckoidb.jar
mkjdbc.jar=${mckoi.home}/mkjdbc.jar
classes12.zip=${oracle.home}/classes12.zip
#uncomment this to run the compatibility test for a specific driver/db
#note that you might need to edit the script in order for your database
#to accept it. (e.g. mysql needs indexes and type=innodb after each table creation)
#this also requires that you have the middlegen sources
#database.script.file=../src/sql/relations.sql
Oracle.xml
-------------
<!-- =================================================================== -->
<!-- ant properties/targets for oracle 8/9 -->
<!-- note: this is not a proper xml file (there is no root element) -->
<!-- it is intended to be imported from a *real* xml file -->
<!-- =================================================================== -->
<!-- please set your Oracle-SID according to your needs -->
<property environment="env"/>
<property name="database.script.file" value="${src.dir}/sql/${name}-oracle.sql"/>
<!-- <property name="database.driver.file" value="${env.ORACLE_HOME}/jdbc/lib/classes12.jar"/> -->
<property name="database.driver.file" value="${env.ORACLE_HOME}/OracleJDBC/Lib/classes12/oracle/jdbc/classes12.zip"/>
<property name="database.driver.classpath" value="${database.driver.file}"/>
<property name="database.driver" value="oracle.jdbc.driver.OracleDriver"/>
<property name="database.url" value="jdbc:oracle:thin:@localhost:1521:<ORASID>"/>
<property name="database.userid" value=""/>
<property name="database.password" value=""/>
<property name="database.schema" value=""/>
<property name="database.catalog" value=""/>
<!--property name="jboss.datasource.mapping" value="Oracle7"/-->
<property name="jboss.datasource.mapping" value="Oracle8"/>
<!--property name="jboss.datasource.mapping" value="Oracle9i"/-->
Best regs
Johan