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



If it works on other machines, then maybe it is a version issue.

Does it have the most recent version of JT400native.jar, is it using the IBM
jar or the JTOpen jar.

If it the JTOpen jar might be worth checking out their forum, the guys there
are really helpful.

http://www-912.ibm.com/j_dir/JTOpen.nsf/By+Date?OpenView

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Ashish Kulkarni
Sent: 22 April 2009 21:51
To: Java Programming on and around the iSeries / AS400
Subject: Re: sqlState: 08004 vendor code -99999 Error when creating JDBC
Connection on AS400

HiThis used to work till Monday and works on most of other AS400 machines,
the code i have is as below
If i replace jt400Native.jar with jt400.jar every thing works

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class GetAS400JDBCConnection
{
public Connection getJDBCConnection(String system, String userId,String
password, String libraryList, boolean isDebug)throws Exception
{
Properties prop = new Properties();
prop.put("prompt", "false");
prop.put("naming", "system");
prop.put("date format", "iso");
prop.put("time format", "hms");
prop.put("behavior override", "1");
prop.put("translate binary", "true");
prop.put("libraries", libraryList);
prop.put("user", userId);
prop.put("password", password);
if(isDebug)
{
prop.put("trace", "true");
prop.put("errors", "full");
}
Class.forName("com.ibm.as400.access.AS400JDBCDriver");
String url = "jdbc:as400:" + system;
Connection db2conn = DriverManager.getConnection(url, prop);
return db2conn;
}
}

On Wed, Apr 22, 2009 at 4:37 PM, Neill Harper <neill.harper@xxxxxxxx> wrote:

I think that might be your problem, I'm not sure but I think the host
might
be rejecting the login because one user is attempting to log in as
another.
If you don't specify a username and password on the jdbc calls it might
actually work as it will detect the user id of the job and use native
authentication.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:
java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Ashish Kulkarni
Sent: 22 April 2009 20:30
To: Java Programming on and around the iSeries / AS400
Subject: Re: sqlState: 08004 vendor code -99999 Error when creating JDBC
Connection on AS400

HiI am using user id, password to create connection and not of the job
user.


On Wed, Apr 22, 2009 at 1:46 PM, Neill Harper <neill.harper@xxxxxxxx>
wrote:

Are you using a user name and password for the JDBC connection when
using
JT400Native and is that username the same as the job user?





-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:
java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Ashish Kulkarni
Sent: 22 April 2009 16:44
To: java400-l@xxxxxxxxxxxx
Subject: sqlState: 08004 vendor code -99999 Error when creating JDBC
Connection on AS400

HiI am having a JDBC connection issue on V5R4 machine since last 2 days,
when trying to create JDBC connection with jt400Native.jar
and com.ibm.as400.access.AS400JDBCDriver
This happens when the java program is running on AS400, but if i change
the
classpath to use jt400.jar then the program works fine
The complete error stack is
Tue Apr 21 17:21:18:070 IST 2009 as400: Connection null (159644216) :
Throwing exception. Actual exception: The application server rejected
the
connection. (General security error.) sqlState: 08004 vendor code
-99999.java.sql.SQLException: The application server rejected the
connection. (General security error.)
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at
com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at




com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.j
ava:3021)
at




com.ibm.as400.access.AS400JDBCDriver.prepareConnection(AS400JDBCDriver.java:
1256)
at




com.ibm.as400.access.AS400JDBCDriver.initializeConnection(AS400JDBCDriver.ja
va:1107)
at
com.ibm.as400.access.AS400JDBCDriver.connect(AS400JDBCDriver.java:357)
at
java.sql.DriverManager.getConnection(DriverManager.java:512)
at
java.sql.DriverManager.getConnection(DriverManager.java:140)
at
GetAS400JDBCConnection.getJDBCConnection(GetAS400JDBCConnection.java:28)
at GetAS400JDBCConnection.main(GetAS400JDBCConnection.java:35)

java.sql.SQLException: The application server rejected the connection.
(General security error.)
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at
com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at




com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.j
ava:3021)
at




com.ibm.as400.access.AS400JDBCDriver.prepareConnection(AS400JDBCDriver.java:
1256)
at




com.ibm.as400.access.AS400JDBCDriver.initializeConnection(AS400JDBCDriver.ja
va:1107)
at
com.ibm.as400.access.AS400JDBCDriver.connect(AS400JDBCDriver.java:357)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
GetAS400JDBCConnection.getJDBCConnection(GetAS400JDBCConnection.java:28)
at GetAS400JDBCConnection.main(GetAS400JDBCConnection.java:35)
--
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

--
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.