|
David, the operational people also have user-id
with password, (let's say OPERATIONS)
which is even *SECOFR and so has all rights.
We submit the job using a normal SBMJOB an AS/400.
Logged in with my user-id and doing the
SBMJOB CMD(JAVA RechargingTT)
the jobs ends how expected.
If, still under my user-profile, I start it with
SBMJOB CMD(JAVA RechargingTT) USER(OPERATIONS)
the job ends abnormally.
Same happens if you start it when logged with
the OPERATIONS user-id.
Here is the code that I use to connect to the database.
protected Connection connection = null;
protected Statement s;
public void openDB()
{
try {
DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver());
connection = DriverManager.getConnection ("jdbc:as400://localhost");
s = connection.createStatement();
}
catch (Exception e) {
System.out.println("Exception occurred : " + e);
}
}
During this the programm fails when I use the AS400
java toolbox. When I use that driver,
a different job QZDOSIGN
is spawned, wich ends up abnormally.
Here is the complete output from the java code:
java.awt.AWTError: Toolkit not found: com.ibm.rawt.client.CToolkit
java/lang/Error.<init>(Ljava/lang/String;)V+1 (Error.java:53)
java/awt/Toolkit.getDefaultToolkit()Ljava/awt/Toolkit;+51
(Toolkit.java:396)
java/awt/Frame.addNotify()V+14 (Frame.java:203)
java/awt/Window.pack()V+16 (Window.java:120)
com/ibm/as400/access/MessageDialog.<init>(Ljava/awt/Frame;Ljava/lang/String;ILjava/lang/String;I)V+851
(MessageDialog.java:3
com/ibm/as400/access/MessageDialog.<init>(Ljava/awt/Frame;Ljava/lang/String;Ljava/lang/String;I)V+1
(MessageDialog.java:173)
com/ibm/as400/access/Security400.performSignon(Ljava/io/InputStream;Ljava/io/OutputStream;Z)I+2079
(Security400.java:1043)
com/ibm/as400/access/Security400.startSignon(ZZZ)I+46
(Security400.java:341)
com/ibm/as400/access/Security400.signon(ZZZ)I+336 (Security400.java:300)
com/ibm/as400/access/SecurityManager400.signon(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZ)Lcom/ibm/as400/acce
com/ibm/as400/access/AS400.getSecurity400()V+126 (AS400.java:1266)
com/ibm/as400/access/AS400.signOn()V+41 (AS400.java:2077)
com/ibm/as400/access/AS400.connect(Ljava/lang/String;)Lcom/ibm/as400/access/AS400Server;+52
(AS400.java:517)
com/ibm/as400/access/AS400JDBCConnection.open()V+243
(AS400JDBCConnection.java:1088)
com/ibm/as400/access/AS400JDBCConnection.<init>(Lcom/ibm/as400/access/JDDataSourceURL;Lcom/ibm/as400/access/JDProperties;)V+
com/ibm/as400/access/AS400JDBCDriver.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+58
(AS400JDBCDri
java/sql/DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+139
(DriverManager.java:
java/sql/DriverManager.getConnection(Ljava/lang/String;)Ljava/sql/Connection;+8
(DriverManager.java:141)
RechargingTT.openDB()V+10 (RechargingTT.java:27)
RechargingTT.main([Ljava/lang/String;)V+35 (RechargingTT.java:90)
Java program completed with exit code 1
Hope this helps.
marco
dawall@us.ibm.com on 31/10/2000 16:44:30
Please respond to JAVA400-L@midrange.com
To: JAVA400-L@midrange.com
cc: (bcc: Marco Van Maris/EPT)
Subject: Re: JDBC : How to handle user-id and password
You are right, it is strange that your profile worked but a profile from
the operations team didn't. Please provide more detail. What is the URL
and/or security properties you use with JDBC. Tell me more about the batch
environment you use. Could you be running on a profile with no password
when in production mode?
Since both Java program and database are on the AS/400 stick with the
native driver. But, like you I want to know why security doesn't work with
the Toolbox driver.
David Wall
AS/400 Toolbox for Java
Marco_Van_Maris@ept.lu@midrange.com on 10/31/2000 01:28:15 AM
Please respond to JAVA400-L@midrange.com
Sent by: owner-java400-l@midrange.com
To: JAVA400-L@midrange.com
cc:
Subject: Re: JDBC : How to handle user-id and password
Thanks for your answers, replacing our system name
by localhost got the programm running without entering
user-id and password.
Nevertheless I experienced something strange, which
I find worth being explained.
I started using the AS/400 Toolbox driver. With
my user-profile this worked fine, I could submit
the job to batch and it completed errorfree. In production
the job was to be scheduled by our operations team,
who are obviously using a different user-profile but
which has the same rights than mine. Strangely the job
did not complete under this user-id, it tried to create
awt windows to ask for user-id and password, and as it
run on the AS/400 ended of course abnormally.
Then I changed the programm to use th DB2 driver,
and luckily (for me) the programm worked under my
and under the operations user-profile.
Maybe someone could explain me this mistery ???
Thanks
marco van maris
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.