#1 2012-10-17 08:14:57

Christian
Member
Registered: 2012-10-17
Website

Benutzerverwaltung - Löschen von Ordnern erzeugt Exception

Ich wollte heute unsere Benutzerstruktur verschlanken und überflüssigen Ballast loswerden. Am Ende mussten noch die leeren Ordnerstrukturen entfernt werden. Einige Ordner innerhalb der Benutzerverwaltung ließen sich problemlos löschen, bei anderen erhielt ich folgende Fehlermeldung. Was ist zu tun?

Gruß Christian


java.lang.IllegalStateException: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not delete: [net.datenwerke.security.service.usermanager.entities.OrganisationalUnit#85363]
    at net.datenwerke.rs.utils.simplequery.byatt.QueryByAttProcessor.process(QueryByAttProcessor.java:115)
    at net.datenwerke.rs.utils.simplequery.byatt.QueryByAttInterceptor.invoke(QueryByAttInterceptor.java:25)
    at net.datenwerke.security.service.usermanager.UserManagerServiceImpl.doPreRemoveOu(UserManagerServiceImpl.java:153)
    at net.datenwerke.security.service.usermanager.UserManagerServiceImpl.remove(UserManagerServiceImpl.java:132)
    at net.datenwerke.security.service.eventlogger.aop.RemoveEntityEventInterceptor.invoke(RemoveEntityEventInterceptor.java:26)
    at net.datenwerke.security.service.usermanager.UserManagerServiceImpl.remove(UserManagerServiceImpl.java:1)
    at net.datenwerke.security.service.treedb.SecuredTreeDBManagerImpl.remove(SecuredTreeDBManagerImpl.java:1)
    at net.datenwerke.treedb.service.treedb.TreeDBManagerImpl.remove(TreeDBManagerImpl.java:114)
    at net.datenwerke.treedb.service.treedb.TreeDBManagerImpl.remove(TreeDBManagerImpl.java:101)
    at net.datenwerke.security.service.treedb.LoggedTreeDbManagerImpl.remove(LoggedTreeDbManagerImpl.java:41)
    at net.datenwerke.security.service.treedb.SecuredTreeDBManagerImpl.remove(SecuredTreeDBManagerImpl.java:65)
    at net.datenwerke.security.service.usermanager.UserManagerServiceImpl.remove(UserManagerServiceImpl.java:135)
    at net.datenwerke.security.service.eventlogger.aop.RemoveEntityEventInterceptor.invoke(RemoveEntityEventInterceptor.java:26)
    at net.datenwerke.security.service.usermanager.UserManagerServiceImpl.remove(UserManagerServiceImpl.java:1)
    at net.datenwerke.security.service.treedb.SecuredTreeDBManagerImpl.remove(SecuredTreeDBManagerImpl.java:1)
    at net.datenwerke.security.server.TreeDBManagerTreeHandler.deleteNode(TreeDBManagerTreeHandler.java:332)
    at net.datenwerke.security.server.TreeDBManagerTreeHandler.deleteNode(TreeDBManagerTreeHandler.java:300)
    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at sun.reflect.GeneratedMethodAccessor1312.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not delete: [net.datenwerke.security.service.usermanager.entities.OrganisationalUnit#85363]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215)
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:255)
    at org.hibernate.ejb.criteria.CriteriaQueryCompiler$3.getResultList(CriteriaQueryCompiler.java:260)
    at net.datenwerke.rs.utils.simplequery.byatt.QueryByAttProcessor.process(QueryByAttProcessor.java:100)
    ... 57 more
Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [net.datenwerke.security.service.usermanager.entities.OrganisationalUnit#85363]
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2728)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2911)
    at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:189)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
    at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:246)
    ... 59 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: Integritäts-Constraint (NBANK.FK950D528720508F5B) verletzt - untergeordneter Datensatz gefunden

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2710)
    ... 70 more

Offline

#2 2012-10-17 10:52:06

Thorsten J. Krause
Guest

Re: Benutzerverwaltung - Löschen von Ordnern erzeugt Exception

Hallo Christian,

