RemoteService Proxy creation error
Hi,
I've run into a problem following the guide here: http://docs.gigaspaces.com/xap101/executor-based-remoting.html
I can export my RemoteService fine using the specified configuration, my problem occurs when trying to create the service proxy object in a separate client PU. I follow the namespace config defined here in my PU.xml: http://docs.gigaspaces.com/xap101/executor-based-remoting.html#using-the-service-on-the-client-side
I can see that this is due to not having an exporter defined in the local context, but I thought the Exporter is only required on the Server side when deploying the Space + RemoteService implementation?
I receive the following stacktrace:
2015-08-28 11:29:06,857 GSC INFO [com.gigaspaces.grid.gsc] - Instantiating clientPU [1]
2015-08-28 11:29:11,933 clientPU [1] INFO [com.sun.jini.mahalo.startup] - Started Mahalo (duration=0.036): com.sun.jini.mahalo.TransientMahaloImpl@72e0454c
2015-08-28 11:29:12,199 GSC SEVERE [com.gigaspaces.grid.gsc] - Failed to instantiate clientPU [1]; Caused by: org.jini.rio.core.JSBInstantiationException: java.lang.IllegalArgumentException: No service exporters are defined within the context, can't register remote service bean [myRemoteServiceImpl]
at org.openspaces.remoting.RemotingAnnotationBeanPostProcessor.postProcessAfterInitialization(RemotingAnnotationBeanPostProcessor.java:90)
My SpacePU xml:
<!-- Support @RemotingService component scanning -->
<context:component-scan base-package="com.mycompany.api.remote"/>
<!-- Support the @RemotingService annotation on a service-->
<os-remoting:annotation-support />
<!-- A bean representing a space (an IJSpace implementation). -->
<os-core:space id="mySpace" url="/./mySpace" />
<os-remoting:service-exporter id="serviceExporter" />
My ClientPU xml:
<!-- Defines a distributed Jini transaction manager. -->
<os-core:distributed-tx-manager id="myTxManager" default-timeout="15" >
<os-core:renew pool-size="1" duration="1000" round-trip-time="500" />
</os-core:distributed-tx-manager>
<!-- Creates an OpenSpaces proxy for the specified url. This is versioned for optimistic locking. -->
<os-core:space id="mySpace" url="${url}" versioned="true"/>
<!-- Creates a GigaSpaces proxy -->
<os-core:giga-space id="myGigaSpace" space="mySpace" tx-manager="myTxManager" />
<!-- Construct a local proxy of the deployed @RemoteService -->
<os-remoting:executor-proxy id="remoteService" giga-space="myGigaSpace"
interface="com.myCompany.api.remote.MyRemoteService" >
</os-remoting:executor-proxy>
<!-- Set the API's reference to the @RemoteService -->
<bean id="remoteServiceWrapper" class="com.myCompany.api.remote.RemoteServiceReference">
<property name="myRemoteService" ref="remoteService" />
</bean>