.client.gateway_interface.GatewayException: null

I have a jython script that makes a call to a routine in my tagprovider module. I am getting the below exception.

Traceback (most recent call last):
File “event:actionPerformed”, line 1, in
File “module:tagmgmt”, line 184, in applyValuesToTagDefTable
File “module:tagmgmt”, line 184, in applyValuesToTagDefTable
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:312)

at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:286)

at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:243)

at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.moduleInvoke(GatewayInterface.java:761)

at com.bloomenergy.hmi.client.BEModuleRPCProxy.invoke(BEModuleRPCProxy.java:24)

at com.bloomenergy.hmi.client.BEModuleRPCProxy.loadTagdef(BEModuleRPCProxy.java:33)

at com.bloomenergy.hmi.client.BEModuleRPCProxy.loadTagdef(BEModuleRPCProxy.java:28)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: null

Can I have a definition as to what is null.

protected Object invoke(String name, Serializable… params) throws Exception {
m_logger.info(String.format(“found %s on gateawy”, name));
return GatewayConnectionManager.getInstance().getGatewayInterface().moduleInvoke(ModuleMeta.MODULE_ID, name, params);
}

public String loadTagdef() throws Exception {
return (String) invoke(loadTagdef(m_provider).toString(), new Serializable[] {m_provider});
}

@Override
public String loadTagdef(String provider) throws Exception {
    return (String) invoke("loadTagdef", new Serializable[]{provider});
}

that’s the code that is getting called from the jython script.

This seems to be an exception on the client/designer, or am I missing something? Would you have the logs from the Gateway, they might provides more information?

This is against ignition 7.5.2 just an fyi. In any case there is no message that is displayed or thrown in the wrapper.log when this occurs. In looking at the gcu.log, it’s empty. I"m not sure of any other log besides the logs.bin which doesn’t update when the issue occurs either. Please advise if there are other logs to evaluate.

That’s the only thing in the log file around the time of the exception.
INFO | jvm 2 | 2013/09/18 18:32:40 | INFO [Projects$ProjectChangeMonitor ] [18:32:40,547]: Starting up client project monitor. project=Catalina_HMI, uuid=cd7c2efa-be33-d9f6-78b9-710d190c087b, editCount=1730, scope=4, version=Published
INFO | jvm 2 | 2013/09/18 18:32:43 | INFO [BETagProvider ] [18:32:43,465]: BETagProvider released scanclasses of [storm01/ccu/0/cimio.hispeed, storm01/pwm/5/parameters, storm01/pwm/1/parameters, storm01/pwm/4/parameters, storm01/pwm/3/parameters, storm01/pwm/2/parameters, storm01/pwm/6/parameters]

It looks like you’re receiving an error response for your RPC call, but the error message of that response is null.

Can you verify that the function you’re trying to call to on the gateway is getting called?

I’ve added a few log lines but I’m not seeing them get printed in the wrapper log our output window of the designer anywhere.
Now I’m getting this error: Update Tags error ‘com.inductiveautomation.ignition.common.script.Scr’ object has no attribute ‘loadClientTags’

I’m calling a routine from our custom tag provider as such:
def updateIgnitionTagProvider():
try:
import betagprovider
result = betagprovider.loadClientTags()
print result
except Exception, e:
print “Update Tags error” , e
#system.db.rollbackTransaction(txId)
pass
Below is my RPC interface, implementation, and proxy

Interface:
package com.bloomenergy.hmi.common;

public interface IBEModuleRPC {

void loadClientTags()throws Exception;

}

Proxy:
package com.bloomenergy.hmi.client;

import java.io.Serializable;

import com.bloomenergy.hmi.common.IBEModuleRPC;
import com.bloomenergy.hmi.common.ModuleMeta;
import com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

public class BEModuleRPCProxy implements IBEModuleRPC {

String m_provider;
Logger m_logger;

public BEModuleRPCProxy(String provider) {
    m_logger.info(String.format("found %s on gateawy", provider));
    m_provider = provider;
    m_logger = LogManager.getLogger(this.getClass());
}

protected Object invoke(String name, Serializable... params) throws Exception {
    m_logger.info(String.format("Running % on gateway", name));
    return GatewayConnectionManager.getInstance().getGatewayInterface().moduleInvoke(ModuleMeta.MODULE_ID, name, params);
}

public void loadClientTags() throws Exception {
    m_logger.info("Loading client tags");
    invoke("loadClientTags");
}

}
Implementation:
package com.bloomenergy.hmi.gateway.common;

import java.util.HashMap;
import java.util.Map;
import com.bloomenergy.hmi.common.IBEModuleRPC;
import com.bloomenergy.hmi.gateway.provider.BETagProvider;
import com.inductiveautomation.ignition.gateway.model.GatewayContext;
import com.inductiveautomation.ignition.gateway.datasource.DatasourceManager;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

public class BEModuleRPCImpl implements IBEModuleRPC {

public static BEModuleRPCImpl m_singleton;
static Map<String, IBEModuleRPC> m_impls;
static Logger m_logger;
GatewayContext m_context;

public BEModuleRPCImpl() {
    m_impls = new HashMap<String, IBEModuleRPC>();
    m_logger = LogManager.getLogger(this.getClass());
}

public static BEModuleRPCImpl getInstance() {
    if (m_singleton != null) {
        return m_singleton;
    }
    synchronized (BEModuleRPCImpl.class) {
        if (m_singleton == null) {
            m_singleton = new BEModuleRPCImpl();
        }
    }
    return m_singleton;
}

public static void register(String provider, IBEModuleRPC impl) {
    m_logger.info(String.format("%s has been registered", provider.toLowerCase()));
    m_impls.put(provider.toLowerCase(), impl);
}

public IBEModuleRPC unregister(String provider) {
    m_logger.info(String.format("%s has been unregistered", provider.toLowerCase()));
    return m_impls.remove(provider.toLowerCase());
}


public void loadClientTags() throws Exception {
    BETagClient clientLoadTags = BETagProvider.getTagCLient();
    DatasourceManager dsMgr = m_context.getDatasourceManager();
   m_logger.info("Running client load tags procedure...this may take a minute");
    if (clientLoadTags == null) {
        m_logger.info("Tag Client is null and cannot load client tags");
    } else {
        clientLoadTags.loadTags(dsMgr, m_context.getDatasourceManager().getDatasources().get(0).toString());
        m_logger.info("Load client tags completed successfully");
    }
}

}
and ModuleHook:

@Override
public Object getRPCHandler(ClientReqSession session, Long projectId) {
    return new BEModuleRPCImpl();
}

}

This is all setup according to programmers guide. Please advise if I’m missing something in the structure of the RPC layer.