Alfresco Indexer plugin + Apache ManifoldCF integration issues.

cancel
Showing results for 
Search instead for 
Did you mean: 
ShashikanthC
Member II

Alfresco Indexer plugin + Apache ManifoldCF integration issues.

I'm trying to integrate Apache ManifoldCF into Alfresco, using Alfresco Indexer plugin from here. According to the docs in the repository, here are the steps I've followed to install alfresco-indexer-plugin and integrate apache manifoldcf:

1. Cloned Apache ManifoldCF from trunk (ManifoldCF), built it using ANT, MVN.
2. Cloned alfresco-indexer repo, built project using MVN, generate alfresco-indexer-webscripts amp, installed it onto local alfresco installtion using module-management-tool.
3. Copied alfresco-indexer-client jar from alfresco-indexer to apache manifoldcf's connector-libs dir.
4. Started alfresco, started manifoldcf, created a new repository connection in manifold webapp to using 'Alfresco Webscript' module.

This is where it's going south. ManifoldCF is unable to establish connection with Alfresco.

Connection Status: Threw exception: 'Alfresco connection check failed'

ManifoldCF logs:

ERROR 2020-02-10T12:19:43,930 (qtp892083096-412) - Missing resource 'Alfresco.HostnameMustNotBeEmpty' in bundle 'org.apache.manifoldcf.crawler.connectors.alfrescowebscript.common' for locale 'en_US'
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key Alfresco.HostnameMustNotBeEmpty
	at java.util.ResourceBundle.getObject(Unknown Source) ~[?:1.8.0_231]
	at java.util.ResourceBundle.getString(Unknown Source) ~[?:1.8.0_231]
	at org.apache.manifoldcf.core.i18n.Messages.getMessage(Messages.java:193) [mcf-core.jar:?]
	at org.apache.manifoldcf.core.i18n.Messages.getString(Messages.java:240) [mcf-core.jar:?]
	at org.apache.manifoldcf.core.i18n.Messages.getString(Messages.java:208) [mcf-core.jar:?]
	at org.apache.manifoldcf.ui.i18n.ResourceBundleWrapper.getString(ResourceBundleWrapper.java:44) [mcf-ui-core.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_231]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_231]
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) [velocity-1.7.jar:1.7]
	...
	at org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:159) [mcf-ui-core.jar:?]
	at org.apache.manifoldcf.crawler.connectors.alfrescowebscript.Messages.outputResourceWithVelocity(Messages.java:116) [mcf-alfresco-webscript-connector.jar:?]
	at org.apache.manifoldcf.crawler.connectors.alfrescowebscript.ConfigurationHandler.outputConfigurationHeader(ConfigurationHandler.java:121) [mcf-alfresco-webscript-connector.jar:?]
	at org.apache.manifoldcf.crawler.connectors.alfrescowebscript.AlfrescoConnector.outputConfigurationHeader(AlfrescoConnector.java:544) [mcf-alfresco-webscript-connector.jar:?]
	at org.apache.manifoldcf.core.interfaces.ConnectorFactory.outputThisConfigurationHeader(ConnectorFactory.java:71) [mcf-core.jar:?]
	at org.apache.manifoldcf.crawler.interfaces.RepositoryConnectorFactory.outputConfigurationHeader(RepositoryConnectorFactory.java:147) [mcf-pull-agent.jar:?]
	at org.apache.jsp.editconnection_jsp._jspService(editconnection_jsp.java:448) [jsp/:?]
	...
ERROR 2020-02-10T12:23:11,561 (qtp892083096-411) - Json response is missing username.
com.github.maoo.indexer.client.AlfrescoParseException: Json response is missing username.
	at com.github.maoo.indexer.client.WebScriptsAlfrescoClient.getUsername(WebScriptsAlfrescoClient.java:315) ~[alfresco-indexer-client.jar:?]
	at com.github.maoo.indexer.client.WebScriptsAlfrescoClient.getUser(WebScriptsAlfrescoClient.java:308) ~[alfresco-indexer-client.jar:?]
	at com.github.maoo.indexer.client.WebScriptsAlfrescoClient.userFromHttpEntity(WebScriptsAlfrescoClient.java:299) ~[alfresco-indexer-client.jar:?]
	at com.github.maoo.indexer.client.WebScriptsAlfrescoClient.fetchUserAuthorities(WebScriptsAlfrescoClient.java:362) ~[alfresco-indexer-client.jar:?]
	at org.apache.manifoldcf.crawler.connectors.alfrescowebscript.AlfrescoConnector.check(AlfrescoConnector.java:133) [mcf-alfresco-webscript-connector.jar:?]
	at org.apache.jsp.viewconnection_jsp._jspService(viewconnection_jsp.java:246) [jsp/:?]
	...

The user credentials being provided to ManifolfCF are alfresco's admin credentials (for testing purpose).
Connection details:

Protocol:http
Host name:127.0.0.1
Port:8080
Context:/alfresco/service
Store protocol:workspace
Store ID:SpacesStore
User name:alfresco
Password:********

 

There are also errors in Alfresco that arised when alfresco-indexer-webscritps amp module was installed.

I don't know if I'm doing anything wrong regarding build & deployment of jars or any other. Any help on solving this issue is highly appreciated. Thank you for looking into this.

2 Replies
ShashikanthC
Member II

Re: Alfresco Indexer plugin + Apache ManifoldCF integration issues.

There are also errors in Alfresco that arised when alfresco-indexer-webscritps amp module was installed:

Feb 10, 2020 12:08:07 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoSuchMethodError: org.apache.cxf.common.util.ClassHelper.getRealClass(Lorg/apache/cxf/Bus;Ljava/lang/Object;)Ljava/lang/Class;
        at org.apache.cxf.jaxws.EndpointImpl.getImplementorClass(EndpointImpl.java:215)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:399)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
        at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155)
        at javax.xml.ws.Endpoint.publish(Unknown Source)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.publish(CmisWebServicesServlet.java:335)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.loadBus(CmisWebServicesServlet.java:311)
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:77)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.init(CmisWebServicesServlet.java:114)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1269)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1182)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1072)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5368)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5660)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        ...

Feb 10, 2020 12:08:07 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [cmisws11] in web application [/alfresco] threw load() exception
java.lang.NoSuchMethodError: org.apache.cxf.common.util.ClassHelper.getRealClass(Lorg/apache/cxf/Bus;Ljava/lang/Object;)Ljava/lang/Class;
        at org.apache.cxf.jaxws.EndpointImpl.getImplementorClass(EndpointImpl.java:215)
        at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:399)
        at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
        at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
        at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155)
        at javax.xml.ws.Endpoint.publish(Unknown Source)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.publish(CmisWebServicesServlet.java:335)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.loadBus(CmisWebServicesServlet.java:311)
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:77)
        at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.init(CmisWebServicesServlet.java:114)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1269)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1182)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1072)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5368)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5660)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        ...

When installing the amp module, one of the jars in the local alfresco installtion was overriden by alfresco-indexer-webscripts amp, which I beleive is causing the "java.lang.NoSuchMethodError". But I'm not sure about it.

Alfresco version: Enterprise - 5.2.2 (r73ead3c7-b41)

EddieMay
Alfresco Employee

Re: Alfresco Indexer plugin + Apache ManifoldCF integration issues.

Hi @ShashikanthC,

The Alfresco Indexer plugin is not maintained by Alfresco ("Alfresco Indexer is an unsupported, community, experimental effort") and looks like it only supports Alfresco 5.0 - it will need updating & porting to support 5.2+. Perhaps you could raise an issue on the github project?

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!