9 Replies Latest reply on Feb 5, 2008 3:00 PM by Sart Valcerou

    How to persist data into related table ?

    Sart Valcerou Newbie

      Hello !
      I'm new to seam and i want to know how to persist data into two related tables.
      Can someone support me with an example, because i did not find any in books about seam and in reference.

      Thank you for your answers.

        • 1. Re: How to persist data into related table ?
          Jason Long Master

          Are you familiar with Hibernate?

          • 2. Re: How to persist data into related table ?
            Sart Valcerou Newbie

            No i don't familiar with Hibernate...
            but i familiar with EJB..

            • 3. Re: How to persist data into related table ?
              Jason Long Master

              Well Hibernate backs JBoss EJB.

              I am not sure what you are asking.

              If you are familiar with EJB then create some objects add the persist them. If they are mapped to different tables the these will be updated.

              • 4. Re: How to persist data into related table ?
                Sart Valcerou Newbie

                well.... for example when i try this code it's not working....

                public User addUser(String username, String email,
                 String creditCardType, String creditCardNumber,
                 Date creditCardExpiration) {
                 User user = new User();
                 user.setUsername(username);
                 user.setEmail(email);
                 BillingInfo billing = new BillingInfo();
                 billing.setCreditCardType(creditCardType);
                 billing.setCreditCardNumber(creditCardNumber);
                 billing.setCreditCardExpiration(creditCardExpiration);
                 user.setBillingInfo(billing);
                 entityManager.persist(user);
                 return user;
                }
                


                • 5. Re: How to persist data into related table ?
                  Jason Long Master

                  If you want help, you will need to post a lot more detail.

                  For example....

                  How is this now working?

                  Environment, Error, Stack trace, mapping between User and BillingInfo,.....

                  • 6. Re: How to persist data into related table ?
                    Sart Valcerou Newbie

                    i just made simple example...

                    entities

                    package com.st.st;
                    // Generated 06.02.2008 1:13:21 by Hibernate Tools 3.2.0.b10
                    
                    import javax.persistence.Column;
                    import javax.persistence.Entity;
                    import javax.persistence.FetchType;
                    import javax.persistence.GeneratedValue;
                    import static javax.persistence.GenerationType.IDENTITY;
                    import javax.persistence.Id;
                    import javax.persistence.JoinColumn;
                    import javax.persistence.ManyToOne;
                    import javax.persistence.Table;
                    import org.hibernate.validator.NotNull;
                    
                    /**
                     * Info generated by hbm2java
                     */
                    @Entity
                    @Table(name = "info", catalog = "seamtest")
                    public class Info implements java.io.Serializable {
                    
                     private Integer infoId;
                     private User user;
                     private int infoFullPayment;
                    
                     public Info() {
                     }
                    
                     public Info(User user, int infoFullPayment) {
                     this.user = user;
                     this.infoFullPayment = infoFullPayment;
                     }
                    
                     @Id
                     @GeneratedValue(strategy = IDENTITY)
                     @Column(name = "info_id", unique = true, nullable = false)
                     public Integer getInfoId() {
                     return this.infoId;
                     }
                    
                     public void setInfoId(Integer infoId) {
                     this.infoId = infoId;
                     }
                     @ManyToOne(fetch = FetchType.LAZY)
                     @JoinColumn(name = "user_id", nullable = false)
                     @NotNull
                     public User getUser() {
                     return this.user;
                     }
                    
                     public void setUser(User user) {
                     this.user = user;
                     }
                    
                     @Column(name = "info_full_payment", nullable = false)
                     @NotNull
                     public int getInfoFullPayment() {
                     return this.infoFullPayment;
                     }
                    
                     public void setInfoFullPayment(int infoFullPayment) {
                     this.infoFullPayment = infoFullPayment;
                     }
                    
                    }
                    
                    


                    package com.st.st;
                    // Generated 06.02.2008 1:13:21 by Hibernate Tools 3.2.0.b10
                    
                    import java.util.HashSet;
                    import java.util.Set;
                    import javax.persistence.CascadeType;
                    import javax.persistence.Column;
                    import javax.persistence.Entity;
                    import javax.persistence.FetchType;
                    import javax.persistence.GeneratedValue;
                    import static javax.persistence.GenerationType.IDENTITY;
                    import javax.persistence.Id;
                    import javax.persistence.OneToMany;
                    import javax.persistence.Table;
                    import org.hibernate.validator.NotNull;
                    
                    /**
                     * User generated by hbm2java
                     */
                    @Entity
                    @Table(name = "user", catalog = "seamtest")
                    public class User implements java.io.Serializable {
                    
                     private Integer userId;
                     private int userPayment;
                     private Set<Info> infos = new HashSet<Info>(0);
                    
                     public User() {
                     }
                    
                     public User(int userPayment) {
                     this.userPayment = userPayment;
                     }
                     public User(int userPayment, Set<Info> infos) {
                     this.userPayment = userPayment;
                     this.infos = infos;
                     }
                    
                     @Id
                     @GeneratedValue(strategy = IDENTITY)
                     @Column(name = "user_id", unique = true, nullable = false)
                     public Integer getUserId() {
                     return this.userId;
                     }
                    
                     public void setUserId(Integer userId) {
                     this.userId = userId;
                     }
                    
                     @Column(name = "user_payment", nullable = false)
                     @NotNull
                     public int getUserPayment() {
                     return this.userPayment;
                     }
                    
                     public void setUserPayment(int userPayment) {
                     this.userPayment = userPayment;
                     }
                     @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user")
                     public Set<Info> getInfos() {
                     return this.infos;
                     }
                    
                     public void setInfos(Set<Info> infos) {
                     this.infos = infos;
                     }
                    
                    }
                    
                    

                    session bean
                    package com.st.st;
                    
                    import javax.ejb.Stateless;
                    import javax.persistence.EntityManager;
                    import javax.persistence.PersistenceContext;
                    
                    import org.jboss.seam.annotations.In;
                    import org.jboss.seam.annotations.Name;
                    
                    import com.st.st.insert;
                    @Name("insert")
                    public @Stateless class insertBean implements insert {
                     @In private User user;
                     @In private Info info;
                     @PersistenceContext private EntityManager em;
                    
                     public void insert(Integer userPayment, Integer infoFullPayment){
                    
                     Info info = new Info();
                     info.setInfoFullPayment(infoFullPayment);
                    
                     User user = new User();
                     userPayment = infoFullPayment*2;
                     user.setUserPayment(userPayment);
                    
                     info.setUser(user);
                     em.persist(info);
                     }
                    
                    }
                    
                    


                    package com.st.st;
                    
                    import javax.ejb.Local;
                    
                    @Local
                    public interface insert {
                     public void insert(Integer userPayment, Integer infoFullPayment);
                    
                    }
                    
                    


                    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    
                    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:s="http://jboss.com/products/seam/taglib"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:a="http://richfaces.org/a4j"
                     xmlns:rich="http://richfaces.org/rich"
                     template="layout/template.xhtml">
                    
                    <ui:define name="body">
                    
                    <h:form>
                     <h:inputText value="#{info.infoFullPayment}"/>
                     <h:commandButton value="push" action="#{insert.insert}"/>
                    </h:form>
                     </ui:define>
                    
                    </ui:composition>
                    
                    


                    • 7. Re: How to persist data into related table ?
                      Sart Valcerou Newbie

                      in previous example i forgot to put @Name annotation..
                      but when i did this i got this..

                      Exception during request processing:
                      Caused by javax.servlet.ServletException with message: "#{insert.insert}: javax.el.MethodNotFoundException: /insert.xhtml @17,59 action="#{insert.insert}": Method not found: insertBean.insert()"
                      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      java.lang.Thread.run(Thread.java:619)Caused by javax.faces.FacesException with message: "#{insert.insert}: javax.el.MethodNotFoundException: /insert.xhtml @17,59 action="#{insert.insert}": Method not found: insertBean.insert()"
                      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:99)
                      javax.faces.component.UICommand.broadcast(UICommand.java:383)
                      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
                      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      java.lang.Thread.run(Thread.java:619)Caused by javax.faces.el.MethodNotFoundException with message: "javax.el.MethodNotFoundException: /insert.xhtml @17,59 action="#{insert.insert}": Method not found: insertBean.insert()"
                      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:81)
                      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
                      javax.faces.component.UICommand.broadcast(UICommand.java:383)
                      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
                      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      java.lang.Thread.run(Thread.java:619)Caused by javax.el.MethodNotFoundException with message: "/insert.xhtml @17,59 action="#{insert.insert}": Method not found: insertBean.insert()"
                      com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:72)
                      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
                      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
                      javax.faces.component.UICommand.broadcast(UICommand.java:383)
                      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
                      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
                      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
                      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
                      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
                      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
                      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
                      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
                      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
                      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
                      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
                      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                      java.lang.Thread.run(Thread.java:619)
                      


                      • 8. Re: How to persist data into related table ?
                        Jason Long Master

                        You are calling insert with no parameters. This is not in the Stateless bean nor in the interface for the bean.

                        • 9. Re: How to persist data into related table ?
                          Sart Valcerou Newbie

                          yes i know.. but please tell me what should i do to make it work ?