3 Replies Latest reply on Apr 16, 2012 4:33 PM by Ignacio de Cordoba

    [AS7] Need to change @GeneratedValue AUTO  in AS7 (from AS 5.1)

    Adrien Adrien Apprentice

      Hi

      I m migrating from AS 5.1 to AS 7 (database = mysql 5)

       

      In AS 5.1 To generate an id I use strategy = GenerationType.AUTO

       

      @Id

          @Column(name="id")

          @GeneratedValue(strategy = GenerationType.AUTO)

          Integer id

       

      IN AS 7, All seems to works in GenerationType.AUTO, but at the 3 eme day I got ConstraintViolationException duplicate Id. I think it is the value in the table hibernate_sequence.

       

      I've droped my schema, and the problem occurs again, I suspect like I have multiple EJB with GeneratedValue, it is always the value in hibernate_sequence wich is used?

       

      So I've change the strategie AUTO to IDENTITY

      @Id

          @Column(name="id")

          @GeneratedValue(strategy = GenerationType.IDENTITY)

          Integer id

       

       

      And it s look ok, the id come from mysql DB.

       

      I thing in AS 7, using  GenerationType.AUTO is not like AS 5.1 where the id is generated by DB: is it right?

       

       

      Maybe it could help another who migrating   as 5.1->7.0.2

       

      Adrien

       

      From http://java.sun.com/javaee/6/docs/api/javax/persistence/GenerationType.html

       

      AUTO 

                 Indicates that the persistence provider should pick an appropriate strategy for the particular database.  

      IDENTITY 

                 Indicates that the persistence provider must assign primary keys for the entity using a database identity column.

        SEQUENCE 

                 Indicates that the persistence provider must assign primary keys for the entity using a database sequence.  

      TABLE 

                 Indicates that the persistence provider must assign primary keys for the entity using an underlying database table to ensure uniqueness.

       

       

      Here the exception if need

       

       

      21:18:46,918 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-127.0.0.1-127.0.0.1-80-2) SQL Error: 1062, SQLState: 23000

      21:18:46,918 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-127.0.0.1-127.0.0.1-80-2) Duplicate entry '3' for key 'PRIMARY'

      21:18:46,919 WARN  [com.arjuna.ats.arjuna] (http-127.0.0.1-127.0.0.1-80-2) ARJUNA12125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffc0a80101:7b154f2e:4e8b587d:4fa, org.hibernate.engine

      ersistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1347) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

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

              at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

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

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

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

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

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

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

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

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)

              at com.horizon.server.session.PartenairesFacadeI$$$view110.addPartenaire(Unknown Source) [classes:]

              at com.horizon.web.jsf.admin.CtrlAdminPartenaires.save(CtrlAdminPartenaires.java:98) [classes:]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

              at com.sun.el.parser.AstValue.invoke(AstValue.java:234) [el-impl-2.2.jar:]

              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) [el-impl-2.2.jar:]

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

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

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

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

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

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

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

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

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

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

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

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

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

              at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

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

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

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

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

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

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

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

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

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

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

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

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

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

      Caused by: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:104) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:131) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at $Proxy78.executeUpdate(Unknown Source)       at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2839) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:336) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

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

              ... 59 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_26]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_26]

              at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

              at com.mysql.jdbc.Util.getInstance(Util.java:386)

              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)

              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)

              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)

              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)

              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)

              at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115)

              at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              ... 73 more

       

       

      21:18:46,938 INFO  [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (http-127.0.0.1-127.0.0.1-80-2) HHH00106:Forcing container resource cleanup on transaction completion

      21:18:46,939 INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (http-127.0.0.1-127.0.0.1-80-2) HHH00010:On release of batch it still contained JDBC statements

      21:18:46,939 ATTENTION [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http-127.0.0.1-127.0.0.1-80-2) #{ctrlAdminPartenaires.save}: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back: javax.fa

      ckException: Transaction rolled back

              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

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

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

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

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

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

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

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

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

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

              at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

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

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

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

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

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

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

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

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

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

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

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

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

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

      Caused by: javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

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

              ... 26 more

      Caused by: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:107) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]

              at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)

              at com.horizon.server.session.PartenairesFacadeI$$$view110.addPartenaire(Unknown Source) [classes:]

              at com.horizon.web.jsf.admin.CtrlAdminPartenaires.save(CtrlAdminPartenaires.java:98) [classes:]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

              at com.sun.el.parser.AstValue.invoke(AstValue.java:234) [el-impl-2.2.jar:]

              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297) [el-impl-2.2.jar:]

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

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

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

              ... 27 more

      Caused by: javax.transaction.RollbackException: Could not commit transaction.

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

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

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

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]

              ... 50 more

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1347) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]

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

              at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

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

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

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

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

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

              ... 53 more

      Caused by: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:104) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:131) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at $Proxy78.executeUpdate(Unknown Source)       at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2839) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:336) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

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

              ... 59 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_26]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_26]

              at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

              at com.mysql.jdbc.Util.getInstance(Util.java:386)

              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)

              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)

              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)

              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)

              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)

              at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115)

              at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]

              ... 73 more

       

       

      21:18:46,961 ATTENTION [com.horizon.web.system.exceptionmngt.GoogleCodeDefaultExceptionHandler] (http-127.0.0.1-127.0.0.1-80-2) on doit afficher

      javax.faces.FacesException: #{ctrlAdminPartenaires.save}: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:89)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

              at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)

              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480)

              at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: javax.faces.FacesException: #{ctrlAdminPartenaires.save}: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)

              at javax.faces.component.UICommand.broadcast(UICommand.java:315)

              at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

              at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

              at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

              ... 22 more

      Caused by: javax.faces.el.EvaluationException: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)

              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

              ... 26 more

      Caused by: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:107)

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88)

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215)

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284)

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)

              at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

              at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

              at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)

              at com.horizon.server.session.PartenairesFacadeI$$$view110.addPartenaire(Unknown Source)

              at com.horizon.web.jsf.admin.CtrlAdminPartenaires.save(CtrlAdminPartenaires.java:98)

              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:597)

              at com.sun.el.parser.AstValue.invoke(AstValue.java:234)

              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)

              at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)

              at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)

              at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)

              ... 27 more

      Caused by: javax.transaction.RollbackException: Could not commit transaction.

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

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

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

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85)

              ... 50 more

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1347)

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280)

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286)

              at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457)

              at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109)

              at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54)

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

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

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

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

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

              ... 53 more

      Caused by: org.hibernate.exception.ConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:104)

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)

              at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:131)

              at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:80)

              at $Proxy78.executeUpdate(Unknown Source)

              at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56)

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2839)

              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3276)

              at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80)

              at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273)

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265)

              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186)

              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:336)

              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)

              at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084)

              at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319)

              at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104)

              ... 59 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3' for key 'PRIMARY'

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

              at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

              at com.mysql.jdbc.Util.getInstance(Util.java:386)

              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)

              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)

              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)

              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)

              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)

              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)

              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)

              at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115)

              at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)

              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:597)

              at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:124)

              ... 73 more

       

       

      21:18:46,978 FIN   [com.horizon.web.system.exceptionmngt.GoogleCodeDefaultExceptionHandler] (http-127.0.0.1-127.0.0.1-80-2) X2Valio

      21:18:46,978 FIN   [com.horizon.web.system.exceptionmngt.GoogleCodeDefaultExceptionHandler] (http-127.0.0.1-127.0.0.1-80-2) handle() ->redirect ->: /pages/adm/erroradmin.jsf   class javax.faces.FacesException

      21:18:47,032 FIN   [com.horizon.web.jsf.converters.IPLongToStringConverter] (http-127.0.0.1-127.0.0.1-80-2) getAsString(....value='0'

      21:18:47,032 FIN   [com.horizon.web.jsf.converters.IPLongToStringConverter] (http-127.0.0.1-127.0.0.1-80-2) getAsString(....value='0'

      21:18:47,033 FIN   [com.horizon.web.jsf.converters.IPLongToStringConverter] (http-127.0.0.1-127.0.0.1-80-2) getAsString(....value='0'

      21:18:47,033 FIN   [com.horizon.web.jsf.converters.IPLongToStringConverter] (http-127.0.0.1-127.0.0.1-80-2) getAsString(....value='0'