0 Replies Latest reply on Nov 6, 2007 5:01 AM by Chr D

    Problem with Validation when Persisting

    Chr D Newbie

      Hi.

      I have an Entity Bean with an N to One mapping on itself!
      I try to validate the field where its parent Entity bean is saved
      with an own written validator. The Problem is, if i want to validate the field i get an exception and i cant exactly understand why or how to solve this problem. I think this is something like an endless loop, but I am not sure...


      Validator:

      package com.ccm30.validators;
      
      import java.util.List;
      
      import javax.persistence.NoResultException;
      
      import org.hibernate.mapping.Property;
      import org.hibernate.validator.PropertyConstraint;
      import org.hibernate.validator.Validator;
      import org.jboss.seam.Component;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.framework.EntityController;
      
      import com.ccms30.entities.CcmsProductline;
      import com.ccms30.entities.CcmsProductlineController;
      
      @Name("myProductlineListValidator")
      public class MyProductlineListValidator extends EntityController implements
       Validator<MyProductlineList>, PropertyConstraint {
      
      
      
       // part of the Validator<Annotation> contract,
       // allows to get and use the annotation values
       public void initialize(MyProductlineList parameters) {
      
       }
      
       // part of the property constraint contract
       public boolean isValid(Object value) {
      
       if (value == null){
       System.out.println("Value is null");
       return true;
       }
      
       if (!(value instanceof String))
       {
       System.out.println("Value is not a string");
       return false;
       }
      
       String string = (String) value;
       String trimmed = string.trim();
      
       try{
       CcmsProductline cpl = (CcmsProductline) createQuery(
       "select cpl from CcmsProductline cpl where cpl.name=:name")
       .setParameter("name", trimmed).getSingleResult();
      
       System.out.println("Value is in List");
       return true;
       }catch(NoResultException e)
       {
       System.out.println("Value is not in List");
       return false;
       }
      
       }
      
       public void apply(Property arg0) {
      
       }
      
      }
      


      Entity:
      package com.ccms30.entities;
      // Generated 16.10.2007 13:32:22 by Hibernate Tools 3.2.0.b9
      
      import java.util.Date;
      import java.util.HashMap;
      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 javax.persistence.GenerationType;
      import javax.persistence.Id;
      import javax.persistence.JoinColumn;
      import javax.persistence.JoinTable;
      import javax.persistence.ManyToMany;
      import javax.persistence.ManyToOne;
      import javax.persistence.OneToMany;
      import javax.persistence.SequenceGenerator;
      import javax.persistence.Table;
      import javax.persistence.Temporal;
      import javax.persistence.TemporalType;
      import javax.persistence.Transient;
      
      import org.hibernate.validator.Length;
      import org.hibernate.validator.NotNull;
      import org.richfaces.model.TreeNode;
      
      import com.ccm30.validators.MyProductlineList;
      import com.ccms30.treenodes.CcmsTree;
      /**
       * CcmsProductline generated by hbm2java
       */
      @Entity
      @Table(name = "CCMS_PRODUCTLINE", schema = "CCMSDB")
      public class CcmsProductline extends CcmsTree implements java.io.Serializable {
      
       private static final long serialVersionUID = 1L;
      
       private Integer id;
       private CcmsProductline ccmsProductline;
       private CcmsUser ccmsUser;
       private String name;
       private String description;
       private Date modified;
       private Set<CcmsProductline> ccmsProductlines = new HashSet<CcmsProductline>(
       0);
       private Set<CcmsProduct> ccmsProducts = new HashSet<CcmsProduct>(0);
       private Set<CcmsPolicy> ccmsPolicies = new HashSet<CcmsPolicy>(0);
      
       @Transient
       private String ccmsParentProductlineName = initCcmsParentProductlineName();
      
       public CcmsProductline() {
       }
      
       public CcmsProductline(Integer id, String name) {
       this.id = id;
       this.name = name;
       }
       public CcmsProductline(Integer id, CcmsProductline ccmsProductline,
       CcmsUser ccmsUser, String name, String description, Date modified,
       Set<CcmsProductline> ccmsProductlines,
       Set<CcmsProduct> ccmsProducts, Set<CcmsPolicy> ccmsPolicies) {
       this.id = id;
       this.ccmsProductline = ccmsProductline;
       this.ccmsUser = ccmsUser;
       this.name = name;
       this.description = description;
       this.modified = modified;
       this.ccmsProductlines = ccmsProductlines;
       this.ccmsProducts = ccmsProducts;
       this.ccmsPolicies = ccmsPolicies;
       }
      
       @Id @SequenceGenerator(name = "generator", sequenceName = "ID_SEQUENCE") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "generator")
       @Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
       @NotNull
       public Integer getId() {
       return this.id;
       }
      
       public void setId(Integer id) {
       this.id = id;
       }
       @ManyToOne(fetch = FetchType.LAZY)
       @JoinColumn(name = "PARENT_PRODUCTLINE_ID")
       public CcmsProductline getCcmsProductline() {
       return this.ccmsProductline;
       }
      
       public void setCcmsProductline(CcmsProductline ccmsProductline) {
       this.ccmsProductline = ccmsProductline;
       }
       @ManyToOne(fetch = FetchType.LAZY)
       @JoinColumn(name = "CREATOR")
       public CcmsUser getCcmsUser() {
       return this.ccmsUser;
       }
      
       public void setCcmsUser(CcmsUser ccmsUser) {
       this.ccmsUser = ccmsUser;
       }
      
       @Column(name = "NAME", nullable = false, length = 200)
       @NotNull
       @Length(max = 200)
       public String getName() {
       return this.name;
       }
      
       public void setName(String name) {
       this.name = name;
       }
      
       @Column(name = "DESCRIPTION", length = 4000)
       @Length(max = 4000)
       public String getDescription() {
       return this.description;
       }
      
       public void setDescription(String description) {
       this.description = description;
       }
       @Temporal(TemporalType.DATE)
       @Column(name = "MODIFIED", length = 7)
       public Date getModified() {
       return this.modified;
       }
      
       public void setModified(Date modified) {
       this.modified = modified;
       }
       @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ccmsProductline")
       public Set<CcmsProductline> getCcmsProductlines() {
       return this.ccmsProductlines;
       }
      
       public void setCcmsProductlines(Set<CcmsProductline> ccmsProductlines) {
       this.ccmsProductlines = ccmsProductlines;
       }
       @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ccmsProductline")
       public Set<CcmsProduct> getCcmsProducts() {
       return this.ccmsProducts;
       }
      
       public void setCcmsProducts(Set<CcmsProduct> ccmsProducts) {
       this.ccmsProducts = ccmsProducts;
       }
       @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
       @JoinTable(name = "CCMS_POLICY_PRODUCTLINE_Z", joinColumns = @JoinColumn(name = "policy_id"), inverseJoinColumns = @JoinColumn(name = "productline_id"))
       public Set<CcmsPolicy> getCcmsPolicies() {
       return this.ccmsPolicies;
       }
      
       public void setCcmsPolicies(Set<CcmsPolicy> ccmsPolicies) {
       this.ccmsPolicies = ccmsPolicies;
       }
      
       public String initCcmsParentProductlineName()
       {
       if(ccmsProductline!=null)
       return ccmsProductline.getName();
       else
       return "";
       }
      
      
       @Transient
       @MyProductlineList
       public String getCcmsParentProductlineName() {
       System.out.println("operation called");
       return ccmsParentProductlineName;
       }
      
       @Transient
       public void setCcmsParentProductlineName(String ccmsParentProductlineName) {
       this.ccmsParentProductlineName = ccmsParentProductlineName;
       }
      
       @Override
       public String receiveType() {
       // TODO Auto-generated method stub
       return "CcmsProduct/CcmsProductline";
       }
      
      }


      Exception:


      Exception during request processing:
      Caused by javax.servlet.ServletException with message: "#{ccmsProductlineHome.persist}: java.lang.reflect.UndeclaredThrowableException"
      
      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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      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.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      com.ccms30.auth.filter.UserAuthentication.doFilter(UserAuthentication.java:37)
      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:157)
      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:595)
      
      Caused by javax.faces.FacesException with message: "#{ccmsProductlineHome.persist}: java.lang.reflect.UndeclaredThrowableException"
      
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      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.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      com.ccms30.auth.filter.UserAuthentication.doFilter(UserAuthentication.java:37)
      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:157)
      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:595)
      
      Caused by javax.faces.el.EvaluationException with message: "java.lang.reflect.UndeclaredThrowableException"
      
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      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.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      com.ccms30.auth.filter.UserAuthentication.doFilter(UserAuthentication.java:37)
      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:157)
      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:595)
      
      Caused by java.lang.reflect.UndeclaredThrowableException with message: ""
      
      org.apache.commons.logging.impl.Log4jProxy.log(Log4jProxy.java:309)
      org.apache.commons.logging.impl.Log4jProxy.debug(Log4jProxy.java:253)
      org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:128)
      org.hibernate.engine.Collections.processReachableCollection(Collections.java:176)
      org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37)
      org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101)
      org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
      org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
      org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:138)
      org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
      org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
      org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
      org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
      org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
      org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
      com.ccm30.validators.MyProductlineListValidator.isValid(MyProductlineListValidator.java:48)
      org.hibernate.validator.ClassValidator.getInvalidValues(ClassValidator.java:341)
      org.hibernate.validator.ClassValidator.getInvalidValues(ClassValidator.java:307)
      org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:134)
      org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
      org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:156)
      org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:49)
      org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
      org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
      org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
      org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
      com.ccm30.validators.MyProductlineListValidator.isValid(MyProductlineListValidator.java:48)
      org.hibernate.validator.ClassValidator.getInvalidValues(ClassValidator.java:341)
      org.hibernate.validator.ClassValidator.getInvalidValues(ClassValidator.java:307)
      org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:134)
      org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:167)
      org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:156)
      org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:49)
      org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
      org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
      org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
      org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
      com.ccm30.validators.MyProductlineListValidator.isValid(MyProductlineListValidator.java:48)
      ...