Hi,

finally I managed to deploy my hibernate application in the new jboss4.0.0. and 
the related stuff without deployment errors. But there is one remaining problem:

If I try, to acess persistence like:

  | tx = hibernateSession.beginTransaction();
  | Item item = new Item();
  | item.setValue(33d);
  | hibernateSession.save(item);

I get the following confusing error:

09:29:50,312 INFO  [STDOUT] net.sf.hibernate.MappingException: Unknown entity 
class: test.hibernate.model.Item


I packed the .har file as described in 
http://docs.jboss.org/jbossas/getting_started/startguide40/hibernate.html#d0e2741

META-INF/hibernate-service.xml
META-INF/MANIFEST.MF
test/hibernate/model/Item.class
test/hibernate/model/Item.hbm.xml

and get the deployment message: 
09:27:01,781 INFO  [Configuration] Searching for mapping documents in jar: 
HibernateExmaple.har
09:27:01,781 INFO  [Configuration] Found mapping documents in jar: 
test/hibernate/model/Item.hbm.xml
09:27:01,796 INFO  [Binder] Mapping class: test.hibernate.model.Item -> Item


So I'm confused about the message, that Item is unknown. What's wrong?


hibernate-service.xml:
<?xml version="1.0" encoding="UTF-8"?>
  | <server>
  |     <mbean code="org.jboss.hibernate.jmx.Hibernate" 
name="jboss.har:service=Hibernate">
  |         <attribute name="DatasourceName">java:/MysqlDS</attribute>
  |             <attribute 
name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
  |             <attribute 
name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
  |             <attribute 
name="CacheProviderClass">net.sf.hibernate.cache.TreeCacheProvider</attribute>
  |             <attribute name="Hbm2ddlAuto">create-drop</attribute>
  |             
  |     </mbean>
  | </server>

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857137#3857137

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857137


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to