AnsweredAssumed Answered

Problem when calling share webscript from java webscript

Question asked by jelena on Dec 9, 2010
Hi, I have a problem when creating site programaticly .

I'm creating site programaticly through java webscript stored in alfresco/service/ubp/createProject. In my java webscript I construct json object and then call create-siteCustom.post.json.js script (script is very similar to create-site.post.json.js with only one modification - adding alf_ticket when calling api/sites).

When I test create-siteCustom script through poster in mozilla firefox it works perfectly, i can access newly created site and after restart of tomcat everything is fine.

But when I call create-siteCustom through java webscript, site creates normally and I can access it, BUT after tomcat/alfresco restart I see created site but when I access it I get following error:
    HTTP Status 500 -

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Could not resolve view with name 'site/test15/dashboard' in servlet with name 'Spring Surf Dispatcher Servlet'
       org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
       org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
       org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
       org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
       org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:67)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
That sounds like the part where needed objects created in AVM rollback, as they never have been executed.

I've noticed this issue with crashed sites with multi tenant mode (https://issues.alfresco.com/jira/browse/ALF-2581), but my alfresco runs as single tenant. I'm using alfresco 3.3g

Thanks for help

Outcomes