7 Replies Latest reply on Apr 13, 2007 5:11 AM by Pete Muir

    Domain design with EJB3 and Seam

    David DIDIER Newbie

      Hi,

      My question is about access level modifiers in the model design (with EJB3 entity and Seam). For example, I'd like to have something like that :

      @Entity
      public class MyUser
       extends XXX
      {
       private String login;
      
       protected MyUser()
       {
       // used by EJB3
       }
      
       public MyUser(String login)
       {
       this.setLogin(login);
       }
      
       public String getLogin()
       {
       return this.login;
       }
      
       protected void setLogin(String login)
       {
       this.login = login;
       }
      }
      


      So that "login" cannot be modified (~final). EJB3 specs allow the protected constructor (i don't know about the setter), but anyway, Seam requires a public no-args constructor and a public setLogin. For me that's not a good design practice since the entity is then merely a C struct.

      What are your opinion about that ? Am i doing something wrong ?
      Thanks

      David

        • 1. Re: Domain design with EJB3 and Seam
          Pete Muir Master

           

          "c_inconnu" wrote:
          Seam requires a public no-args constructor and a public setLogin.


          This is an interesting statement. Which bit of Seam, what are you trying to do?

          For me that's not a good design practice since the entity is then merely a C struct.


          Not really, as, IMO, a large difference between a javabean and a strut is encapsulation.

          • 2. Re: Domain design with EJB3 and Seam
            David DIDIER Newbie

            Ok, it seems that i have made a mistake somewhere. Now it is working (and i don't know why...).

            "petemuir" wrote:
            Not really, as, IMO, a large difference between a javabean and a strut is encapsulation.

            If all we have is getA{return a;} and setA(){this.a=a;} there is no big difference...

            Thanks for your answer.

            • 3. Re: Domain design with EJB3 and Seam
              David DIDIER Newbie

              Well, I shouldn't have answered too fast... I found where lies the problem. This is basically the "booking" example with an User class of mine. When I register (ie go to register.xhtml) I got :

              1) with a protected User constructor and no getPassword() at all

              17:24:02,546 ERROR [STDERR] 12 avr. 2007 17:24:02 com.sun.facelets.FaceletViewHandler handleRenderException
              GRAVE: Error Rendering View[/register.xhtml]
              org.jboss.seam.InstantiationException: Could not instantiate Seam component: user
               at org.jboss.seam.Component.newInstance(Component.java:1740)
               at org.jboss.seam.Component.getInstance(Component.java:1643)
               at org.jboss.seam.Component.getInstance(Component.java:1610)
               at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
               at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
               at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
               at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
               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.UIOutput.getValue(UIOutput.java:77)
               at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
               at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
               at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
               at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
               at org.jboss.seam.ui.JSF.renderChild(JSF.java:180)
               at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
               at org.jboss.seam.ui.JSF.renderChild(JSF.java:178)
               at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
               at org.jboss.seam.ui.UIDecorate.encodeChildren(UIDecorate.java:234)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
               at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
               at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
               at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
               at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
               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:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
               at java.lang.Thread.run(Thread.java:619)
              Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.Component can not access a member of class com.thales.imp.server.model.user.ImpUser with modifiers "protected"
               at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
               at java.lang.Class.newInstance0(Class.java:349)
               at java.lang.Class.newInstance(Class.java:308)
               at org.jboss.seam.Component.instantiateEntityBean(Component.java:1118)
               at org.jboss.seam.Component.instantiate(Component.java:1090)
               at org.jboss.seam.Component.newInstance(Component.java:1736)
               ... 65 more
              


              2) with a public User constructor and no or protected getPassword()
              17:27:56,906 ERROR [STDERR] 12 avr. 2007 17:27:56 com.sun.facelets.FaceletViewHandler handleRenderException
              GRAVE: Error Rendering View[/register.xhtml]
              javax.el.PropertyNotFoundException: Bean: com.thales.imp.server.model.user.ImpUser, property: password
               at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:146)
               at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
               at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
               at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)
               at com.sun.facelets.el.ELText$ELTextComposite.toString(ELText.java:115)
               at com.sun.facelets.compiler.CommentInstruction.write(CommentInstruction.java:38)
               at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
               at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
               at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
               at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
               at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
               at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
               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:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
               at java.lang.Thread.run(Thread.java:619)
              17:27:57,140 ERROR [ExceptionFilter] uncaught exception
              javax.servlet.ServletException: TRACE
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
               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:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
               at java.lang.Thread.run(Thread.java:619)
              17:27:57,281 ERROR [ExceptionFilter] exception root cause
              java.lang.NoSuchFieldError: TRACE
               at com.thales.imp.server.model.AbstractImpData.toString(AbstractImpData.java:111)
               at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:168)
               at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:147)
               at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:109)
               at com.sun.facelets.FaceletViewHandler.handleRenderException(FaceletViewHandler.java:671)
               at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:639)
               at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
               at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
               at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
               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:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
               at java.lang.Thread.run(Thread.java:619)
              17:27:57,484 ERROR [DebugPageHandler] redirecting to debug page
              javax.servlet.ServletException: TRACE
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
               at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
               at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
               at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
               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:96)
               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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
               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:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
               at java.lang.Thread.run(Thread.java:619)
              


              It works with a public constructor and getPassword

              Thanks

              • 4. Re: Domain design with EJB3 and Seam
                Pete Muir Master

                 

                "c_inconnu" wrote:
                1) with a protected User constructor and no getPassword() at all


                As the EJB3 spec allows entities with protected constructor, then Seam should do too. Can you file a JIRA issue for this?

                2) with a public User constructor and no or protected getPassword()
                17:27:56,906 ERROR [STDERR] 12 avr. 2007 17:27:56 com.sun.facelets.FaceletViewHandler handleRenderException
                GRAVE: Error Rendering View[/register.xhtml]
                javax.el.PropertyNotFoundException: Bean: com.thales.imp.server.model.user.ImpUser, property: password


                Looks like you have #{user.password} somewhere... If you have a UIInput component with a valuebinding onto a property then it needs both public getters and setters. Post your JSF if your unsure on this.



                • 5. Re: Domain design with EJB3 and Seam
                  David DIDIER Newbie

                   

                  "petemuir" wrote:

                  As the EJB3 spec allows entities with protected constructor, then Seam should do too. Can you file a JIRA issue for this?

                  Done !
                  http://jira.jboss.com/jira/browse/JBSEAM-1176


                  Looks like you have #{user.password} somewhere... If you have a UIInput component with a valuebinding onto a property then it needs both public getters and setters. Post your JSF if your unsure on this.

                  I was thinking of this too, so i commented out all (? maybe not) tags with user.password. I will re-check this tomorrow...

                  • 6. Re: Domain design with EJB3 and Seam
                    David DIDIER Newbie

                     


                    Looks like you have #{user.password} somewhere... If you have a UIInput component with a valuebinding onto a property then it needs both public getters and setters. Post your JSF if your unsure on this.


                    I finally found what was wrong: I indeed left #{user.password} in my page, but that was commented out. But it is processed anyway !!! I am quite new to web technologies, so I don't know if it is intended or not (i suppose not ???)

                    David



                    • 7. Re: Domain design with EJB3 and Seam
                      Pete Muir Master

                      You need to use the facelets SKIP_COMMENTS parameter in web.xml to ignore comments