Null Pointer exception for service invocation from web client in Wildfly

Hi Everyone,

I am deploying my application in two separate war(app, app-core) files.
I am trying to invoke a service from Web UI , i am getting Null pointer exception
Below is my error:

 Caused by: org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [rioc_SubmissionService]; nested exception is java.lang.NullPointerException
java.lang.NullPointerException
	at com.haulmont.cuba.core.sys.remoting.ClusteredHttpInvokerRequestExecutor.doExecuteRequest(ClusteredHttpInvokerRequestExecutor.java:67)
	at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:140)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:206)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:188)
	at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:154)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy217.CallConnectApi(Unknown Source)

I am using Global Events add on in my application.

The same application is working if i use tomcat in Studio.
Could you please help me in resolving the issue.

Hi,

Please ensure that your web-spring.xml has serverSelector property in proxyCreator:

<bean id="demo_proxyCreator" class="com.haulmont.cuba.web.sys.remoting.WebRemoteProxyBeanCreator">
    <property name="serverSelector" ref="cuba_ServerSelector"/>
    <property name="remoteServices">
        <map>
            <entry key="demo_NewService" value="com.company.demo.service.NewService"/>
        </map>
    </property>
</bean>

Recently, we had an issue in Studio that affects this declaration.

Thanks. This solved the issue