-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Deploying a Hibernate Webapp
PostPosted: Tue Mar 09, 2004 4:26 pm 
Newbie

Joined: Wed Jan 14, 2004 11:29 am
Posts: 19
I've created a web application that works fine on JBoss, however deploying the application using Tomcat 4 results in a failure. The error appers to be that the mapping (.hbx.xml) files cannot be found, why should this be different on Tomcat than JBoss.

I've used Tomcat before, but never used it to deployed a webapp (.WAR), could this be a configuration problem with Tomcat? Or am I missing something in the configuration of hibernat that Jboss obviously copes with??

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 4:35 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
are you working with hibernate.cfg.xml or hibernate.properties?

The only thing you need if that your xbm.xml are in classpath


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 4:59 pm 
Newbie

Joined: Wed Jan 14, 2004 11:29 am
Posts: 19
I'm using a hibernate.properties file. The error i think is caused by the following:

<bean id="MySessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">

<property name="mappingResources">
<list>
<value>/mappings/Address.hbm.xml</value>
<value>/mappings/Advert.hbm.xml</value>
<value>/mappings/PaymentDetails.hbm.xml</value>
<value>/mappings/PropertyDetails.hbm.xml</value>
<value>/mappings/UserDetails.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">

<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.HSQLDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">false</prop>
</props>
</property>

<property name="dataSource"><ref bean="MyLiveDataSource"/></property>
</bean>

If you just put the .hbx.xml files on the class path and put the following, will this work:

<property name="mappingResources">
<list>
<valueAddress.hbm.xml</value>
<value>Advert.hbm.xml</value>
<value>PaymentDetails.hbm.xml</value>
<value>PropertyDetails.hbm.xml</value>
<value>UserDetails.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.