× 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.



That doesn't really help- I don't think.  I have this running when I run
it in WDSC.  
This will not be running on a server when in production.  

For testing I'm trying to run from my local workstation.   

Michael Smith
iSeries.mySeries.


-----Original Message-----
From: java400-l-bounces+mike_smith=rgcresources.com@xxxxxxxxxxxx
[mailto:java400-l-bounces+mike_smith=rgcresources.com@xxxxxxxxxxxx] On
Behalf Of Ron Power
Sent: Tuesday, October 03, 2006 10:54 AM
To: Java Programming on and around the iSeries / AS400
Subject: RE: Running java on Iseries


Ahha... I found it.  In my configuration, I have test server created in 
WDSc, and in that server I have specified a datasource.  In the
datasource 
is where I specify the class path for the driver... not sure if this
will 
help or not cause I'm just as confused about the setup of this as the
next 
one...

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
________________________________________________________________________
___
Success is going from failure to failure without a loss of enthusiasm. -

Sir Winston Churchill




"Smith, Mike" <Mike_Smith@xxxxxxxxxxxxxxxx> 
Sent by: java400-l-bounces@xxxxxxxxxxxx
2006/10/03 12:04 PM
Please respond to
Java Programming on and around the iSeries / AS400 
<java400-l@xxxxxxxxxxxx>


To
"Java Programming on and around the iSeries / AS400" 
<java400-l@xxxxxxxxxxxx>
cc

Subject
RE: Running java on Iseries






Well I've been trying to get this figured out on my own.  No success. 
Before trying to move this to its ultimate destination, I have Exported
my package to a folder on my C drive. 
C:\IseriesJava. 

I have another folder on my C drive that contains JT400.jar.  This is
C:\JDBCDrivers

I have added this to my classpath by trying both of the following 
Set classpath=C:\JDBCDrivers and Set Claspath=C:\JDBCDrivers\jt400.jar

I have tried copying jt400.jar to my folder C:\IseriesJava

Nothing I have tried is giving me success. 
The program is trying to run.  I get a connection to my access driver. 
Then I get the following error java.lang.ClassNotFoundException:
com.ibm.as400.access.AS400JDBCDriver

If I understand correctly, this means that it cannot find the JT400.jar

What am I missing here?

Michael Smith
iSeries.mySeries.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta
Sent: Tuesday, September 26, 2006 9:38 AM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: Running java on Iseries


From: Smith, Mike

This java program has 2 ODBC connections.  1 to the ACCESS database
using.  String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
 String url = "jdbc:odbc:AcsData";

The connection to the Iseries is
String driver = "com.ibm.as400.access.AS400JDBCDriver";

As I read the records I write them to an file on the Iseries.

I just snipped out the relevant bits, Mike.  This is a perfectly valid
design; I've used it in the past to transfer data from a Windows machine
to an iSeries.  The only thing is that, as you have discovered, it
really has to run on the Windows machine (that's because there's no
native iSeries driver to handle the "jdbc:odbc:AcsData" connection).

So, that being the case, you create a simple batch file on the Windows
box to run the command with the appropriate classpath and all those
goodies. Then you use RUNRMTCMD to execute this command from the
iSeries.

A couple of security issues.  First, you have to run "rexec" (IIRC) on
the Windows box.  This allows people to execute commands on that machine
over the Internet (which is exactly what you're trying to accomplish).
I'm not an expert at locking that down to make sure bad people can't do
bad things on the machine.

Second, in order to use the toolbox from a Windows machine you will need
a user ID and password embedded in your Java program or you'll have to
pass it in on the call.  If your SOX auditors ever saw that, they'd
probably have a fit, especially if you allow people to execute commands
on the machine via rexec!

I'd suggest creating a special user profile that only has access to a
single library and that library contains just the file used to upload
data from the PC.  That way if someone gets that password, they can't do
much.

Joe



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.