-->
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.  [ 2 posts ] 
Author Message
 Post subject: Ignoring <attribute name="MapResources"> in
PostPosted: Tue Sep 09, 2003 10:10 am 
Newbie

Joined: Mon Sep 08, 2003 12:45 pm
Posts: 10
Hi!

I'm using JBoss 3.0.3 with Tomcat 4.1, Hibernate 2.1beta3 and Struts. Hibernate is installed as described in http://www.hibernate.org/66.html.

My project has the following structure:
/form/
/META-INF/
/META-INF/classes/de/sam/strutstest/action
/META-INF/classes/de/sam/strutstest/dto
/META-INF/classes/de/sam/strutstest/dto/mapping
/META-INF/classes/de/sam/strutstest/form
/META-INF/lib

/META-INF/classes/de/sam/strutstest/dto includes class User.class ("Hibernate class")
/META-INF/classes/de/sam/strutstest/dto/mapping includes mapping file User.hbm.xml

My jboss-service:
<server>
<mbean code="cirrus.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory, name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<!-- Make it deploy ONLY after DataSource had been started -->
<depends>jboss.jca:service=LocalTxCM,name= MySqlTestDS</depends>
<attribute name="MapResources">
de/sam/strutstest/dto/mappings/User.hbm.xml
</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/jdbc/MySqlTestDS</attribute>
<attribute name="Dialect">cirrus.hibernate.sql.MySQLDialect</attribute>
<attribute name="TransactionStrategy">cirrus.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">
cirrus.hibernate.transaction.JBossTransactionManagerLookup
</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">java:/UserTransaction</attribute>
</mbean>
</server>

When running the Struts action using the User class, I get the following error:
javax.servlet.ServletException: Resource: de/sam/strutstest/dto/User.hbm.xml not found

But jboss-service.xml defines the attribute
<attribute name="MapResources">
de/sam/strutstest/dto/mappings/User.hbm.xml
</attribute>

I think Hibernate ignores the entry in jboss-service.xml. The jboss-service.xml is located in the /WEB-INF/ folder.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2003 6:13 pm 
Newbie

Joined: Mon Sep 08, 2003 12:45 pm
Posts: 10
Sorry, this was my mistake. I had some problems with JBoss, Eclipse and the Lomboz plugin.

Now I deploy a SAR-file and not a WAR-file as before and the jboss-service.xml is in /META-INF/ directory.

But now I have problem while deploying the project. See my new post.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.