incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evangelos Vlachogiannis <evl...@aegean.gr>
Subject simple search portlet
Date Fri, 20 Oct 2006 13:43:52 GMT
Hi,

working on a simple search portlet I noticed that currently even if 
search index service is implemented I cant see it being used when a 
document is added or removed so that docs are not indexed. (pls correct 
me if i am wrong).

If I am not wrong I need to pass ContentIndexServiceImpl as a 
constructor arg to DocumentModelServiceImpl so that I can 
persistenceService.insert(document); remove and update. Correct?

So what I have done (no exp with spring frame:() is add an 
ContentIndexServiceImpl bean in graffito xml and define it as 
constructor arg to both graffito.xml and DocumentModelServiceImpl class. 
See bellow my addition/modif to xml. But when I deploy to j2 kai run 
tomcat I get an exception (see below) on startup. Any ideas what I miss 
here please?

regards,
Vangelis

graffito.xml================================================

	<!-- Document Model Service -->
	<bean 
id="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl"
	 
class="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" 
 >
		<constructor-arg >
			<ref 
bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
		</constructor-arg>
		<constructor-arg >
			<ref 
bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"/>
		</constructor-arg>
		<constructor-arg >
			<ref 
bean="org.apache.portals.graffito.services.search.impl.ContentIndexServiceImpl"/>
		</constructor-arg>		
	</bean>
	<!-- ContentIndexService Service -->
	<bean 
id="org.apache.portals.graffito.services.search.impl.ContentIndexServiceImpl" 

	 
class="org.apache.portals.graffito.services.search.impl.ContentIndexServiceImpl">
		<constructor-arg >
			<ref 
bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
		</constructor-arg>
		<constructor-arg >
			<value>java.lang.String</value>
		</constructor-arg>
	</bean>	



exception =================================


org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating
  bean with name 
'org.apache.portals.graffito.services.dm.impl.DocumentModelServi
ceImpl' defined in ServletContext resource 
[/WEB-INF/assembly/graffito.xml]: Uns
atisfied dependency expressed through constructor argument with index 2 
of type
[org.apache.portals.graffito.services.search.ContentIndexService]: Did 
you speci
fy the correct bean references as generic constructor arguments?
         at 
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createArgumentArray(AbstractAutowireCapableBeanFactory.java:629)
         at 
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:502)

Mime
View raw message