da scheint es in der aktuellen Version einen Fehler zu geben, der verhindert, dass Du einen Knoten im Benutzerbaum löschen kannst, wenn auf diesem Benutzervariablen definiert sind.

Wir haben dies als Ticket aufgenommen und werden das Problem in der kommenden Version beheben. Vorerst sollte es reichen, wenn Du manuell vor dem Löschen des Ordners alle definierten Benutzervariablen löschst.

Mit freundlichen Grüßen
Thorsten J. Krause

#3 2012-10-17 11:49:52

Christian
Member
Registered: 2012-10-17
Website

Re: Benutzerverwaltung - Löschen von Ordnern erzeugt Exception

Hallo Thorsten,

das Entfernen der Benutzervariablen hat geklappt, Ordner konnten gelöscht werden. nun gibt es ein analoges Problem für das Löschen alter Benutzer. Ich habe mal die Exception beigefügt. Was muss ich hier gesondert vornehmen, damit das Löschen Erfolg hat?

Gruß Christian


net.datenwerke.gxtdto.client.servercommunication.exceptions.ServerCallFailedException: Error while committing the transaction
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.mapException(CatchStacktraceInterceptor.java:71)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:44)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed.deleteNode(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed.CGLIB$processCall$28(<generated>)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed$$FastClassByGuice$$32fd2074.invoke(<generated>)
    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed.processCall(<generated>)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed.CGLIB$service$39(<generated>)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed$$FastClassByGuice$$32fd2074.invoke(<generated>)
    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
    at net.datenwerke.security.ext.server.usermanager.UserManagerTreeHandlerImpl$$EnhancerByGuice$$d0369bed.service(<generated>)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.persistence.RollbackException: Error while committing the transaction
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:93)
    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:87)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:106)
    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:35)
    ... 25 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not delete: [net.datenwerke.security.service.usermanager.entities.User#84762]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215)
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148)
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)
    ... 42 more
Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [net.datenwerke.security.service.usermanager.entities.User#84762]
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2728)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2911)
    at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:189)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
    ... 42 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: Integritäts-Constraint (NBANK.FK9013D923187DD093) verletzt - untergeordneter Datensatz gefunden

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2710)
    ... 53 more

Offline

#4 2012-10-17 12:38:04

Thorsten J. Krause
Guest

Re: Benutzerverwaltung - Löschen von Ordnern erzeugt Exception

Hallo Christian,

das ist nochmal der selbe Fehler, nur an anderer Stelle. Diesmal ist das Problem, dass der zu loeschende Benutzer einmal Empfaenger einer Nachricht war. Leider gibts es diesmal keinen so einfachen Workaround wie bei den Benutzervariablen.

Ich denke, die sinnvollste Loesung ist es, manuelle ein Update auf der entsprechenden Tabelle zu machen.

UPDATE RS_MESSAGE_RECIPIENT SET USER_ID = NULL WHERE USER_ID = [ID des zu loeschenden Benutzers]

Viele Grüße
Thorsten J. Krause

#5 2012-10-18 11:44:08

Christian
Member
Registered: 2012-10-17
Website

Re: Benutzerverwaltung - Löschen von Ordnern erzeugt Exception

Hallo Thorsten,

das Entfernen der meisten Benutzer hat geklappt, jedoch war das Update nicht ganz so hilfreich. Am Ende musste ich zunächst in aus der RS_MESSAGE_RECIPIENT die ENTITY_IDs der Versandaufträge auslesen und dann zuerst aus der RS_MESSAGE_2_RECIPIENT die Datensätze der zugehörigen RECIPIENTS_IDs Löschen. danach ließen sich die Einträge aus der RS_MESSAGE_RECIPIENT entfernen.

Ich finde die Lösung nicht ganz so schön, da auf diese Weise der ursprüngliche Mailverkehr "manipuliert" wird. Es wäre schön, wenn ihr einen Fix in die nächste Version mit einbaut.

Es gab dann noch einen weiteren Fehler:
Auch für die einzelnen Benutzer mussten manuell alle Benutzervariablen entfernt werden, bevor das Löschen erfolgreich war.

Gruß Christian

Offline

Board footer

Powered by FluxBB