AnsweredAssumed Answered

Security Authenticate Error FreeMarker Template Merge

Question asked by nyronian on May 25, 2007
Latest reply on Sep 12, 2007 by finner
About a week ago I started to get "Authentication" Errors while calling the template merger:

http://localhost:8080/alfresco/template/?templatePath=....

What is odd is it will work about half the time.  I will attempt the page, it will give the error.  I do a ctrl-F5 3-4 times and it will work.  It works for a while then stops working….I refresh a few times and it works.  That is with no changes to code.

I am calling the URL From a servlet I created.  At first, I was connecting and retreiving a ticket.  I started to get the error.  I then removed the ticket and opened the template up to "guest" access and sent guest=true as a parameter.  The behavior stayed the same. 

Below is the exception I recieve when I call the template URL.  I tried to shorten it up a bit showing the full thread.  If you need more, let me know.


16:53:04,093 ERROR [[localhost].[/alfresco].[templateContent]] Servlet.service()
for servlet templateContent threw exception
org.alfresco.error.AlfrescoRuntimeException: Error during template servlet processing: IO Error during processing of the template 'workspace://SpacesStore/0646a58e-0a40-11dc-8d85-e5e68ca42e13'.
Please contact your system administrator. at org.alfresco.web.app.servlet.BaseTemplateContentServlet.processTempla
teRequest(BaseTemplateContentServlet.java:264)   
at org.alfresco.web.app.servlet.TemplateContentServlet.service(TemplateContentServlet.java:117)    
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
….
Caused by: org.alfresco.service.cmr.repository.TemplateException: IO Error during processing of the template 'workspace://SpacesStore/0646a58e-0a40-11dc-8d85-e5
e68ca42e13'. Please contact your system administrator.
        at com.tlhc.wc.web.template.WCFreeMarkerProcessor.process(WCFreeMarkerProcessor.java:158)
        at org.alfresco.repo.template.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:115)
….
Caused by: net.sf.acegisecurity.BadCredentialsException: Bad credentials presented
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserF
romBackend(DaoAuthenticationProvider.java:393)
        at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenti
cate(DaoAuthenticationProvider.java:225)
        at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159)
        at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvo
cation(AbstractSecurityInterceptor.java:372)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInter
ceptor.invoke(MethodSecurityInterceptor.java:77)


One item to note is that I extended the FreeMarkerProcessor to add data to the model.  I don't beleive it is causing any problems.  And again….a few ctrl-F5 on my browser and it will eventually work….just nobody seems to be ok with that…. :wink:

Thank you for your help.

Outcomes