Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.1
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: Sybase ASE 12.5
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
posted April 18, 2005 05:07 AM
--------------------------------------------------------------------------------
Here is a snippet from my build:
<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask">
<classpath refid="base.libraries"/>
</taskdef>
<target name="generate-mappings" depends="compile"
<hibernatedoclet
destdir="${build.classes.resources}"
excludetags="@version,@todo,@see,@desc
addtags="@author,@xdoclet-generated at ${TODAY}"
force="true"
mergedir="${build.classes.resources}"
verbose="false"
<fileset dir="${package.src.dir}"
<include name="*.java"/>
<include name="./exceptions/*.java/>
<include name="./dao/*.java"/>
</fileset>
<hibernate version="2.1" destination file="{0}.hbm.xml"/>
<jbossservice
destdir="${build.classes.resources}"
serviceName="Hibernate"
jndiName="jdbc/Sybase"
dataSource="jdbc/Sybase"
dialect="net.sf.hibernate.dialect.SybaseDialect"
useOuterJoin="true"
transactionManagerStrategy="net.sf.hibernate.transaction.JBossTransactionManagerLookup"
transactionStategy="net.sf.hibernate.transaction.JTATransactionFactory"
userTransactionName="UserTransaction"
depends="jboss.jca:service=LocalTxCM, name=DefaultDS" />
</hibernatedoclet>
</target>
The jboss-service.xml is generated but their are no Mapping Resource entries as there were no .hbm.xml files generated either. I thought I read to the contrary but do I still need to create a hibernate.cfg.xml and list all the .hbm.xml files that will be produced? I would think not since in the end I will be packing these files into the hibernateStartup.jar with the jboss-service.xml. Any help? By the way I did use the @hibernate.class tag and others in all the classes I wrote. Thanks, I'm stuck.
I hand wrote several *.hbm.xml files and put them in the appropriate location. I then tried to run the schemaexport task. Several questions: Do I still need either .properties or .cfg.xml if I have an MBean generated in the code above? If not, for the config tag in the schemaexport do I put in the jboss-service.xml? If anyone has a good example of their build using JBoss 4, hibernate 2.1 and have ant generate the mappings and the jboss-service.xml I would love to see it.