I had a very similar error.  Maurizio tried to help me, but I finally gave
up and stuck with the CMIS connector.  I was on 4.2.f and assumed it was
due to that.  Will be interested in your findings!

On Wed, Sep 30, 2015 at 11:22 AM, Karl Wright <[email protected]> wrote:

> I'm going to let Maurizio comment more fully -- but to me it sounds like
> you're getting back a response that isn't JSON at all.  This argues that
> there's either been a connection misconfiguration (and thus you are
> pointing to the wrong URL), or the AMP is not active and the URL is correct
> but the service is not getting invoked.  Hard to tell without further
> information.  What do you see in the alfresco logs?
>
> Karl
>
>
> On Wed, Sep 30, 2015 at 11:14 AM, Michael Griffith <[email protected]
> > wrote:
>
>> Hi All,
>>
>> I am using Alfresco 5.0.1 Enterprise Edition installed from the installer
>> (vs SDK project).  I am trying to connect Mainfold to it to using
>> https://github.com/maoo/alfresco-indexer.  I have cloned the repo, built
>> the Webscript AMP and installed it. Everything seems to be fine (no errors
>> on the Alfresco side).  When trying to connect to the Alfresco repository
>> using Mainfold (example) I am getting this JSON error:
>>
>> ERROR 2015-09-30 10:58:18,428 (qtp497208183-346) -
>> com.google.gson.stream.MalformedJsonException: Use
>> JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12
>> com.google.gson.JsonSyntaxException:
>> com.google.gson.stream.MalformedJsonException: Use
>> JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12
>> at com.google.gson.Gson.assertFullConsumption(Gson.java:779)
>> at com.google.gson.Gson.fromJson(Gson.java:742)
>> at
>> com.github.maoo.indexer.client.WebScriptsAlfrescoClient.userFromHttpEntity(WebScriptsAlfrescoClient.java:287)
>> at
>> com.github.maoo.indexer.client.WebScriptsAlfrescoClient.fetchUserAuthorities(WebScriptsAlfrescoClient.java:346)
>> at
>> org.apache.manifoldcf.crawler.connectors.alfrescowebscript.AlfrescoConnector.check(AlfrescoConnector.java:124)
>> at
>> org.apache.jsp.viewconnection_jsp._jspService(viewconnection_jsp.java:233)
>> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>> at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
>> at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>> at
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
>> at
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>> at
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>> at
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
>> at
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>> at
>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>> at
>> org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
>> at
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>> at org.eclipse.jetty.server.Server.handle(Server.java:497)
>> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>> at
>> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
>> at
>> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
>> at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: com.google.gson.stream.MalformedJsonException: Use
>> JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12
>> at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
>> at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1386)
>> at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:531)
>> at com.google.gson.stream.JsonReader.peek(JsonReader.java:414)
>> at com.google.gson.Gson.assertFullConsumption(Gson.java:775)
>> ... 31 more
>>
>> Any ideas what is going on here?  I did have to comment out a property in
>> the spring configuration to get Alfresco to not complain about the indexer
>> AMP. That was in teh service-context.xml:
>>
>>   <bean id="indexingSqlSessionFactory" class=
>> "org.alfresco.ibatis.HierarchicalSqlSessionFactoryBean">
>>     <!-- <property name="useLocalCaches"
>> value="${mybatis.useLocalCaches}"/> -->
>>     <property name="resourceLoader" ref="dialectResourceLoader"/>
>>     <property name="dataSource" ref="dataSource"/>
>>     <property name="configLocation">
>>       <value>classpath:alfresco/ibatis/alfresco-indexing-SqlMapConfig.xml
>> </value>
>>     </property>
>>   </bean>
>> I had to comment out the useLocalCaches property in order to get the AMP
>> to load on Alfresco startup.
>>
>> Any/All replies appreciated,
>>
>> -- Marco
>>
>
>

Reply via email to