Hi, 



I forgot to mention that for testing the fetchUserAuthorities request you must 
provide basic authentication. You can easily do that with curl for example 
(--user name:password) 





Cheers, 

Rafa

On Wed, Sep 30, 2015 at 7:12 PM, Rafa Haro <[email protected]> wrote:

> Hi all,
> For checking the Alfresco connectivity, the connector is not using the 
> fetchNode service, it is using the fetchUserAuthorities service for the user 
> admin. So the URL you should check against your Alfresco instance is 
> http://localhost:8080/alfresco/service/auth/resolve/admin. Can you check this 
> one and post here the result?
> Thanks!
> On Wed, Sep 30, 2015 at 6:54 PM, Manifold User <[email protected]>
> wrote:
>> Oh, I also forgot to mention that there is no errors appearing in the
>> alfresco.log or the tomcat catalina.out file when the request is made.
>> Can I get the expected JSON response using the browser to validate it?
>> What would the URL be?
>> Best Regards,
>> On Wed, Sep 30, 2015 at 12:49 PM, Manifold User <[email protected]>
>> wrote:
>>> Thanks Maurizio / all for the reply. Invoking the URL:
>>>
>>> http://localhost:8080/alfresco/service/node/changes/workspace/SpacesStore
>>>
>>> produces:
>>>
>>> {
>>>   "totalNodes" : "0",
>>>   "elapsedTime" : "49",
>>>   "docs" : [
>>>   ],
>>>     "last_txn_id" : "10",
>>>     "last_acl_changeset_id" : "10",
>>>   "store_id" : "SpacesStore",
>>>   "store_protocol" : "workspace"
>>> }
>>>
>>> So I believe the indexer is working correctly. I am using indexer
>>> 0.7.2-SNAPSHOT. Maybe I should try 0.7.1?
>>>
>>> I have downloaded the war for the indexer, but have not set it up yet. I
>>> will also take a look at the CONNECTOR-1200 issue mentioned.
>>>
>>>
>>> On Wed, Sep 30, 2015 at 12:37 PM, Maurizio Pillitu <[email protected]>
>>> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> the issue mentioned is
>>>> https://issues.apache.org/jira/browse/CONNECTORS-1200 ; not sure if that
>>>> is the same issue; back then, I was able to make the plugin working as
>>>> expected (and couldn't reproduce the issue)
>>>>
>>>> @Marco, could you please review the steps I mention in the issue and let
>>>> me know if you can still reproduce your error?
>>>>
>>>> You can also try to manually invoke the Webscripts provided by
>>>> alfresco-indexer, simply calling
>>>> http://localhost:8080/alfresco/service/node/changes/workspace/SpacesStore ;
>>>> regardless of Manifold configuration, this URL should just work.
>>>>
>>>> Re. the missing Spring property, did you reproduce the issue using
>>>> alfresco-indexer-war 0.7.1 ? Or is it something related with Alfresco 5.0.1
>>>> ?
>>>>
>>>> FTR, alfresco-indexer-war ships Alfresco 5.0.a version -
>>>> https://github.com/maoo/alfresco-indexer/blob/master/pom.xml#L28 ; there
>>>> could be issues related with 5.0.0 and 5.0.1/2 versions (I haven't tested
>>>> on those versions)
>>>>
>>>> Hope this helps,
>>>>   mao
>>>>
>>>>
>>>> On Wed, Sep 30, 2015 at 5:24 PM Delapasse, Deanna <
>>>> [email protected]> wrote:
>>>>
>>>>> 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