0 Replies Latest reply on Dec 18, 2012 11:44 AM by Betto McRose Gamarra

    java.lang.IllegalArgumentException: java.lang.ClassCastException@ ???

    Betto McRose Gamarra Newbie

      entities are:

      - InvgralDeposito (main, the one I'm trying to update)

      - EmpresaEmpleado (joined)

      - EmpresaSede (joined)

       

      the getters in InvgralDeposito are:


      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumns({
              @JoinColumn(name = "id_empresa", referencedColumnName = "id_empresa", nullable = false, insertable = true, updatable = true),
              @JoinColumn(name = "responsable_deposito", referencedColumnName = "id_empleado", nullable = false, insertable = true, updatable = true)
      })
      public EmpresaEmpleado getEmpresaEmpleado()
      {
          return this.empresaEmpleado;
      }

      public void setEmpresaEmpleado(EmpresaEmpleado empresaEmpleado)
      {
          this.empresaEmpleado = empresaEmpleado;
      }

      @ManyToOne(fetch = FetchType.LAZY)

      //I had to remove the Join declaration for empresa here because I gave me errors
      @JoinColumn(name = "id_sede", referencedColumnName = "id_sede", nullable = false, insertable = true, updatable = true)
      public EmpresaSede getEmpresaSede()
      {
          return this.empresaSede;
      }

      public void setEmpresaSede(EmpresaSede empresaSede)
      {
          this.empresaSede = empresaSede;
      }


      the problem occurs when I try to update the InvgralDeposito entity with the EmpresaSede changed

       

      the stacktrace:

      10:52:47,646 DEBUG [org.hibernate.SQL] (http-localhost-127.0.0.1-8080-1) select invgraldep0_.id_deposito as id1_1601_0_, invgraldep0_.responsable_deposito as responsa9_1601_0_, invgraldep0_.id_empresa as id10_1601_0_, invgraldep0_.id_sede as id11_1601_0_, invgraldep0_.fec_alta as fec2_1601_0_, invgraldep0_.fec_ultmod as fec3_1601_0_, invgraldep0_.ind_deposito_principal as ind4_1601_0_, invgraldep0_.ind_estado as ind5_1601_0_, invgraldep0_.nombre_deposito as nombre6_1601_0_, invgraldep0_.usu_alta as usu7_1601_0_, invgraldep0_.usu_ultmod as usu8_1601_0_ from invgral_deposito invgraldep0_ where invgraldep0_.id_deposito=?

      10:52:47,657 DEBUG [org.hibernate.SQL] (http-localhost-127.0.0.1-8080-1) select empresased0_.id_empresa as id1_1598_0_, empresased0_.id_sede as id2_1598_0_, empresased0_.fecha_ult_mod as fecha3_1598_0_, empresased0_.sigla as sigla1598_0_, empresased0_.usuario_ult_mod as usuario5_1598_0_ from empresa_sede empresased0_ where empresased0_.id_sede=?

      10:52:47,671 DEBUG [org.hibernate.SQL] (http-localhost-127.0.0.1-8080-1) select empresased0_.id_empresa as id1_1598_0_, empresased0_.id_sede as id2_1598_0_, empresased0_.fecha_ult_mod as fecha3_1598_0_, empresased0_.sigla as sigla1598_0_, empresased0_.usuario_ult_mod as usuario5_1598_0_ from empresa_sede empresased0_ where empresased0_.id_sede=?

      10:52:47,679 INFO  [py.org.pti.sgpti.inventariosgenerales.data.DatabaseManager] (http-localhost-127.0.0.1-8080-1) Updated py.org.pti.sgpti.inventariosgenerales.model.InvgralDeposito::-38::null

      10:52:47,682 ERROR [org.hibernate.property.BasicPropertyAccessor] (http-localhost-127.0.0.1-8080-1) HHH000122: IllegalArgumentException in class: py.org.pti.sgpti.inventariosgenerales.model.sgpti.EmpresaSedePK, getter method of property: idEmpresa

      10:52:47,685 WARN  [com.arjuna.ats.arjuna] (http-localhost-127.0.0.1-8080-1) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff7f000101:ec4af4a:50d04596:2ba, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@50a7c475 >: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of py.org.pti.sgpti.inventariosgenerales.model.sgpti.EmpresaSedePK.idEmpresa

          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1295) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1481) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)

          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)

          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)

          at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)

          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)

          at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)

          at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

          at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_18]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_18]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_18]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_18]

          at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.builtin.CallableMethodHandler.invoke(CallableMethodHandler.java:51) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weldx.transaction.UserTransaction$-1977084765$Proxy$_$$_Weld$Proxy$.commit(UserTransaction$-1977084765$Proxy$_$$_Weld$Proxy$.java) [jboss-transaction-api_1.1_spec-1.0.0.Final.jar:]

          at py.org.pti.sgpti.inventariosgenerales.data.DatabaseManager.update(DatabaseManager.java:118) [classes:]

          at py.org.pti.sgpti.inventariosgenerales.data.DatabaseManager$Proxy$_$$_WeldClientProxy.update(DatabaseManager$Proxy$_$$_WeldClientProxy.java) [classes:]

          at py.org.pti.sgpti.inventariosgenerales.controller.DepositoEditController.save(DepositoEditController.java:164) [classes:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_18]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_18]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_18]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_18]

          at org.apache.el.parser.AstValue.invoke(AstValue.java:262) [jbossweb-7.0.13.Final.jar:]

          at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.7-jbossorg-2.jar:]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

          at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_18]

      Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of py.org.pti.sgpti.inventariosgenerales.model.sgpti.EmpresaSedePK.idEmpresa

          at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:187) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValue(AbstractComponentTuplizer.java:76) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValues(AbstractComponentTuplizer.java:82) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.tuple.component.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:107) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:427) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.type.ComponentType.isDirty(ComponentType.java:278) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:277) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:286) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:294) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3807) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:486) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:219) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:148) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:225) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          ... 59 more

      Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4e1cfb13

          at sun.reflect.GeneratedMethodAccessor1774.invoke(Unknown Source) [:1.6.0_18]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_18]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_18]

          at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:164) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

          ... 77 more

       

      10:52:47,935 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) java.lang.IllegalStateException: BaseTransaction.rollback - ARJUNA016074: no transaction!

      10:52:47,936 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:130)

      10:52:47,938 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114)

      10:52:47,939 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.rollback(ServerVMClientUserTransaction.java:175)

      10:52:47,941 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      10:52:47,942 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      10:52:47,944 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      10:52:47,945 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.lang.reflect.Method.invoke(Method.java:616)

      10:52:47,946 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

      10:52:47,948 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

      10:52:47,949 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

      10:52:47,951 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

      10:52:47,952 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.bean.builtin.CallableMethodHandler.invoke(CallableMethodHandler.java:51)

      10:52:47,953 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)

      10:52:47,955 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)

      10:52:47,956 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weldx.transaction.UserTransaction$-1977084765$Proxy$_$$_Weld$Proxy$.rollback(UserTransaction$-1977084765$Proxy$_$$_Weld$Proxy$.java)

      10:52:47,958 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at py.org.pti.sgpti.inventariosgenerales.data.DatabaseManager.update(DatabaseManager.java:125)

      10:52:47,960 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at py.org.pti.sgpti.inventariosgenerales.data.DatabaseManager$Proxy$_$$_WeldClientProxy.update(DatabaseManager$Proxy$_$$_WeldClientProxy.java)

      10:52:47,961 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at py.org.pti.sgpti.inventariosgenerales.controller.DepositoEditController.save(DepositoEditController.java:164)

      10:52:47,963 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      10:52:47,964 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      10:52:47,965 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      10:52:47,967 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.lang.reflect.Method.invoke(Method.java:616)

      10:52:47,968 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.el.parser.AstValue.invoke(AstValue.java:262)

      10:52:47,969 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)

      10:52:47,971 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)

      10:52:47,972 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)

      10:52:47,973 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

      10:52:47,975 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)

      10:52:47,976 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

      10:52:47,978 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at javax.faces.component.UICommand.broadcast(UICommand.java:315)

      10:52:47,979 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

      10:52:47,980 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

      10:52:47,982 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

      10:52:47,983 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

      10:52:47,984 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

      10:52:47,987 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

      10:52:47,988 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

      10:52:47,990 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      10:52:47,991 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)

      10:52:47,993 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

      10:52:47,994 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

      10:52:47,996 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

      10:52:47,998 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

      10:52:47,999 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

      10:52:48,000 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

      10:52:48,002 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

      10:52:48,003 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      10:52:48,005 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      10:52:48,006 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

      10:52:48,007 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

      10:52:48,009 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

      10:52:48,010 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

      10:52:48,012 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.lang.Thread.run(Thread.java:636)

       

       

      the EmpresaSedePK code is

      @Embeddable

      public class EmpresaSedePK implements Serializable

      {

          /**

           *

           */

          private static final long serialVersionUID = 6720635782474067358L;

         

          private Integer idEmpresa;

          private Integer idSede;

       

          public EmpresaSedePK()

          {

          }

       

          @Column(name = "id_empresa", unique = true, nullable = false)

          public Integer getIdEmpresa()

          {

              return this.idEmpresa;

          }

       

          public void setIdEmpresa(Integer idEmpresa)

          {

              this.idEmpresa = idEmpresa;

          }

       

          @Column(name = "id_sede", unique = true, nullable = false)

          public Integer getIdSede()

          {

              return this.idSede;

          }

       

          public void setIdSede(Integer idSede)

          {

              this.idSede = idSede;

          }

       

          public boolean equals(Object other)

          {

              if (this == other)

              {

                  return true;

              }

              if (!(other instanceof EmpresaSedePK))

              {

                  return false;

              }

              EmpresaSedePK castOther = (EmpresaSedePK) other;

              return this.idEmpresa.equals(castOther.idEmpresa)

                      && this.idSede.equals(castOther.idSede);

       

          }

       

          public int hashCode()

          {

              final int prime = 31;

              int hash = 17;

              hash = hash * prime + this.idEmpresa.hashCode();

              hash = hash * prime + this.idSede.hashCode();

       

              return hash;

          }

      }