Hello,
I have a problem with hibernate.
I have 3 classes : pays, which contains a list of client client, which refers to a pays and contains a list of Magasin magasin, which refers a client.*
------------------------------------------------------------------------------------------------------ @Entity @Name("magasin") @Scope(SESSION) @Table(name = "t_magasin") public class Magasin extends AbstractForCashWebEntityAction implements Serializable, IClassWithTreatmentCash { .... @Enumerated(EnumType.STRING) private AccessDefinition encoderDetailVers = AccessDefinition.INHERIT; ... }
@Entity @Name("client") @Scope(SESSION) @Table(name = "t_client") public class Client extends AbstractForCashWebEntityAction implements Serializable, IClassWithTreatmentCash { @Enumerated(EnumType.STRING) private AccessDefinition encoderDetailVers = AccessDefinition.INHERIT; } public enum AccessDefinition { TRUE, FALSE, INHERIT, /*indicates if the settings is inherited by the container instance*/ ------------------------------------------------------------------------------------------------------
Using the class Magasin do not cause any problems(persist, find, using Magasins Methods) Except if I acces the list of magasins contained by a client : client.getMagasins.size(); client.getMagasins.contains(mag1);
I obtained the following logs :
type Rapport d'exception message description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête. exception javax.servlet.ServletException: #{optionsAction.listAll('CLIENT')}: java.lang.IllegalArgumentException: Unknown name value for enum class extelia.fcw.model.entity.AccessDefinition: FALSE javax.faces.webapp.FacesServlet.service(FacesServlet.java:277) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) 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:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) cause mère javax.faces.FacesException: #{optionsAction.listAll('CLIENT')}: java.lang.IllegalArgumentException: Unknown name value for enum class extelia.fcw.model.entity.AccessDefinition: FALSE com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) 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:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) cause mère javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: Unknown name value for enum class extelia.fcw.model.entity.AccessDefinition: FALSE javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) 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:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) cause mère java.lang.IllegalArgumentException: Unknown name value for enum class extelia.fcw.model.entity.AccessDefinition: FALSE org.hibernate.type.EnumType.nullSafeGet(EnumType.java:113) org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128) org.hibernate.type.AbstractType.hydrate(AbstractType.java:105) org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2124) org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404) org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332) org.hibernate.loader.Loader.getRow(Loader.java:1230) org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603) org.hibernate.loader.Loader.doQuery(Loader.java:724) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) org.hibernate.loader.Loader.loadCollection(Loader.java:2015) org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:59) org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83) org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1743) org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:131) org.hibernate.collection.PersistentBag.size(PersistentBag.java:248) extelia.fcw.model.entity.Client.recomputeNbShops(Client.java:1392) extelia.fcw.model.action.OptionsAction.recomputeNbShopsForAllClientsOfCurrentCountry(OptionsAction.java:1323) extelia.fcw.model.action.OptionsAction.listAll(OptionsAction.java:653) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.jboss.seam.util.Reflections.invoke(Reflections.java:22) org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) extelia.fcw.model.action.OptionsAction_$$_javassist_seam_11.listAll(OptionsAction_$$_javassist_seam_11.java) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280) org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65) org.jboss.el.parser.AstValue.invoke(AstValue.java:96) org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) 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:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) cause mère java.lang.IllegalArgumentException: No enum const class extelia.fcw.model.entity.AccessDefinition.FALSE java.lang.Enum.valueOf(Unknown Source) org.hibernate.type.EnumType.nullSafeGet(EnumType.java:110) org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128) org.hibernate.type.AbstractType.hydrate(AbstractType.java:105) org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2124) org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404) org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332) org.hibernate.loader.Loader.getRow(Loader.java:1230) org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603) org.hibernate.loader.Loader.doQuery(Loader.java:724) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) org.hibernate.loader.Loader.loadCollection(Loader.java:2015) org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:59) org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83) org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1743) org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:131) org.hibernate.collection.PersistentBag.size(PersistentBag.java:248) extelia.fcw.model.entity.Client.recomputeNbShops(Client.java:1392) extelia.fcw.model.action.OptionsAction.recomputeNbShopsForAllClientsOfCurrentCountry(OptionsAction.java:1323) extelia.fcw.model.action.OptionsAction.listAll(OptionsAction.java:653) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.jboss.seam.util.Reflections.invoke(Reflections.java:22) org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) extelia.fcw.model.action.OptionsAction_$$_javassist_seam_11.listAll(OptionsAction_$$_javassist_seam_11.java) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280) org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65) org.jboss.el.parser.AstValue.invoke(AstValue.java:96) org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) javax.faces.component.UICommand.broadcast(UICommand.java:387) org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321) org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296) org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253) org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) 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:45) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
|