OK, I built a very simple workspace. It has a single web project, which in turn has a single interface and service. The service accepts a parameter and either attempts to call an RPG program or it just returns a hardcoded value. This is actually the model I use for all of my business logic, so that I can test without the IBM i. The point here is that I can test the project without any RUI code whatsoever, which is another architectural goal. I use Web Services Explorer to test the service, and it works fine as long as I don't try to call the RPG program. I tried adding a Linkage Part and also a Native Service Binding, and neither seems to work. No matter what I try, the generated Java code for the service still has this:
// Call "TEST1"(TEST1Parm);
ezeProgram._runUnit().getCallers().localCall( "TEST1",
I would expect to see something about java400 that would look like more like this:
ezeProgram._runUnit().getCallers().java400( ezeProgram ).call( "TEST1",
So clearly I haven't properly set up my configuration. I'm attaching an export file for the project. It's not much!
Original Message:
Sent: Mon April 10, 2023 05:06 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
I'll try to do that tonight, Dev. I will make a really simple workspace with only a web project. In that project, I'll create a service, and that service will call attempt to call an RPG program using the standard EGL "call" syntax. I'll add the LinkagePart and the Native Binding and see if either of those work. I'll then send you the workspace.
------------------------------
Joe Pluta
Original Message:
Sent: Mon April 10, 2023 11:45 AM
From: Dev Banerjee
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
Can you export your projects to a zip file and attach here. The scenario seems simple enough so that we could try to recreate ourselves.
Thanks
------------------------------
Dev Banerjee
RBD Development
Original Message:
Sent: Sun April 09, 2023 10:35 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Hi Dev! It's been a long time since I did this, and when I was writing EGL code my RUI project was always separate from the web project that called the ILE code on the IBM i. And that's how the RUI tutorial I have works. It calls a service like this:
helloService HelloService {@bindService};
call helloservice.SayHello(Fnamesr, Lnamesr, citysr)
returning to Service_output
onException servicelib.serviceExceptionHandler;
This works today. What fails is when in my EGL web service, I add code to try to call the ILE program like this:
SysLib.setRemoteUser("MYUSER", "MYPWD");
call "TEST1" (Test1Parm) { LinkageKey = "TEST1", IsExternal = YES };
It's seems to me that you're saying that I can call the ILE program (this is a native RPG program) directly from my RUI application. How would I do that? Do I set up a linkage part in the RUI and execute the call instruction? Because I don't see how the RUI application can directly invoke the ILE program, since it's just running Javascript in the browser. It has to go to the application on the web server, which in turns invokes the JT400 routines.
------------------------------
Joe Pluta
Original Message:
Sent: Sun April 09, 2023 09:42 PM
From: Dev Banerjee
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
I am assuming you are calling a service that is deployed on Tomcat, from a RUI client, and that service calls an ILE program using jt400.
If so, can first call the ILE program directly from RUI, to make sure there is no configuration issue on the iSeries.
What kind of ILE program are you calling? Something generated from EGL or a natively written program?
Thanks
------------------------------
Dev Banerjee
RBD Development
Original Message:
Sent: Sun April 09, 2023 01:25 AM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Okay, Dev, I give up for now. I've tried everything to get a call to ILE to work, but I have not been unsuccessful. Every time my service attempts to call the ILE program (TEST1), I get this error:
Apr 9, 2023, 12:18:15 AM.0 EGL1621E:EGL1621E An error occurred while trying to invoke function:sayHello on WebService:http://localhost:8080/EGLServer/services/HelloService.
EGL0001I The error occurred in EGL Rich UI Proxy.
detail1:500
detail2:FAILED
detail3:java.rmi.RemoteException: EGL0150E An error occurred calling the TEST1 program. Error: EGL0006E An error occurred while creating an object of the services.TEST1 type. The following error occurred: java.lang.ClassNotFoundException: services.TEST1.
EGL0001I The error occurred in HelloService_Impl.
I use this call:
Call "TEST1"(Test1Parm) {isExternal = yes, linkageKey = TEST1};
I have tried many times with different call syntax, including no options at all. My LinkagePart looks good:

As far as I can guess, the error is from this generated code:
// Call "TEST1"(Test1Parm) {isExternal = yes, linkageKey = TEST1};
ezeProgram._runUnit().getCallers().localCall( "TEST1",
new com.ibm.javart.JavartSerializable[] {
Test1Parm
},
null, "services", ezeProgram );
No matter what I do, the service generates a call to localCall, which I believe is what is causing the error, but that's just a wild guess on my part. Any help at this point would be appreciated.
------------------------------
Joe Pluta
Original Message:
Sent: Fri April 07, 2023 07:19 PM
From: Dev Banerjee
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
jt400.jar still works, and we can still pass EGL records (as well as arrays, strings, and other datatypes) as parameters to the remote EGL called program using the catcher mechanism. Let us know if you run into any issues there.
------------------------------
Dev Banerjee
RBD Development
Original Message:
Sent: Wed April 05, 2023 01:54 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Hi Bernd! Actually, back when I did this 10 years ago the iSeries linkage part allowed direct calls to ILE programs, and hopefully it works the same way for the IBM i. If so, it uses the JT400 JAR and it's very good about passing Record parts directly as data structures.
------------------------------
Joe Pluta
Original Message:
Sent: Tue April 04, 2023 06:48 PM
From: Bernd van Oostrum
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
I guess you want to call CICS-modules?
You'll need to dive into CICS Transaction Gateway (configure TCPIP on iSeries + install and configure the product on windows), and use linkage options in the builddescripter.
First steps will be hard but once it is done it works great.
Regards,
Bernd
ASIST
------------------------------
Bernd van Oostrum
Leuven
32478808505
Original Message:
Sent: Tue April 04, 2023 04:26 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Hi Bernd! As it turns out, the default port for Tomcat is 8080, and once I configured that it worked properly. I also worked with several folks from HCL who walked me through the problem with my JAR files (it turns out that RBD expects a specific version of the logging JAR file and I just had to add that to my Tomcat installation). So right now I'm happily creating RUI handlers that talk to a service. The next step will be to get that service to call a program on the IBM i.
------------------------------
Joe Pluta
Original Message:
Sent: Mon April 03, 2023 06:49 PM
From: Bernd van Oostrum
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
Glad to read you made some progress.
I guess that the service is not deployed correctly. Can you start a browser and open http://localhost:9080/EGLServer/services/HelloService
You should see "hello I'm a service".
I don't think this is a firewall-issue.
Best regards,
Bernd
ASIST
------------------------------
Bernd van Oostrum
Leuven
32478808505
Original Message:
Sent: Mon April 03, 2023 06:24 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Thank you, Kushagra! And thank you for all the help this morning. I wanted to post here the same thing I sent to you as an email, that after putting the correct JAR files into my Tomcat environment that everything is now working right up until I try to use the service. The RUI handler works correctly, but the call to the EGL service fails with a Java connection error. This may be a firewall issue, but I don't know how to check. Perhaps someone on the thread can help. I will reach out to my operations team as well; our laptop firewalls are under corporate administration.
Apr 3, 2023, 5:23:18 PM.1 EGL1621E:EGL1621E An error occurred while trying to invoke function:sayHello on WebService:http://localhost:9080/EGLServer/services/HelloService.
EGL0001I The error occurred in EGL Rich UI Proxy.
detail1:500
detail2:FAILED
detail3:java.net.ConnectException: Connection refused: connect
------------------------------
Joe Pluta
Original Message:
Sent: Fri March 31, 2023 07:39 AM
From: Kushagra Goyal
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
May I request you to raise a support ticket and send us their workspace directory and Tomcat directory for further investigation.
Thanks,
Kushagra Goyal
Development Manager, RBD
------------------------------
Kushagra Goyal
Original Message:
Sent: Wed March 08, 2023 09:28 PM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Hi Bernd! Thanks for your input. It's been a really difficult week so I haven't gotten much done. But let me see if I have some basic assumptions correct. First, I assume that the base folder for the Tomcat test server under RBD is down in my workspace. Specifically, it's in the .metadata/.plugins/org.eclipse.wst.server.core folder, in a subfolder named tmp0 (or tmp1, or tmp2, etc.). There is one tmpN folder for each server. Under my tmp0 folder, I have conf and logs just like I would expect in any normal Tomcat configuration. Interestingly, there is no lib folder at that level. Then, where I would expect to see a webapps folder with a folder for my MyService application, I instead see an empty webapps folder and a folder named wtpwebapps, which contains the MyService folder. I assume that wtpwebapps is just some sort of naming convention that IBM uses for the deployed applications.
Given those assumptions, that tells me I should find my libs under MyService/WEB-INF/lib, and I do. However, when RBD starts Tomcat, I get the noClassDefFound error. I did try copying lib from WEB-INF to the tmp0 folder, but that didn't work either. I even tried copying the apache logging jar to my base Tomcat installation's lib folder, but that didn't help.
So the question is, given my very simple workspace and project setup, how do I configure the MyService project to find its own jar files? It doesn't seem to want to load them from its WEB-INF/lib folder. I assume that some files under tmp0 tell my RBD Tomcat server how to load its applications, but I am out of ideas.
------------------------------
Joe Pluta
Original Message:
Sent: Fri March 03, 2023 03:21 AM
From: Bernd van Oostrum
Subject: Beginning EGL Project Development - Tomcat 8
Hi Joe,
Where did you put your apache-commons jarfile?
Put it in your server's lib-folder and restart to see if that helps.
Best regards,
Bernd
ASIST.
------------------------------
Bernd van Oostrum
Leuven
32478808505
Original Message:
Sent: Wed February 22, 2023 12:29 AM
From: Joe Pluta
Subject: Beginning EGL Project Development - Tomcat 8
Okay, this is my last question for the night. It's late. :) I couldn't seem to get Liberty up and running so I dropped back to my old faithful Tomcat. RBD allowed me to configure a runtime environment for Tomcat 8 with EGL Debugging, so I went for that. That created a Tomcat instance and then, with a little sleuthing, I was able to get the standard Tomcat management applications working, so I know that Tomcat is deployed correctly. However, as soon as I add my simple EGL web service project to Tomcat, I get a severe error and it won't start:
SEVERE: A child container failed during start
(...)
Caused by: java.lang.NoClassDefFoundError: org.apache.commons.logging.Log
I've tried putting the logging jar in every folder I could find, and just couldn't get it to work. I'm calling it an evening, but if someone has successfully deployed an EGL web service to a local Tomcat 8 instance, I'd love to hear how you did it. Thank you!
------------------------------
Joe Pluta
------------------------------