AnsweredAssumed Answered

AVMBrowseBean.createFormContent

Question asked by freedev on Oct 23, 2007
Latest reply on Feb 4, 2008 by e.r.i.c.
Hi all,

thank you for reading my post.

I receive an exception when I try to open an easy web form based on this xsd (that is a copy of wsf 1.0 sample company-footer.xsd):


<xs:schema targetNamespace="http://www.alfresco.org/alfresco/pr" elementFormDefault="qualified">
<!– defines the form for creating a team –>
   <xs:element name="team">
   <xs:complexType>
   <xs:sequence>
            <xs:element name="name" type="xs:normalizedString"/>
            <xs:element name="description" type="xs:normalizedString" minOccurs="1"/>
            <xs:element name="sponsor" type="xs:normalizedString" minOccurs="0"/>
        </xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

I think I'm experiencing a bug, because I have a clean installation using the community edition updated via svn to revision 1200 on an empty mysql.
After the installation, I have created a new web project, and loaded a bulk war (with a hello world jsp inside) and configured the web form into the web project: that's all.
Now when I click on the Web Forms > Create content
I receive the following exception and, believe me, this is really frustrating.

Thanks in advance for your help,
Vincenzo


javax.faces.el.EvaluationException: Exception while invoking expression #{AVMBrowseBean.createFormContent}
caused by:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.alfresco.repo.avm.PlainDirectoryNodeImpl#71]
Details:


17:45:00,095 User:admin ERROR [[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.alfresco.repo.avm.PlainDirectoryNodeImpl#71]
   at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:556)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:259)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:217)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
   at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
   at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
   at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
   at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)
   at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
   at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
   at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
   at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
   at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
   at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
   at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
   at org.alfresco.repo.avm.hibernate.AVMNodeDAOHibernate.flush(AVMNodeDAOHibernate.java:175)
   at org.alfresco.repo.avm.LayeredDirectoryNodeImpl.<init>(LayeredDirectoryNodeImpl.java:106)
   at org.alfresco.repo.avm.AVMStoreImpl.createLayeredDirectory(AVMStoreImpl.java:389)
   at org.alfresco.repo.avm.AVMRepository.createLayeredDirectory(AVMRepository.java:371)
   at org.alfresco.repo.avm.AVMServiceImpl.createLayeredDirectory(AVMServiceImpl.java:454)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptor.invoke(AVMSnapShotTriggeredIndexingMethodInterceptor.java:154)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy22.createLayeredDirectory(Unknown Source)
   at org.alfresco.repo.avm.AVMSyncServiceImpl.resetLayer(AVMSyncServiceImpl.java:802)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
   at org.alfresco.repo.transaction.RetryingTransactionAdvice.invoke(RetryingTransactionAdvice.java:93)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy47.resetLayer(Unknown Source)
   at org.alfresco.web.bean.wcm.CreateWebContentWizard.init(CreateWebContentWizard.java:216)
   at org.alfresco.web.bean.wizard.WizardManager.setCurrentWizard(WizardManager.java:134)
   at org.alfresco.web.app.AlfrescoNavigationHandler.handleWizardOpen(AlfrescoNavigationHandler.java:667)
   at org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:120)
   at org.alfresco.web.bean.wcm.AVMBrowseBean.createFormContent(AVMBrowseBean.java:1311)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at javax.faces.component.UICommand.broadcast(UICommand.java:89)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:595)

Outcomes