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

Cannot create project using project-creator role #3957

Closed
reckart opened this issue Apr 18, 2023 · 0 comments
Closed

Cannot create project using project-creator role #3957

reckart opened this issue Apr 18, 2023 · 0 comments
Assignees
Labels
🐛Bug Something isn't working Module: Dashboard
Milestone

Comments

@reckart
Copy link
Member

reckart commented Apr 18, 2023

Describe the bug
It is not possible to create a project as a user having only the USER and PROJECT_CREATOR roles using the New project button. It works when selecting a project template from the dropdown though.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the project overview page
  2. Click on New project...
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: de.tudarmstadt.ukp.clarin.webanno.model.Project
        at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:347) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.type.EntityType.getIdentifier(EntityType.java:508) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.type.EntityType.nullSafeSet(EntityType.java:289) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:53) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:682) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.bindPreparedStatement(Loader.java:2150) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:2127) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2059) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2037) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.doQuery(Loader.java:956) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.doList(Loader.java:2868) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.doList(Loader.java:2850) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.Loader.list(Loader.java:2677) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:540) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:218) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1459) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1665) ~[hibernate-core-5.6.15.Final.jar!/:5.6.15.Final]
        at de.tudarmstadt.ukp.clarin.webanno.project.ProjectServiceImpl.hasRole(ProjectServiceImpl.java:397) ~[inception-project-27.5.jar!/:?]
        at de.tudarmstadt.ukp.clarin.webanno.project.ProjectServiceImpl.hasRole(ProjectServiceImpl.java:373) ~[inception-project-27.5.jar!/:?]
        at de.tudarmstadt.ukp.clarin.webanno.project.ProjectServiceImpl$$FastClassBySpringCGLIB$$87162b14.invoke(<generated>) ~[inception-project-27.5.jar!/:?]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.27.jar!/:5.3.27]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.27.jar!/:5.3.27]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) ~[spring-aop-5.3.27.jar!/:5.3.27]
        at de.tudarmstadt.ukp.clarin.webanno.project.ProjectServiceImpl$$EnhancerBySpringCGLIB$$692f45e3.hasRole(<generated>) ~[inception-project-27.5.jar!/:?]
        at jdk.internal.reflect.GeneratedMethodAccessor251.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.apache.wicket.proxy.jdk.JdkProxyFactory$JdkHandler.invoke(JdkProxyFactory.java:172) ~[wicket-ioc-9.12.0.jar!/:9.12.0]
        at com.sun.proxy.$Proxy255.hasRole(Unknown Source) ~[?:?]
        at de.tudarmstadt.ukp.inception.ui.core.menubar.MenuBar.isMenubarVisibleToCurrentUser(MenuBar.java:165) ~[inception-ui-dashboard-27.5.jar!/:?]
        at de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaBehavior$9.onConfigure(LambdaBehavior.java:162) ~[inception-support-27.5.jar!/:?]
        at org.apache.wicket.Component.configure(Component.java:1003) ~[wicket-core-9.12.0.jar!/:9.12.0]
        at org.apache.wicket.Component.beforeRender(Component.java:938) ~[wicket-core-9.12.0.jar!/:9.12.0]
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1759) ~[wicket-core-9.12.0.jar!/:9.12.0]
        ... 104 more

Please complete the following information:

  • Version and build ID: 27.5
@reckart reckart added 🐛Bug Something isn't working Module: Dashboard labels Apr 18, 2023
@reckart reckart added this to the 27.6 milestone Apr 18, 2023
@reckart reckart self-assigned this Apr 18, 2023
@reckart reckart changed the title Cannot create project Cannot create project using project-creator role Apr 18, 2023
reckart added a commit that referenced this issue Apr 18, 2023
- Show menubar also to project creators - this is in particular important during the creation of projects using the traditional "New project" approach
- Fix typo
reckart added a commit that referenced this issue Apr 18, 2023
…eate-project-using-project-creator-role

#3957 - Cannot create project using project-creator role
@reckart reckart closed this as completed Apr 18, 2023
reckart added a commit that referenced this issue Apr 18, 2023
* release/27.x:
  #3958 - Dynamically sized multi-line string fields no resize automatically
  #3957 - Cannot create project using project-creator role
reckart added a commit that referenced this issue Apr 18, 2023
…curator

* main:
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-27.6
  #3958 - Dynamically sized multi-line string fields no resize automatically
  #3957 - Cannot create project using project-creator role
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-27.5
  #3932 - Upgrade dependencies
  #3953 - Switch core footer items to auto-configuration
  #3951 - Lots of errors and warnings from logging system during startup
  No issue: Demote some logged message to debug level
  #3940 - Merge label into eligible existing annotation even when stacking is enabled

% Conflicts:
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/service/RecommendationServiceImpl.java
%	inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java
@reckart reckart added this to Kanban Aug 7, 2024
@reckart reckart moved this to 🍹 Done in Kanban Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Dashboard
Projects
Archived in project
Development

No branches or pull requests

1 participant