Hi,
I'm trying to run samples provided with Alfresco source and I've some exceptions concerning spring transactions.
Login works fine,
// Retrieve Company Home
Node root = session.getRootNode();
Node companyHome = root.getNode("app:company_home");
works fine too, but when I want to access to the companyHome variable for the getNodes() method, transaction is marked as rollbackOnly
SimpleExample.java throws the following Exception
Exception in thread "main" org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:465)
at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy14.isCurrentUserTheSystemUser(Unknown Source)
at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryVoter.vote(ACLEntryVoter.java:189)
at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:69)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:37)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
at $Proxy22.getCurrentUserName(Unknown Source)
at org.alfresco.jcr.util.JCRProxyFactory$SessionContextInvocationHandler.invoke(JCRProxyFactory.java:116)
at $Proxy66.logout(Unknown Source)
at org.alfresco.jcr.example.SimpleExample.main(SimpleExample.java:82)
SimpleExampleWithContent.java seems to work fine however.
Can anybody help me???
Regards,
Phil