0 Replies Latest reply on Nov 10, 2006 8:51 AM by Stephane DUCAS

    JPA (EJB3) , javassist and polymorphism

    Stephane DUCAS Newbie

      Hello!


      (I don't know if this topic is related to EJB3 or Seam ManagedPersistenceContext so I post to both...

      I'm currently writing a CRUD application generator that generate a simple interface to a model Object following
      the patterns introduces by hibernate tool skeleton generator...(I'll publish it in open source very soon)

      The tool is supposed to support polymorphism but there is a problem at JPA layer when playing with polymorphism:

      I have those entities:

      - abstract Customer
      - ProCustomer extends Customer
      - SimpleCustomer extends Customer
      - Account with a customer:Customer polymorphik property


      I use the MANUAL flushing policy, with the Seam ManagedPersistenceContext.

      I search a Customer then edit it (for exemple a SimpleCustomer) then create a DailyAccount for it I sometimes have while flushing a:


      12:15:06,953 INFO [STDOUT] Hibernate: insert into Account (id, numero, solde, beneficiaire_id, gestionnaire_id, taux, plafond, DTYPE) values (null, ?, ?, ?, ?, ?, ?, 'SaveAccount')
      12:15:06,953 INFO [STDOUT] Hibernate: call identity()
      12:15:06,953 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.HibernateException: instance not of expected entity type: ProCustomer_$$_javassist_6 is not a: Customer
      12:15:06,953 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:641)
      12:15:06,953 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:299)
      12:15:06,953 ERROR [STDERR] at SaveAccountEditorBean.create(SaveAccountEditorBean.java:75)
      12:15:06,953 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:06,953 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:06,953 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,953 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,953 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
      12:15:06,953 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:46)
      12:15:06,953 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
      12:15:06,953 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,953 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
      12:15:06,953 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
      12:15:06,953 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,953 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,953 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:77)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:32)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:60)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalInterceptor.java:81)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.EventInterceptor.aroundInvoke(EventInterceptor.java:51)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,968 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
      12:15:06,968 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
      12:15:06,968 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,968 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
      12:15:06,984 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor101.invoke(Unknown Source)
      12:15:06,984 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,984 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      12:15:06,984 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      12:15:06,984 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
      12:15:06,984 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      12:15:06,984 ERROR [STDERR] at $Proxy137.create(Unknown Source)
      12:15:06,984 ERROR [STDERR] at SaveAccountEditor$$FastClassByCGLIB$$a08435d.invoke()
      12:15:06,984 ERROR [STDERR] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:47)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:67)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
      12:15:06,984 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
      12:15:06,984 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,984 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.java:29)
      12:15:06,984 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
      12:15:06,984 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:06,984 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:60)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
      12:15:06,984 ERROR [STDERR] at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$fd25de62.create()
      12:15:06,984 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      12:15:06,984 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      12:15:06,984 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      12:15:07,000 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      12:15:07,000 ERROR [STDERR] at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
      12:15:07,000 ERROR [STDERR] at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
      12:15:07,000 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      12:15:07,000 ERROR [STDERR] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      12:15:07,000 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:58)
      12:15:07,000 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
      12:15:07,000 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
      12:15:07,000 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
      12:15:07,000 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:342)
      12:15:07,000 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:85)
      12:15:07,000 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      12:15:07,000 ERROR [STDERR] at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      12:15:07,000 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      12:15:07,000 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      12:15:07,000 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      12:15:07,000 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      12:15:07,000 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      12:15:07,000 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      12:15:07,000 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      12:15:07,000 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      12:15:07,000 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      12:15:07,000 ERROR [STDERR] Caused by: org.hibernate.HibernateException: instance not of expected entity type: ProCustomer_$$_javassist_6 is not a: Customer
      12:15:07,000 ERROR [STDERR] at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3568)
      12:15:07,000 ERROR [STDERR] at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1347)
      12:15:07,000 ERROR [STDERR] at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180)
      12:15:07,000 ERROR [STDERR] at org.hibernate.engine.CascadingAction$9.noCascade(CascadingAction.java:347)
      12:15:07,000 ERROR [STDERR] at org.hibernate.engine.Cascade.cascade(Cascade.java:139)
      12:15:07,000 ERROR [STDERR] at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:130)
      12:15:07,000 ERROR [STDERR] at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:121)
      12:15:07,000 ERROR [STDERR] at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
      12:15:07,000 ERROR [STDERR] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
      12:15:07,015 ERROR [STDERR] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      12:15:07,015 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:296)
      12:15:07,015 ERROR [STDERR] ... 171 more
      12:15:07,031 INFO [[/banque-crudapp]] WARNING: Component _id0 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!
      12:15:07,046 INFO [[/banque-crudapp]] WARNING: Component _id0:_id1 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!
      12:15:07,046 INFO [[/banque-crudapp]] WARNING: Component _id0:_id2 just got an automatic id, because there was no id assigned yet. If this component was created dynamically (i.e. not by a JSP tag) you should assign it an explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot component right after creation!
      12:15:07,062 INFO [STDOUT] Hibernate: select saveaccoun0_.id as id0_2_, saveaccoun0_.numero as numero0_2_, saveaccoun0_.solde as solde0_2_, saveaccoun0_.beneficiaire_id as benefici9_0_2_, saveaccoun0_.gestionnaire_id as gestionn8_0_2_, saveaccoun0_.taux as taux0_2_, saveaccoun0_.plafond as plafond0_2_, customer1_.id as id1_0_, customer1_.nom as nom1_0_, customer1_.rcs as rcs1_0_, customer1_.prenom as prenom1_0_, customer1_.DTYPE as DTYPE1_0_, employee2_.id as id2_1_, employee2_.num as num2_1_ from Account saveaccoun0_ left outer join Customer customer1_ on saveaccoun0_.beneficiaire_id=customer1_.id left outer join Employee employee2_ on saveaccoun0_.gestionnaire_id=employee2_.id where saveaccoun0_.id=? and saveaccoun0_.DTYPE='SaveAccount'
      12:15:07,062 ERROR [SeamExceptionFilter] could not destroy contexts
      java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:125)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1102)
      at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
      at org.jboss.seam.core.ConversationEntry.unlock(ConversationEntry.java:198)
      at org.jboss.seam.core.Manager.unlockConversation(Manager.java:328)
      at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:367)
      at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:281)
      at org.jboss.seam.servlet.SeamExceptionFilter.endWebRequestAfterException(SeamExceptionFilter.java:81)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:56)
      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.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.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:595)
      12:15:07,062 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: /editSaveAccount.xhtml @27,75 value="#{saveAccountEditor.instance.taux}": Exception getting value of property taux of base of type : SaveAccount_$$_javassist_4
      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.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      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.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.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:595)
      12:15:07,078 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.el.EvaluationException: /editSaveAccount.xhtml @27,75 value="#{saveAccountEditor.instance.taux}": Exception getting value of property taux of base of type : SaveAccount_$$_javassist_4
      at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
      at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:192)
      at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:132)
      at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:50)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
      at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:554)
      at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551)
      at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551)
      at com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.java:551)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:457)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:383)
      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.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      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.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.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:595)
      Caused by: javax.faces.el.EvaluationException: Bean: SaveAccount_$$_javassist_4, property: taux
      at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:458)
      at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
      at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
      at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
      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)
      ... 33 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:454)
      ... 39 more
      Caused by: javax.persistence.EntityNotFoundException: Unable to find SaveAccount with id 3
      at org.hibernate.ejb.Ejb3Configuration$Ejb3EntityNotFoundDelegate.handleEntityNotFound(Ejb3Configuration.java:107)
      at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
      at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
      at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
      at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:196)
      at SaveAccount_$$_javassist_4.getTaux(SaveAccount_$$_javassist_4.java)
      ... 44 more


      I can send you the whole CRUD application if you want... I'm pretty sur I'm using correctly EJB3 but it seems javassist does'nt support polymorphism does it??

      It seems there is a polymorphism issue with: javax.persistence.PersistenceException: org.hibernate.HibernateException: instance not of expected entity type: ProCustomer_$$_javassist_6 is not a: Customer...

      How can I overcome this problem ???

      THANKS!!