cancel
Showing results for 
Search instead for 
Did you mean: 

problem running the SimpleExampleWithContent

sail
Champ in-the-making
Champ in-the-making
I import the Repository, Core, 3rd Party project into eclipse workspace, and build these projects, nothing wrong.

but when i tried to run the org.alfresco.example.SimpleExampleWithContent in the Repository project ,i got an Exception

Exception in thread "main" net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
   at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:37)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:57)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
   at $Proxy22.exists(Unknown Source)
   at org.alfresco.example.SimpleExampleWithContent.doExample(SimpleExampleWithContent.java:105)
   at org.alfresco.example.SimpleExampleWithContent.access$0(SimpleExampleWithContent.java:95)
   at org.alfresco.example.SimpleExampleWithContent$1.doWork(SimpleExampleWithContent.java:87)
   at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:127)
   at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:72)
   at org.alfresco.example.SimpleExampleWithContent.main(SimpleExampleWithContent.java:91)

thank you!
4 REPLIES 4

sail
Champ in-the-making
Champ in-the-making
This Exception is thrown at the code "if (!nodeService.exists(storeRef))".
using alfresco 1.1.2.

how can i resolve this problem, thank you in adv.

derek
Star Contributor
Star Contributor
Hi,

That was fixed on 16/01.  The introduction of security features into the Open Source version of Alfresco caused this failure.  The latest code can be fetched directly from SVN or from the nightly builds.
http://www.alfresco.org/mediawiki/index.php/Development_Environment#Subversion_Repository_Access

Regards

derek
Star Contributor
Star Contributor
Hi,

There might be a problem with the system not being initialised properly when running outside of the Web App.  This will be fixed:
   http://www.alfresco.org/jira/browse/AR-416

Regards

sail
Champ in-the-making
Champ in-the-making
I check the code of SimpleExampleWithContent in Alfresco 1.2, and find there are some codes like this:

        AuthenticationService authenticationService = serviceRegistry.getAuthenticationService();
        authenticationService.authenticate("admin", "admin".toCharArray());

I add the code above into  SimpleExampleWithContent of Aflresco 1.1.2, the problem is resolved.

Thanks for your hint.