Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Executor Based Remoting not working in 10.0.1?

I get a null pointer from the remote end no matter how I setup the pu.xml -

Exception in thread "main" java.lang.NullPointerException
    at org.openspaces.remoting.ExecutorRemotingTask.execute(ExecutorRemotingTask.java:94)
    at org.openspaces.remoting.ExecutorRemotingTask.execute(ExecutorRemotingTask.java:47)
    at org.openspaces.core.executor.internal.InternalSpaceTaskWrapper.execute(InternalSpaceTaskWrapper.java:64)
    at com.gigaspaces.internal.server.space.SpaceImpl.executeTask(SpaceImpl.java:2868)
    at com.gigaspaces.internal.server.space.operations.ExecuteTaskSpaceOperation.execute(ExecuteTaskSpaceOperation.java:24)
    at com.gigaspaces.internal.server.space.operations.ExecuteTaskSpaceOperation.execute(ExecuteTaskSpaceOperation.java:18)
    at com.gigaspaces.internal.server.space.operations.SpaceOperationsExecutor.executeOperation(SpaceOperationsExecutor.java:78)
    at com.gigaspaces.internal.server.space.SpaceImpl.executeOperation(SpaceImpl.java:1880)
    at com.gigaspaces.internal.server.space.SpaceImpl.executeOperationAsync(SpaceImpl.java:1887)
    at com.gigaspaces.internal.remoting.RemoteOperationsExecutorGigaspacesMethodinternalInvoke3.internalInvoke(Unknown Source)
    at com.gigaspaces.internal.reflection.fast.AbstractMethod.invoke(AbstractMethod.java:41)
    at com.gigaspaces.lrmi.LRMIRuntime.invoked(LRMIRuntime.java:464)
    at com.gigaspaces.lrmi.nio.Pivot.consumeAndHandleRequest(Pivot.java:571)
    at com.gigaspaces.lrmi.nio.Pivot.handleRequest(Pivot.java:663)
    at com.gigaspaces.lrmi.nio.Pivot$ChannelEntryTask.run(Pivot.java:196)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Seems to indicate that the task is not getting the spring app context set in it before being executed. Is this a known bug?

My pu.xml looks like this -

<os-core:embedded-space id="space" name="space" schema="persistent"
         space-data-source="hibernateSpaceDataSource"
         space-sync-endpoint="hibernateSpaceSynchronizationEndpoint">
...
</os-core:embedded-space>

<os-core:giga-space-context />
<os-core:distributed-tx-manager id="transactionManager" />
<os-core:giga-space id="localSpace" space="space" />

<bean id="remoteApiUserAccountService" class="com.api.UserAccountServiceXAPImpl" />

<bean id="serviceExporter" class="org.openspaces.remoting.SpaceRemotingServiceExporter">
        <property name="services">
            <list>
                <ref bean="remoteApiUserAccountService" />
            </list>
        </property>
</bean>

(I've tried annotation, namespace and plain XML - all appear ok with the remote service is listed in the UI)

My client then looks like -

UrlSpaceConfigurer configurer = new UrlSpaceConfigurer("jini://*/*/space");
GigaSpace gigaSpace = new GigaSpaceConfigurer(configurer).gigaSpace();

UserAccountDomainService proxy = new ExecutorRemotingProxyConfigurer<UserAccountDomainService>(gigaSpace, UserAccountDomainService.class).proxy();

proxy.findUserAccount("test", "test");

Which when run generates the exception (that comes from the PU end), to me this seems like a major bug, I can't see what I'm doing wrong.

asked 2015-03-23 06:48:59 -0600

andrewgp0 gravatar image
edit retag flag offensive close merge delete

Comments

is that the entire stack trace above?

jb gravatar imagejb ( 2015-03-23 09:00:46 -0600 )edit

Yes it's the full trace from the command line java client. The PU reports no errors even though it comes from there.

I'm 99% sure the error comes from code inside the PU in fact as I've seen it hit a breakpoint and the applicationContext inside ExecutorRemotingTask is not set, hence the null pointer returned back from the RMI call.

It's very odd! Sort of points to a problem in the PU, but the UI lists the remote service so it's there, just breaking on execution.

andrewgp0 gravatar imageandrewgp0 ( 2015-03-23 10:10:39 -0600 )edit

we've reproduce this and are investigating

jb gravatar imagejb ( 2015-03-23 11:36:44 -0600 )edit

Thanks jb, looks like it's a confirmed bug in this version.

andrewgp0 gravatar imageandrewgp0 ( 2015-03-23 11:56:39 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

Hi

You need to change the following:

<os-core:embedded-space id="space" name="mySpace"/>

to

<os-core:space id="space" url="/./mySpace"/>

This issue with 'os-core:embedded-space' is fixed in 10.0.2 and 10.1.0. You can get early access release candidates here:

http://docs.gigaspaces.com/early_acce...

Regards

John

answered 2015-03-23 11:49:43 -0600

jb gravatar image
edit flag offensive delete link more

Comments

Aha, thanks John, good to hear.

andrewgp0 gravatar imageandrewgp0 ( 2015-03-23 11:56:15 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-03-23 06:48:59 -0600

Seen: 437 times

Last updated: Mar 23 '15