[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate MappingException

jimmarks do-not-reply at jboss.com
Thu Dec 11 11:04:26 EST 2008


"jaikiran" wrote : Where exactly is this class present in your packaging? Is it part of the har or is it bundled in a separate jar? If its in a separate jar, where in the EAR is the jar placed?

Thank you for the reply. I eventually figured this part out. I am now building an ear that contains a jar, a har and a war. The har is the same as before. The jar contains all the non-web-specific classes for my application. The war contains the web-specific classes as well as the servlet definitions. I am no longer getting the above error with regards to being unable to map the Date class.  (I'm now getting a different error related to servlets finding things which live in the jar instead of the war, but that's a separate forum.)


One line in the console log still confuses me:


  | 09:56:29,373 INFO  [SessionFactoryImpl] building session factory
  | 09:56:29,561 INFO  [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
  | 09:56:29,561 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 09:56:29,561 INFO  [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/NextGenRMDemoSessionFactory]
  | 

What JNDI is the SessionFactoryObjectFactory not finding? 

Jboss-web.xml looks like this:


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <jboss-web>
  | 
  |     <resource-ref>
  |         <res-ref-name>jdbc/NextGenRMDemoDS</res-ref-name>
  |         <jndi-name>java:/NextGenRMDemoDS</jndi-name>
  |     </resource-ref>
  | 
  | 	<resource-ref>
  | 		<res-ref-name>hibernate/NextGenRMDemoSessionFactory</res-ref-name>
  | 		<jndi-name>java:/hibernate/NextGenRMDemoSessionFactory</jndi-name>
  | 	</resource-ref>
  | 
  | </jboss-web>
  | 

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

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



More information about the jboss-user mailing list