Issue with Java Gateway and Java classes
Hi,
I've created an Object Gateway via the System Management Portal, and installed the following Java classes to allow connectivity between the IRIS server and RabbitMQ ...
RabbitMQ.jar
amqp-client-5.18.0.jar
slf4j-api-1.7.36.jar
slf4j-simple-1.7.36.jar
I've used the Java Gateway wizard via Studio and compiled the java classes that this would refer to, and a quick test worked on Day 1. However, on Day 2, on trying to connect, I got this error :
<ZJGTW>%ProcessErrorNew+11^%Net.Remote.Proxy.1
However, if I go back into the Java Gateway wizard in Studio, and 're-create' the classes
.png)
It works, even though IRIS tells me that I haven't created any new classes. I'm tempted to say that the issue is caused by IRIS starting up the next day and something is lost during the re-start but I have no idea what. Has anyone seen this before ? Any help appreciated !
Cheers
And
Comments
Did you start the Java Gateway?
Yes, sorry, should have mentioned that one !
Difficult to tell with the little info given.
Can you please provide some more detail, ideally the code you use when you say "on trying to connect"?
Did you include the classpath?
Yes, all the files exist in the sub-directories in the wizard :
.png)
.png)
Along with the other two files in the additional classpath section. The Java Gateway had been started before this, and the first time round it compiled over 100 classes. If I do this again, it says that nothing has changed, but the Java Gateway now works. Make sense ?
Did you add the classpath to the java gateway definition (not the import wizard) or added before you connect to the java gw?
Bearing in mind this is on a hp-ux system :.png)
That's how it set up in our UAT environment except UAT doesn't have an issue, it's only Live.
As you did in the wizard, you need to add/specify the classpath to "your" jars, this can be done in the java gw definition (and seems you didn't) or in your code when you connect to the java gw.
The fact that it works after using the wizard (that add the javapath) suggest this may be the issue.
Thanks - if I put the classpath into the Gateway definition, it fails; however, the code that is making the connection and trying to access those jar files belongs to a vendor and it's compiled. I'll feed this back to them but thanks for taking a look.
Did you specified in the classpath the path to ALL required (IRIS and yours) jars?
Multiple path are separated by semicolon, looking at your post, in your case should be something like:
/usr/iris/dev/java/lib/JDK18/;<something>/tomcat/webapps/GAPP/WEB-INF/lib/notificationEngine/slf4j-simple-1.7.36.jar
Yeah, did all that as well :)