AnsweredAssumed Answered

Share: A JSONObject text must begin with '{'

Question asked by jevon on Dec 19, 2011
Latest reply on Jan 9, 2012 by jevon
Hi,

I have been trying to get Alfresco 4.0.b working on an existing Tomcat 7.0.22 on Windows XP using MySQL. I can get the explorer application to work fine, but I can't get the Share application to work at all.

Tomcat is running on port 8081, but I have followed the instructions at https://wiki.alfresco.com/wiki/Changing_Default_Port_Configuration, and set the properties for alfresco.port and share.port in alfresco-global.properties. I've cleared the database so that it is recreated, and set doc.root manually.

Neither alfresco.log or catalina.out have anything useful, but here's a copy anyway.

Trying to browse to http://localhost:8081/share/ 302 redirects to http://localhost:8081/share/page/site-index, which displays the message "A server error has occured.", and generates the following exception:

2011-12-18 23:55:10,514  INFO  [web.site.EditionInterceptor] [http-bio-8081-exec-6] Successfully retrieved license information from Alfresco.
2011-12-18 23:55:10,654  ERROR [alfresco.web.site] [http-bio-8081-exec-6] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.extensions.surf.exception.WebFrameworkServiceException: Unable to process response: A JSONObject text must begin with '{' at character 1
org.springframework.extensions.surf.exception.WebFrameworkServiceException: Unable to process response: A JSONObject text must begin with '{' at character 1
        at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:138)
        at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:54)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 1
        at org.json.JSONTokener.syntaxError(JSONTokener.java:413)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:420)
        at org.alfresco.web.site.EditionInterceptor$EditionInfo.<init>(EditionInterceptor.java:192)
        at org.alfresco.web.site.EditionInterceptor.preHandle(EditionInterceptor.java:101)
        … 29 more

Any ideas??

Outcomes