Closed kwoot closed 6 years ago
Bugzilla Comment ID: 2637 Date: 2011-04-28 09:50:55 From: Manuel Rego Casasnovas \<rego@igalia.com>
1) Create a new user with just 1 role "Project creation allowed" 2) Login with the new user 3) Try to create a project (take into account that when you create a project it's saved just after closing the small creation form)
Message - object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.orders.entities.Order; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.orders.entities.Order
Exception type: class org.springframework.dao.InvalidDataAccessApiUsageException
Stacktrace: org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.orders.entities.Order; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.orders.entities.Order at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.convertHibernateAccessException(AbstractSessionFactoryBean.java:303) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.translateExceptionIfPossible(AbstractSessionFactoryBean.java:282) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:62) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:146) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy58.listByOrderUserAndItsProfiles(Unknown Source) at org.navalplanner.web.orders.OrderModel.userCanWrite(OrderModel.java:967) at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy131.userCanWrite(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.updateDisabilitiesOnInterface(OrderCRUDController.java:1430) at org.navalplanner.web.orders.OrderCRUDController.prepareEditWindow(OrderCRUDController.java:960) at org.navalplanner.web.orders.OrderCRUDController.editNewCreatedOrder(OrderCRUDController.java:1064) at org.navalplanner.web.orders.OrderCRUDController.editNewCreatedOrder(OrderCRUDController.java:1069) at org.navalplanner.web.orders.ProjectDetailsController.accept(ProjectDetailsController.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:119) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:797) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:176) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:519) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446) Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.orders.entities.Order at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219) at org.hibernate.type.EntityType.getIdentifier(EntityType.java:407) at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:87) at org.hibernate.loader.Loader.bindPositionalParameters(Loader.java:1711) at org.hibernate.loader.Loader.bindParameterValues(Loader.java:1682) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1567) at org.hibernate.loader.Loader.doQuery(Loader.java:673) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2217) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108) at org.hibernate.loader.Loader.list(Loader.java:2103) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1570) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.navalplanner.business.users.daos.OrderAuthorizationDAO.listByOrderAndUser(OrderAuthorizationDAO.java:80) at org.navalplanner.business.users.daos.OrderAuthorizationDAO.listByOrderUserAndItsProfiles(OrderAuthorizationDAO.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138) ... 38 more
Bugzilla Comment ID: 2638 Date: 2011-04-28 11:19:32 From: Manuel Rego Casasnovas \<rego@igalia.com>
commit 02c4aae66394ca87f23629cdf8a00d4c3d5c853e Author: Manuel Rego Casasnovas mrego@igalia.com Date: Thu Apr 28 11:02:26 2011 +0200
[Bug #1034] Fixed bug for users with "Project creation allowed" role.
If project is new and user has that role, then it can save the project
and edit it.
FEA: ItEr74S04BugFixing
Bugzilla Comment ID: 2711 Date: 2011-05-06 17:51:34 From: Manuel Rego Casasnovas \<rego@igalia.com>
(Original Bugzilla Bug ID: 1034)
Date: 2011-04-28 09:50:55 From: Manuel Rego Casasnovas \<rego@igalia.com> To: Manuel Rego Casasnovas \<rego@igalia.com> Version: navalplan-1.1 (1.1.x) Duplicate: 1057) Last updated: 2011-05-06 17:51:34
(Note: this issue was migrated automatically with bugzilla2github.py tool )