[jboss-user] [Advanced Documentation] - jboss as 5 - hibernate integration help needed

geckopower do-not-reply at jboss.com
Tue Oct 7 03:01:31 EDT 2008

Hi, I know JBossAS5 - Hibernate integration document is sparse; despite that, I was able to make it somewhat far, hoping for little bit of help to finish it off.

I got in my "server/default/deploy" directory test.har  (contents) as follows:

                             +----------PersistentItem.class & PersistentItem.hbm.xml

service-hibernate.xml content is:
(note xml is correct, just not rendering correctly)

<hibernate-configuration xmlns="urn:jboss:hibernate-deployer:1.0">

in my jsf I can open a session using the code:

	 org.hibernate.SessionFactory sf = (org.hibernate.SessionFactory)
          org.hibernate.Session s = sf.openSession();
          s.get(com.mycom.persistent.PersistentItem.class, new Long(1));

but the last line gives me an exception. If i don't include the last line,
no exception; i can get the sessionfactory just fine.  I can also see the jboss AS  output in System.out that it was able to bind the sessionfactory to jndi. but when i try to get something, exception:

An error occurred at line: 42 in the jsp file: /client.jsp
com.mycom.persistent.PersistentItem cannot be resolved to a type

how should i be deploying the har file so that my war can see it.
Note i'm not using ejb's, just plain war. Not at EJB yet.

Last mile...please help. Just getting a valid SessionFactory was alot of work given the changes between jboss4 and 5 (and the lack of documentation for 5). Help and you will have documented this new deployment here. I'll even write the documentation of the integration for my fellow hibernators.

And if you can't find the time to help, well thanks for the good work.

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

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

More information about the jboss-user mailing list