× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I've always had to physically set the classpath in the RPG program
itself, right at the top as one of the first thing it does, in order for
the JVM to find the class.  If you try to set it at the environment
level outside of the program, it just never seems to work right.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Pantzopoulos
- (H/O)
Sent: Tuesday, December 05, 2006 7:16 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Java/RPG Blues........

Our Java programmer has written a class to access our company's Active
Directory to obtain the e-mail address of an internal user so that I can
use that address to send an e-mail from our RPG application to that
user. I have compiled and have been trying to run my RPG interface test
harness. I keep getting RNX0301, so I'm presuming there's something
wrong with my CLASSPATH. I've managed to get the java class to run in
QSHELL and it does the right thing but can't get it to run through the
RPG interface. The class contains one static method which I am trying to
invoke from the RPG interface. I'm presuming this is a CLASSPATH issue
so I've posted to Midrange. 

 

I have spent all day reading, amending & playing around with qshell and
classpath and am totally frustrated. Please help if you have a minute or
two. 

 

Here is the relevant information:

 

*       The class (Service.class) is contained in the following folder
structure (from root). Sorry about the depth:

 

/java/leo/au/com/web/webservices/userdb/client/

 

*       The class contains one static method: getUserByUserName 

 

 

*       Here is the classpath in the iSeries job I'm calling the RPG
from. QSHELL shows this to be the CLASSPATH when I issue an export
request:

 

                         Display Environment Var (*JOB)


 


 Name  . . . . . . . . . :   CLASSPATH


 


 


 Value . . . . . . . . . :   '/java/leo/ibm-jaxrpc-client.jar :
/java/leo/objec

tpoolimp.jar :  /java/leo/xercesImpl.jar :  /java/leo/xml-apis.jar :
/java/leo/'

 

*       The four jar files are in the /java/leo/ folder.
*       Here is the RPG test harness. I wrote it to simply see if I
could compile and get a basic execution:

 

d getUser         PR              O   EXTPROC(*JAVA


d                                            :'au.com.eigansvar.-


d                                     web.webservices.userdb.client.-


d                                     Service'


d                                            : 'getUserByUserName')


 *


d                                     CLASS(*JAVA


d                                            :'au.com.eigansvar.-


d                                     web.webservices.userdb.client.-


d                                     User')


d                                     STATIC


d                               10A   CONST VARYING


 *


d user            S               O   CLASS(*JAVA


d                                            :'au.com.eigansvar.-


d                                     web.webservices.userdb.client.-


d                                     User')


d profile         S             10A   INZ('asanovl') VARYING


 *


c                   eval      user= getUser(profile)


 *


c                   seton                                        lr


 

 

 

 

 


************************************************************************
*********************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient, any use, disclosure or
copying of this message is unauthorised. If you have received this
message in error, please reply using the sender's email address. 

This footnote confirms that this email message has been scanned for
computer viruses. EIG-Ansvar Limited does not accept liability for any
loss or damage, whether caused by our own negligence or not, that
results from a computer virus or defect in the transmission of this
email or any attached file. 

EIG-Ansvar Limited - Australia (A.B.N. 21 007 216 506)
Email : insure@xxxxxxxxxxxxxxxx

Eig-Ansvar Limited - New Zealand
Email : insure@xxxxxxxxxxxxxxxx

************************************************************************
*********************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.