Thread:
 HibernateServiceMBean has classloader problems 
 tmaus   26 Feb 2004, 15:22 
 Re: HibernateServiceMBean has classloader probl... 
 tmaus   26 Feb 2004, 17:17 
 Re: HibernateServiceMBean has classloader pr... 
 sgwood   07 Mar 2004, 00:54 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: sgwood (07 Mar 2004, 00:54) Replies: 0, Views: 37395
Subject: Re: HibernateServiceMBean has classloader problems
On 26 Feb 2004 17:17, tmaus wrote:

>On 26 Feb 2004 15:22, tmaus wrote:

>>Im using the same example as above ..
>>but as long as i keep my hbm.xml files in a structure like
>>com/foo/bar/aa.hbm.xml
>>the file is not find by the HibernateServiceMBean.

>>once i put it into the root directory it is found and bound

>>any ideas about that ???

>it looks like this only occurs if the .hbm.xml files are in a packed
jar .. 
>the moment i deploy the application exploded ... things work ...

>here is my structure

>foo.sar
>| -- META-INF
>|       | -- jboss-service.xml
>|
>| - hibernate-2.1
>| - myHibernateClassesAndMappingFiles
>|
>| - other things

How are you specifying the mappings in the jboss-service.xml? From your
example, you should have something like:

<attribute name="MapResources">com/foo/bar/aa.hbm.xml</attribute>

In the SAR, the structure would be:

foo.sar
| -- META-INF
|       | -- jboss-service.xml
|
| -- com
|       | -- foo
|            | -- bar
|                 | -- aa.hbm.xml


Sherman
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]