I'm trying to implement the generic DAO pattern. so @patrick_ibg could you post 
this more in detail.

For the moment i'm having problems loading the entities i've got the following 
error


  | 23:14:34,654 INFO  [SelectItems] Initializing SelectItems
  | 23:16:25,694 INFO  [STDOUT] 14-dec-2005 23:16:25 
com.sun.facelets.FaceletViewHandler handleRenderException
  | SEVERE: Error Rendering View
  | java.lang.IllegalStateException: No transaction.
  |     at org.jboss.tm.TxManager.setRollbackOnly(TxManager.java:381)
  |     at 
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.setRollbackOnly(ServerVMClientUserTransaction.java:141)
  |     at 
org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:55)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at 
org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:81)
  |     at 
org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
  |     at 
org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:32)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at 
org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:81)
  |     at 
org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
  |     at 
org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:46)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at 
org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:81)
  |     at 
org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
  |     at 
org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:58)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at 
org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:81)
  |     at 
org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
  |     at 
org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:31)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at 
org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:81)
  |     at 
org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
  |     at 
org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:41)
  |     at 
org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:52)
  |     at 
org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:40)
  |     at 
ivvo.drapier.seam.SelectItems$$EnhancerByCGLIB$$20e0a7fb.create(<generated>)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
  |     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
  |     at org.jboss.seam.Component.callComponentMethod(Component.java:967)
  |     at org.jboss.seam.Component.callCreateMethod(Component.java:955)
  |     at org.jboss.seam.Component.newInstance(Component.java:944)
  |     at org.jboss.seam.Component.getInstance(Component.java:892)
  |     at 
org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
  |     at 
com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:130)
  |     at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:41)
  |     at com.sun.el.parser.AstValue.getValue(AstValue.java:85)
  |     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
  |     at 
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  |     at 
com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
  |     at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
  |     at 
org.apache.myfaces.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:103)
  |     at 
org.apache.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:485)
  |     at 
org.apache.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:461)
  |     at 
org.apache.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:272)
  |     at 
org.apache.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:246)
  |     at 
org.apache.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:54)
  |     at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
  |     at 
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:521)
  |     at 
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:518)
  |     at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:447)
  |     at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
  |     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  |     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  |     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  |     at 
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
  |     at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
  |     at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
  |     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  |     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  |     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  |     at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
  |     at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
  |     at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  |     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSla
  | 23:16:25,734 INFO  [STDOUT] veWorkerThread.java:112)
  |     at java.lang.Thread.run(Thread.java:595)
  | 23:16:25,734 INFO  [STDOUT] 14-dec-2005 23:16:25 
com.sun.facelets.FaceletViewHandler handleRenderException
  | SEVERE: Took Type: java.io.PrintWriter
  | 

My quess is that the injection of the persistencecontext should occur in my
SLSB, for the moment it is injected in my superclass(class for CRUD) to access 
it i'm using a protected method in the superclass getEntityManager seen on the 
CaveatEmptor project, if so how can i deal with this problem

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to