|
Does the Java code have any try/catch blocks in it that don't print out a stack
trace? If there's code like this:
try {
fancy code goes here
} catch (Exception e) {
}
You'll never see an error message.
I guess it's also possible for the Toolbox to be eating it's errors (I think
some parts do that). You should take a look at the documentation
(http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahh/page1.htm) to see
if that's the case. If you're using the CommandCall object, here's a snippet of
code that I use to run the CHGAUT command in a file upload servlet I did (if
you care about what the messages are, I think you can more info about them from
the AS400Message object):
AS400ConnectionPool as400ConPool = new AS400ConnectionPool();
These lines go in the init() method:
// Set maximum connections to AS/400 Connection Pool.
as400ConPool.setMaxConnections(maxPoolConn);
// Preconnect connections to the AS400.COMMAND service.
as400ConPool.fill(iSeriesName, iSeriesUser, iSeriesPassword, AS400.COMMAND,
minPoolConn);
These lines go in the main logic section:
try {
// Connect to the AS/400
AS400 as400Conn = as400ConPool.getConnection(iSeriesName, iSeriesUser,
iSeriesPassword, AS400.COMMAND);
// Set authority
CommandCall cmd = new CommandCall(as400Conn);
cmd.run("CHGAUT OBJ('" + dirName + "/" + newFileName + "') USER(" +
UserID + ") DTAAUT(*RWX) OBJAUT(*ALL)");
AS400Message[] messageList = cmd.getMessageList();
for (int i = 0; i < messageList.length; i++) {
System.out.println(messageList[i].getText());
}
// Disconnect from the AS/400
as400ConPool.returnConnectionToPool(as400Conn);
} catch (Exception e) {
System.out.println("An error occured connecting to " + iSeriesName + ".
Error is " + e.getMessage());
}
This goes in the destroy() method:
as400ConPool.close();
If you're using PCML, I haven't used it before but there are wizards to set up
the call for you.
Matt
-----Original Message-----
From: Rick.Chevalier@xxxxxxxxxxxxxxx
[mailto:Rick.Chevalier@xxxxxxxxxxxxxxx]
Sent: Friday, October 15, 2004 11:45 AM
To: web400@xxxxxxxxxxxx
Subject: RE: [WEB400] Web app not returning data from iSeries
Matt,
Are you referring to the server console window? I don't recall seeing anything
that looked like an error there.
Rick
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]On
Behalf Of Haas, Matt
Sent: Friday, October 15, 2004 8:59 AM
To: Web Enabling the AS400 / iSeries
Subject: RE: [WEB400] Web app not returning data from iSeries
Rick,
When the server starts, there's a window that a bunch of stuff prints in.
That's the STDOUT log. Any exceptions should show up there.
Matt
-
_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
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.