first of all I would like to say that I'm newbie to Virgo and OSGi so please be patient ;)
Here's my problem: I'm playing with the "greenpages" lastes version (http://www.eclipse.org/virgo/documentation/greenpages-documentation-2.4.0.RELEASE/docs/htmlsingle/greenpages-guide.html) sample project and I would like to change object passing form jpa subproject project to web subproject. My change look like this:
<osgi:service ref="directory" interface="greenpages.jpa.JpaDirectory"/>
instead of
<osgi:service ref="directory" interface="greenpages.Directory"/>
and in web project context :
<osgi:reference id="directory" interface="greenpages.jpa.JpaDirectory" />
where Directory is an interface and JpaDirecotry is implementation, so in my web conroller I would like to have something like this:
@Controller
public class GreenPagesController {
@Autowired
private JpaDirectory directory;
....
}
I was forced to change JpaDirectory class accessor from default to "public". But I still receive error:
[2013-03-10 13:51:59.047] ERROR start-signalling-11 org.springframework.web.context.ContextLoader Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'directory': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class[]' for property 'interfaces'; nested exception is java.lang.IllegalArgumentException: Cannot find class [greenpages.jpa.JpaDirectory]
and have no idea how to handle it. Maybe someone can advice me what to do with it.