RE: osuser hibernate configuration errors
"J. Matthew Pryor" <[email protected]> Fri, 12 Dec 2003 14:34:01 +1100
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks that did the job I still find I had to modify OSUserHibernateConfigurationProviderImpl otherwise HibernatePropertySetDAOImpl would throw an NPE whenver it tried to use its sessionFactory (which was null) Have I configured something incorrectly? Do I have to over-ride anything from propertyset-default.xml? OSUserHibernateConfigurationProviderImpl inherits from DefaultHibernateConfigurationProvider. Whenever HibernatePropertySet wants a HibernatePropertySetDAOImpl is calls getPropertySetDAO() This calls the constructor of HibernatePropertySetDAOImpl passing in its sessionfactory, but since the DefaultHibernateConfigurationProvider is never actually initialized, its session factory is null I had to change OSUserHibernateConfigurationProviderImpl to explicitly call setSessionFactory() on DefaultHibernateConfigurationProvider (its super class) to that when DefaultHibernateConfigurationProvider attempted to create a DAO, the session factory it passed in was non-null. Have I mucked up the config somehow? Is it possible the code in CVS doesn't currently work for hibernate? Thanks, Matthew > -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of > Hani Suleiman > Sent: Friday, December 12, 2003 1:56 PM > To: [email protected] > Subject: Re: [Opensymphony-developers] osuser hibernate configuration > errors > > > Sounds like a version mismatch between the hibernate in osuser and the > version in propertyset, if you compile both from cvs with the same > version then it should be alright > > On Dec 11, 2003, at 9:44 PM, J. Matthew Pryor wrote: > > > I am having trouble getting osuser to work in hibernate mode. > > > > I have get the example app deployed & it basically runs, but when > > anything > > tried to get proeprtysets, it get strange exceptions > > > > I ofund I had to modify the code for > > OSUserHibernateConfigurationProviderImpl to set the session factory of > > its > > supe class > > > > That got me a bit further, but now I get an exception like this: > > > > 12:41:21,907 ERROR [Engine] ----- Root Cause ----- > > javax.servlet.ServletException: > > net.sf.hibernate.Query.setString(Ljava/lang/String;Ljava/lang/ > > String;)Lnet/s > > f/hibernate/Query; > > at > > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte > > xtImp > > l.java:536) > > at org.apache.jsp.viewuser_jsp._jspService(viewuser_jsp.java:321) > > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > > I guess I will crack out the debugger & see what is going on, but > > given all > > this, I suspect I am doing something terribly wrong > > > > Is anyone out there using OSUser in hibernate configuraiton? > > > > What to I have to do to get proertyset to work properly? > > > > BTW I am using JBoss/MySQL > > > > Thanks, > > Matthew > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > Does SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Opensymphony-developers mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/