cancel
Showing results for 
Search instead for 
Did you mean: 

custom Indexer

dude666
Champ in-the-making
Champ in-the-making
Hello,

My company wish to add his own search engine which is based on lucene for the indexing of the documents.
This search engine is locating in a remote server. consequently, when we make a research, whe call the search engine with a webService.
But, when a document is adding in alfresco, it must be added to the lucene database of the remote seatch engine thanks to a webService. So, when something is indexing by alfresco's lucene database, whe must call this webService to index it in our lucene database.

my question is,

where should look at us in the alfresco code in order to call this webService automaticall?
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise

dude666
Champ in-the-making
Champ in-the-making
ok, I create my IndexAndSeacrherFactory and my indexer and searcher.

I can build and deploy alfresco with this modificaiont whithout ptoblem.

but, when I try to login, I get this error :


javax.faces.FacesException: Error calling action method of component with id loginForm:submit at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) at javax.faces.component.UICommand.broadcast(UICommand.java:106) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:105) at org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServlet.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{LoginBean.login} at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) … 24 more Caused by: java.lang.NullPointerException at org.alfresco.repo.domain.NodeKey.(NodeKey.java:44) at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getNodeStatus(HibernateNodeDaoServiceImpl.java:189) at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getNode(HibernateNodeDaoServiceImpl.java:279) at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy1.getNode(Unknown Source) at org.alfresco.repo.node.db.DbNodeServiceImpl.exists(DbNodeServiceImpl.java:130) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:213) at $Proxy2.exists(Unknown Source) at org.alfresco.repo.security.authentication.RepositoryAuthenticationDao.getUserOrNull(RepositoryAuthenticationDao.java:141) at org.alfresco.repo.security.authentication.RepositoryAuthenticationDao.loadUserByUsername(RepositoryAuthenticationDao.java:104) at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.getUserFromBackend(DaoAuthenticationProvider.java:390) at net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider.authenticate(DaoAuthenticationProvider.java:225) at net.sf.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:159) at net.sf.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49) at org.alfresco.repo.security.authentication.AuthenticationComponentImpl.authenticate(AuthenticationComponentImpl.java:63) at org.alfresco.repo.security.authentication.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy21.authenticate(Unknown Source) at org.alfresco.web.bean.LoginBean.login(LoginBean.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129) … 25 more‍

If I use the original IndexAndSearcherFactory, it's work fine.
I only create a new package and modify core-service-context.xml. so, I do not unserstand why this modification prevent the login action.

Thank you for your help