It works if I leave out the "as col_0_0_" part, if i leave it in i get an Invalid datatype exception.
Here's the mapping file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="bus.Country" table="XMCTRY0">
<id name="COUNTRY" column="CTCCDE" type="string">
<generator class="increment"/>
</id>
<property name="DESCRIPTION" column="CTLNAM" type="string"/>
<property name="SHORTDESCRIPTION" column="CTSNAM" type="string"/>
<property name="ECONOMICGROUP" column="CTEGRP" type="string"/>
<property name="ECCNGROUP" column="CTECCNG" type="string"/>
<property name="IMPORTGROUP" column="CTCCIM" type="string"/>
<property name="EXPORTGROUP" column="CTCCEX" type="string"/>
<property name="DOMESTICINBOUNDGROUP" column="CTCCDX" type="string"/>
<property name="DOMESTICOUTBOUNDGROUP" column="CTCCDI" type="string"/>
<property name="VATPREFIXNUMBER" column="CTVATP" type="string"/>
<property name="NATIONALITY" column="CTNATD" type="string"/>
<property name="ALTERNATIVECODE" column="CTACDE" type="string"/>
<property name="MARKET" column="CTGRP" type="string"/>
<property name="DATEFORMAT" column="CTDATF" type="string"/>
<property name="DECIMALFORMAT" column="CTDECF" type="string"/>
<property name="ISOCODE" column="CTISO" type="string"/>
<property name="ISONUMERICCODE" column="CTISON" type="string"/>
<property name="FORINTRASTATREPORTING" column="CTINTR" type="string"/>
<property name="ZONE" column="CTPZON" type="string"/>
<property name="ZONEFORMAT" column="CTZNFM" type="string"/>
<property name="POSTALCODEFORMAT" column="CTPCFM" type="string"/>
<property name="FOREIGNTRADEZONE" column="CTFTZC" type="string"/>
<property name="PRIMARYLANGUAGEONDOCUMENTS" column="CTLAN" type="string"/>
<property name="ADDRESSLAYOUTTYPE" column="CTADRK" type="string"/>
<property name="CHARGECLASS" column="CTGLAC" type="string"/>
<property name="EUCLASSIFICATION" column="CTEUCL" type="string"/>
<property name="REFUNDABLE" column="CTRFND" type="string"/>
<property name="USERDEFINED1" column="CTUDEF01" type="string"/>
<property name="USERDEFINED2" column="CTUDEF02" type="string"/>
<property name="USERDEFINED3" column="CTUDEF03" type="string"/>
</class>
</hibernate-mapping>
Here's my build.xml file, hope this is what you were looking for
Code:
<?xml version="1.0"?>
<project name="springhib" basedir="." default="usage">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="web.dir" value="war"/>
<property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
<property name="name" value="springhib"/>
<property name="target.dir" value="bin"/>
<property name="deploy.path" value="e:/traxi3/itrax/jj/server/default/deploy"/>
<property name="appserver.home" value="e:/traxi3/itrax/jj/server/default"/>
<property name="codegen.dir" value="data"/>
<property name="config.dir" value="config"/>
<!-- Write the schema to a text file -->
<property name="hibernate.args" value="--output=schema.ddl"/>
<!-- Change this to suite your desired dialect -->
<property name="hibernate.dialect" value="org.hibernate.dialect.ProgressDialect"/>
<!-- This property should be the fully qualified class name of your JDBC driver -->
<property name="hibernate.conn.driver_class" value="com.progress.sql.jdbc.JdbcProgressDriver"/>
<!-- Update these properties to reflect your database -->
<property name="hibernate.conn.url" value="jdbc:JdbcProgress:T:pslpc354:xttraxprog60dbedujdbc:xttrax;wa=536870912"/>
<property name="hibernate.conn.username" value="sysprogress"/>
<property name="hibernate.conn.password" value="sysprogress"/>
<path id="master-classpath">
<fileset dir="${appserver.home}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="E:/workarea/lib/spring">
<include name="*.jar"/>
</fileset>
<fileset dir="E:/Java/eclipse/plugins/org.apache.ant_1.6.5/lib">
<include name="ant.jar"/>
</fileset>
<fileset dir="E:/TRAXi3/iTRAX/lib/ws">
<include name="*.jar"/>
</fileset>
<fileset dir="E:/workarea/Common/bin">
<include name="**/*"/>
</fileset>
<fileset dir="E:/workarea/iTRAX/bin">
<include name="**/*"/>
</fileset>
</path>
<!-- Hibernate mapping files -->
<fileset id="hibernate.mapping.files" dir="${src.dir}">
<include name="**/*.hbm.xml" />
</fileset>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="deploy --> Deploy application as directory"/>
<echo message="deploywar --> Deploy application as a WAR file"/>
<echo message=""/>
</target>
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" target="1.3" debug="true"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="deploywar" depends="build" description="Deploy application as a WAR file">
<delete>
<fileset dir=".">
<include name="*.war"/>
</fileset>
</delete>
<war destfile="${name}.war"
webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war"/>
</fileset>
</copy>
</target>
<target name="schemaexport">
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="master-classpath"/>
<schemaexport
quiet="true"
text="true"
drop="false"
delimiter=";"
output="data/schema-export.sql"
properties="config/hibernate.properties">
<fileset dir="${src.dir}">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
<target name="gen-classes" description="Generate .java from .hbm files]">
<pathconvert refid="hibernate.mapping.files"
property="hibernate.mappings" pathsep=" "/>
<java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator">
<classpath refid="master-classpath"/>
<arg line="--output=${codegen.dir}"/>
<arg line="${hibernate.mappings}"/>
</java>
</target>
<target name="copy-resources">
<copy todir="${target.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="war/WEB-INF/classes/bus">
<fileset dir="src/bus">
<include name="country.hbm.xml"/>
</fileset>
</copy>
</target>
</project>
I really appreciate any help you can give me on this