Could provide a stack trace so we can try and help you?
Mike. On 5/4/07, tibi <[EMAIL PROTECTED]> wrote:
the strange thing is that i get the error message. but the data gets inserted into the db.... tibi tibi wrote: > ok i still have this error. i'm i bit lost where to look. > this is my situation. > when i use the generalmanager all was fine > > now i want to make my own dao > so i made a dao interface and implemented it. > i made a manager interface and implemented it and i change my > applicationcontext like this: > -------------old--------------------------- > <bean id="eventSpanManager" > class="org.appfuse.service.impl.GenericManagerImpl"> > <constructor-arg> > <bean class="org.appfuse.dao.hibernate.GenericDaoHibernate" > autowire="byType"> > <constructor-arg > value="nl.topticketline.topnet.model.EventSpan"/> > </bean> > </constructor-arg> > </bean> > ------------/old------------------ > ------------new---------------- > <bean id="eventSpanDao" > class="nl.topticketline.topnet.dao.EventSpanDaoHibernate"> > <property name="sessionFactory" ref="sessionFactory"/> > </bean> > <bean id="eventSpanManager" > class="nl.topticketline.topnet.service.EventSpanManagerImpl"> > <constructor-arg ref="eventSpanDao"/> > </bean> > --------------------------------------- > > thanks for any help... > > > tibi > > > > > > > tibi wrote: >> ok i made my EventSpanManager which exposes all the dao methods. >> in my action i now have >> GenericManager<EventSpan, Long> eventSpanManager; >> >> still get the same error... >> >> tibi >> >> >> tibi wrote: >>> ok i will need to make a manager like this >>> http://appfuse.org/display/APF/Services >>> >>> and simply expose all my methods from my doa to the manager ?! >>> >>> tibi >>> >>> tibi wrote: >>>> in my daoHibernate class and interface i put: >>>> @Transactional(readOnly=false) >>>> but still the same error... >>>> >>>> tibi >>>> >>>> tibi wrote: >>>>> >>>>>> not require a constructor argument. The correct configuration >>>>>> snippet for such a case is included at the end of the tutorial. >>>>> ok missed that sory >>>>> >>>>>> It all depends on how you access your DAO from your web pages. >>>>>> Normally you only access your DAO through a manager class, which >>>>>> is where the transactions get started. If you want your DAO to be >>>>>> transactioned, you can either add the annotation @Transaction or >>>>>> change the Spring config to explicitly add transactions to your DAO. >>>>>> >>>>> how would i access my doa through a manager in my action. >>>>> i now let it be injected by spring with this: >>>>> <bean id="eventSpanDaoManager" >>>>> class="nl.topticketline.topnet.dao.EventSpanDaoHibernateManager"> >>>>> <property name="sessionFactory" ref="sessionFactory"/> >>>>> </bean> >>>>> >>>>> and this: >>>>> <bean id="eventSpanAction" >>>>> class="nl.topticketline.topnet.action.EventSpanAction" >>>>> scope="prototype" >>>>> autowire="default"> >>>>> <property name="eventSpanManager" ref="eventSpanDaoManager"/> >>>>> <property name="companyManager" ref="companyManager"/> >>>>> <property name="userManager" ref="myUserManager"/> >>>>> </bean> >>>>> >>>>> in my action i do this: >>>>> ... >>>>> eventSpanManager.save(eventSpan); >>>>> ... >>>>> >>>>> thanks tibi >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
