2 Replies Latest reply on Apr 21, 2006 2:23 PM by cpage cpage

    change user role failed

    pedro costa Apprentice

      When i try to exchange user roles from the portal, i get this error, and user role isn't changed:

      17:54:58,507 ERROR [org.hibernate.util.JDBCExceptionReporter] The executeUpdate method must not return a result set.
      17:54:58,507 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4]
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:980)
       at org.hibernate.action.CollectionRemoveAction.execute(CollectionRemoveAction.java:28)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
       at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905)
       at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:345)
       at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
       at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1473)
       at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1092)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:306)
       at org.jboss.tm.TxManager.commit(TxManager.java:224)
       at org.jboss.portal.common.transaction.Transactions.end(Transactions.java:414)
       at org.jboss.portal.common.transaction.Transactions$5.noTxAfter(Transactions.java:605)
       at org.jboss.portal.common.transaction.Transactions.applyAfter(Transactions.java:122)
       at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:85)
       at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
       at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:130)
       at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:175)
       at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:221)
       at org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:149)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       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:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       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: java.sql.SQLException: The executeUpdate method must not return a result set.
       at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:544)
       at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
       at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
       at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
       at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
       at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:970)
       ... 44 more
      
      



      How can i solve this?

      Thanks,
      Pedro

        • 1. Re: change user role failed
          pedro costa Apprentice

          Here is the rest of the log:

          17:54:01,380 ERROR [org.jboss.portal.common.transaction.Transactions] Problem when ending transaction
          org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dwprc/1061, BranchQual=, localId=1061] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4])
           at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
           at org.jboss.tm.TxManager.commit(TxManager.java:224)
           at org.jboss.portal.common.transaction.Transactions.end(Transactions.java:414)
           at org.jboss.portal.common.transaction.Transactions$5.noTxAfter(Transactions.java:605)
           at org.jboss.portal.common.transaction.Transactions.applyAfter(Transactions.java:122)
           at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:85)
           at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
           at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:130)
           at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:175)
           at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:221)
           at org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:149)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
           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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
           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:856)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
           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: org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4]
           at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
           at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:980)
           at org.hibernate.action.CollectionRemoveAction.execute(CollectionRemoveAction.java:28)
           at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905)
           at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:345)
           at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
           at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1473)
           at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1092)
           at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:306)
           ... 32 more
          Caused by: java.sql.SQLException: The executeUpdate method must not return a result set.
           at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:544)
           at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
           at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
           at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
           at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
           at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:970)
           ... 44 more
          17:54:01,380 ERROR [org.jboss.portal.core.aspects.server.TransactionInterceptor]
          org.jboss.portal.common.transaction.TransactionException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dwprc/1061, BranchQual=, localId=1061] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4])
           at org.jboss.portal.common.transaction.Transactions.end(Transactions.java:438)
           at org.jboss.portal.common.transaction.Transactions$5.noTxAfter(Transactions.java:605)
           at org.jboss.portal.common.transaction.Transactions.applyAfter(Transactions.java:122)
           at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java:85)
           at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
           at org.jboss.portal.server.invocation.Invocation.invokeNext(Invocation.java:130)
           at org.jboss.portal.server.invocation.Invocation.invoke(Invocation.java:175)
           at org.jboss.portal.server.servlet.PortalServlet.doGet(PortalServlet.java:221)
           at org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:149)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
           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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
           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:856)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
           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: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dwprc/1061, BranchQual=, localId=1061] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4])
           at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
           at org.jboss.tm.TxManager.commit(TxManager.java:224)
           at org.jboss.portal.common.transaction.Transactions.end(Transactions.java:414)
           ... 30 more
          Caused by: org.hibernate.exception.SQLGrammarException: could not delete collection: [org.jboss.portal.core.impl.user.UserImpl.roles#4]
           at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
           at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
           at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:980)
           at org.hibernate.action.CollectionRemoveAction.execute(CollectionRemoveAction.java:28)
           at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905)
           at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:345)
           at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
           at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1473)
           at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1092)
           at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:306)
           ... 32 more
          Caused by: java.sql.SQLException: The executeUpdate method must not return a result set.
           at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:544)
           at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
           at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
           at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:227)
           at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
           at org.hibernate.persister.collection.AbstractCollectionPersister.remove(AbstractCollectionPersister.java:970)
           ... 44 more
          
          
          


          • 2. Re: change user role failed
            cpage cpage Novice

            what is your code source ?

            The executeUpdate method must not return a result set.