# RPCHandler Setup: Missing Delimiter

**URL:** <https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433>\
**Category:** 3rd Party Modules\
**Created:** [December 11, 2014, 7:23pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433 "2014-12-11T19:23:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssmith](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@ssmith](https://forum.inductiveautomation.com/u/ssmith)\
**Post date:** [December 11, 2014, 7:23pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/1 "2014-12-11T19:23:47Z")

</div>

I have setup an RPCHandler more or less like the one prescribed in the Ignition Programmer’s Guide. However, I’ve run into an issue.

I’ve called my function like this:

`String csv = null;
ModuleRPC test = ModuleRPCFactory.create("alarmbenchmark", ModuleRPC.class);
csv = test.helloWorld();
`

When I use it in this way, I receive an error (I can post the full stack-trace if needed):

`[Fatal Error] :3:11: The end-tag for element type "Response" must end with a '>' delimiter.
…
Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway
`

And my RPCHandler in the Gateway Scope is defined like this:

```auto
public class RPCHandler implements ModuleRPC {
       
       private GatewayContext context;
       
       
       public RPCHandler(GatewayContext context){
              this.context = context;
       }
       
       
       public String helloWorld(){
              return "Hello World!";
              
       }
}
```

And my ModuleRPC in the common package is like this:

```auto
public interface ModuleRPC {
       String helloWorld();
}
```

And lastly the Gateway Hook:

`public Object getRPCHandler(ClientReqSession session, Long projectId) {
       return new RPCHandler(context);
}
`

How can I resolve this error?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2014, 7:34pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/2 "2014-12-11T19:34:24Z")

</div>

Is there an error in the gateway console/logs when this occurs?

---

<div class="post-metadata">

**Author:** ![ssmith](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@ssmith](https://forum.inductiveautomation.com/u/ssmith)\
**Post date:** [December 11, 2014, 7:45pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/3 "2014-12-11T19:45:02Z")

</div>

Yes, it shows up in the logs. I’ve attached the relevant part of the log because it’s quite long and it’s probably easier to read in a text editor.  
[missingdelimiter.txt](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/72b9392f788b0799684e2f6143d93df7ef6404d8.txt) (9.34 KB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2014, 7:47pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/4 "2014-12-11T19:47:45Z")

</div>

Ok, the important pieces are these:

```auto
java.lang.ClassNotFoundException: com.konnection.utils.ModuleRPC
java.lang.NoClassDefFoundError: com/alarmbenchmark/gateway/RPCHandler
```

What does your module XML look like? How is your project structured? What jars and hook classes are you loading into which scopes?

---

<div class="post-metadata">

**Author:** ![ssmith](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@ssmith](https://forum.inductiveautomation.com/u/ssmith)\
**Post date:** [December 11, 2014, 8:18pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/5 "2014-12-11T20:18:40Z")

</div>

[code]\<?xml version="1.0" encoding="UTF-8"?\>  
  
alarmbenchmark  
Alarm Benchmark Module  
 blank  
license.html  
index.html  
1.6.0.623  
7.6.0  
5

```
<!-- Add the dependencies for each scope -->
<depends scope="D">fpmi</depends>

<!-- Load in our jars for each scope -->
<jar scope="D">alarmbenchmark-designer.jar.pack.gz</jar>
<jar scope="CD">alarmbenchmark-KasaUtils.jar.pack.gz</jar>
<jar scope="CD">alarmbenchmark-client.jar.pack.gz</jar>
<jar scope="G">alarmbenchmark-gateway.jar</jar>

<!-- Tell the Gateway and/or Designer where to find the hooks -->
<hook scope="D">com.alarmbenchmark.AlarmBenchmarkDesignerHook</hook>
<hook scope="G">com.alarmbenchmark.gateway.GatewayHook</hook>

```

[/code]

I see that the jar scope on KasaUtils is “CD” and I tried to change this to “CDG” however it doesn’t seem to have any effect and I still get the same error.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2014, 8:49pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/6 "2014-12-11T20:49:25Z")

</div>

It doesn’t look like you have a common project, which would be a project whose jar is scoped both CD and G and would be the one that contains the RPC interface.

---

<div class="post-metadata">

**Author:** ![ssmith](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@ssmith](https://forum.inductiveautomation.com/u/ssmith)\
**Post date:** [December 11, 2014, 10:41pm UTC](https://forum.inductiveautomation.com/t/rpchandler-setup-missing-delimiter/9433/7 "2014-12-11T22:41:15Z")

</div>

Thanks, you are correct. I used the skeleton project creator to create a new workspace with a common project inside of it and then I compared the ant build files and module.xml and made changes to my existing workspace to re-purpose KasaUtils as the common project.
