Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting of user removes all public recipes #905

Closed
akorneta opened this issue Oct 5, 2016 · 0 comments
Closed

Deleting of user removes all public recipes #905

akorneta opened this issue Oct 5, 2016 · 0 comments

Comments

@akorneta
Copy link
Contributor

akorneta commented Oct 5, 2016

It is needed to rework recipe permission getByuserId query just as in stack permission equivalent query.

Trace from beta.codenvy.com

2016-10-05 12:15:35,107[nio-8080-exec-1]  [ERROR] [LastUserRemovedEventSubscriber 82]   - Couldn't remove permissions before user 'user3rva0f99tw8sl10h' is removed
org.eclipse.che.api.core.NotFoundException: Permissions on recipe 'recipe003pjp2l5358pj8m' of user 'user3rva0f99tw8sl10h' was not found.
        at com.codenvy.api.machine.server.jpa.JpaRecipePermissionsDao.doGet(JpaRecipePermissionsDao.java:112) ~[codenvy-hosted-api-machine-5.0.0-M4.jar:5.0.0-M4]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:62) ~[guice-persist-4.1.0.jar:na]
        at com.codenvy.api.machine.server.jpa.JpaRecipePermissionsDao.get(JpaRecipePermissionsDao.java:61) ~[codenvy-hosted-api-machine-5.0.0-M4.jar:5.0.0-M4]
        at com.codenvy.api.machine.server.jpa.JpaRecipePermissionsDao.get(JpaRecipePermissionsDao.java:47) ~[codenvy-hosted-api-machine-5.0.0-M4.jar:5.0.0-M4]
        at com.codenvy.api.permission.server.jpa.AbstractJpaPermissionsDao.doRemove(AbstractJpaPermissionsDao.java:109) ~[codenvy-hosted-api-permission-5.0.0-M4.jar:5.0.0-M4]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:62) ~[guice-persist-4.1.0.jar:na]
        at com.codenvy.api.permission.server.jpa.AbstractJpaPermissionsDao.remove(AbstractJpaPermissionsDao.java:82) ~[codenvy-hosted-api-permission-5.0.0-M4.jar:5.0.0-M4]
        at com.codenvy.api.permission.server.jpa.listener.RemovePermissionsOnLastUserRemovedEventSubscriber.onEvent(RemovePermissionsOnLastUserRemovedEventSubscriber.java:78) ~[codenvy-hosted-api-permission-5.0.0-M4.jar:5.0.0-M4]
        at com.codenvy.api.permission.server.jpa.listener.RemovePermissionsOnLastUserRemovedEventSubscriber.onEvent(RemovePermissionsOnLastUserRemovedEventSubscriber.java:41) ~[codenvy-hosted-api-permission-5.0.0-M4.jar:5.0.0-M4]
        at org.eclipse.che.api.core.notification.EventService.publish(EventService.java:105) ~[che-core-api-core-5.0.0-M4.jar:5.0.0-M4]
        at org.eclipse.che.api.user.server.jpa.UserEntityListener.preRemove(UserEntityListener.java:34) ~[che-core-api-user-5.0.0-M4.jar:5.0.0-M4]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
        at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
        at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeMethod(PrivilegedAccessHelper.java:420) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.invokeMethod(EntityListener.java:326) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.invokeMethod(EntityListener.java:350) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListener.preRemove(EntityListener.java:456) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:751) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:674) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:229) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.performRemove(UnitOfWorkImpl.java:3586) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.remove(EntityManagerImpl.java:574) ~[eclipselink-2.6.2.jar:2.6.2.v20151217-774c696]
        at org.eclipse.che.api.user.server.jpa.JpaUserDao.doRemove(JpaUserDao.java:230) ~[che-core-api-user-5.0.0-M4.jar:5.0.0-M4]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:70) ~[guice-persist-4.1.0.jar:na]
        at org.eclipse.che.api.user.server.jpa.JpaUserDao.remove(JpaUserDao.java:104) ~[che-core-api-user-5.0.0-M4.jar:5.0.0-M4]
        at org.eclipse.che.api.user.server.UserManager.remove(UserManager.java:256) ~[che-core-api-user-5.0.0-M4.jar:5.0.0-M4]
        at com.codenvy.saas.marketo.DeleteUserInterceptor.invoke(DeleteUserInterceptor.java:59) ~[saas-marketo-5.0.0-M4.jar:5.0.0-M4]
        at org.eclipse.che.api.user.server.UserService.remove(UserService.java:205) ~[che-core-api-user-5.0.0-M4.jar:5.0.0-M4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants