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: Mapping resource nit found - but I don't understand !!
PostPosted: Tue Jun 08, 2004 11:39 am 
Newbie

Joined: Thu Jun 03, 2004 5:47 am
Posts: 13
Hi !!

I have an exception when I want to use Hibernate :
Code:
17:22:54,828 INFO  [Configuration] Mapping resource: org/jboss/nukes/core/themes/essaiThemeHibernate/Style.hbm.xml
17:22:54,843 INFO  [STDOUT] *** Exception : net.sf.hibernate.MappingException: Resource: org/jboss/nukes/core/themes/essaiThemeHibernate/Style.hbm.xml not found***


But I don't understand because there is the code of my Jboss Service XML file :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory">
   <depends>jboss.jca:service=RARDeployer</depends>
   <depends>jboss.jca:service=LocalTxCM,name=NukesDS</depends>
          <!-- Make it deploy ONLY after DataSource had been started -->
          <attribute name="MapResources">mappings/Style.hbm.xml</attribute>
          <attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
          <attribute name="Datasource">java:/NukesDS</attribute>
          <attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
          <attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
          <attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
          <attribute name="UseOuterJoin">false</attribute>
          <attribute name="ShowSql">true</attribute>
          <attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>

and my mapping file
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
  <class name="org.jboss.nukes.core.themes.essaiThemeHibernate.Style" table="nuke_style">
    <id name="style_id" type="string" unsaved-value="null" >
   <column name="style_id" sql-type="varchar(50)" not-null="true"/>
<!--   <id name="style_id" column="style_id" type="integer" length="11" unsaved-value="null">   -->
      <generator class="uuid.hex"/>
    </id>
    <property name="style_nom" column="style_nom" type="string" length="50" not-null="false"/>
    <property name="color" column="color" type="string" length="50" not-null="false"/>
    <property name="font_family" column="font_family" type="string" length="50" not-null="false"/>
    <property name="font_size" column="font_size" type="string" length="50" not-null="false"/>
    <property name="font_style" column="font_style" type="string" length="50" not-null="false"/>
    <property name="font_variant" column="font_variant" type="string" length="50" not-null="false"/>
    <property name="font_weight" column="font_weight" type="string" length="50" not-null="false"/>
    <property name="text_decoration" column="text_decoration" type="string" length="50" not-null="false"/>
    <property name="text_align" column="text_align" type="string" length="50" not-null="false"/>
    <property name="letter_spacing" column="letter_spacing" type="string" length="50" not-null="false"/>
  </class>
</hibernate-mapping>


Someone can help me to understand??
Thanks a lot !!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 10:18 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Its telling you thats its looking for the HBM xml in org/jboss/nukes/core/themes/essaiThemeHibernate/Style.hbm.xml

and you have it defined in
<attribute name="MapResources">mappings/Style.hbm.xml</attribute>

So where is the 'mappings' directory - I would expect it to be in parent directory holding 'org' from what you have shown.


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.