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



Thanks Gary!

Thank you Gary.

I've been hanging around PCs too long!

DSPMSG wasn't helpful because I was trying to use the *CURRENT user
profile and password of the batch job which started the Java program.
But I found a hint while looking around in the job logs associated with
the Java runtime environments.

The hint was in QJVACMDSRV. It had this set of messages:

AUTHORIZATION ERROR: REFER TO PTF 5722SS1 SI30132 FOR MORE INFORMATION.

Authorization failure on distributed database connection attempt.


It seems a recent PTF changed how the native JDBC driver connects with
the default or current user. The connection information is no longer
compatible with the AS400 JDBC driver.

The host name now has to be *local, not host name LOCALHOST or LOOPBACK,
or the IP address 127.0.0.1.

The user profile and password must be the Java value null instead of the
String *CURRENT.

After I made those changes the native driver worked for me.

Thanks
Bill Blalock

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gary L Peskin
Sent: Friday, September 19, 2008 7:20 PM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: Does any know what a DB2SQLInvalidAuthorizationException is
andwhat causes it?

Type DSPMSGD RANGE(SQ30082) MSGF(QSQLMSG). The second level message
text
will show the list of possible problems. Since you're running with the
native driver, the actual message should appear in your joblog and you
can
see from there what the actual problem is.

HTH,
Gary

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Blalock, Bill
Sent: Friday, September 19, 2008 5:04 PM
To: Java Programming on and around the iSeries / AS400
Subject: Does any know what a DB2SQLInvalidAuthorizationException is
and
what causes it?

Good evening all:



I tried to use the native JDBC driver (V5R4) and got this exception:



ibm.db2.jdbc.app.DB2SQLInvalidAuthorizationException: Authorization
failure on distributed database connection attempt.



Any ideas what it means?



The only change was using the native driver
com.ibm.db2.jdbc.app.DB2Driver



Here is the rest of the stack trace in case it is helpful.



Thanks!

Bill Blalock



Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0
(Build
1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException

Internal Exception:
com.ibm.db2.jdbc.app.DB2SQLInvalidAuthorizationException:
Authorization
failure on distributed database connection attempt.

Error Code: -30082

at java.lang.Throwable.<init>(Throwable.java:196)

at java.lang.Exception.<init>(Exception.java:41)

at java.lang.RuntimeException.<init>(RuntimeException.java:43)

at

org.eclipse.persistence.exceptions.EclipseLinkException.<init>(EclipseLi
nkException.java:47)

at

org.eclipse.persistence.exceptions.EclipseLinkException.<init>(EclipseLi
nkException.java:57)

at

org.eclipse.persistence.exceptions.DatabaseException.<init>(DatabaseExce
ption.java:66)

at

org.eclipse.persistence.exceptions.DatabaseException.sqlException(Databa
seException.java:313)

at

org.eclipse.persistence.exceptions.DatabaseException.sqlException(Databa
seException.java:308)

at

org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnect
or.java:136)

at

org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(Dat
asourceLogin.java:164)

at

org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.conne
ctInternal(DatasourceAccessor.java:324)

at

org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connect
Internal(DatabaseAccessor.java:264)

at

org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.conne
ct(DatasourceAccessor.java:407)

at

org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(C
onnectionPool.java:130)

at

org.eclipse.persistence.sessions.server.ConnectionPool.startUp(Connectio
nPool.java:367)

at

org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSess
ion.java:500)

at

org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(Data
baseSessionImpl.java:606)

at

org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(
EntityManagerFactoryProvider.java:211)

at

org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(Entit
yManagerSetupImpl.java:246)

at

org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerS
ession(EntityManagerFactoryImpl.java:69)

at

org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEnti
tyManagerImpl(EntityManagerFactoryImpl.java:118)

at

org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEnti
tyManagerImpl(EntityManagerFactoryImpl.java:112)

at

org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEnti
tyManager(EntityManagerFactoryImpl.java:100)

at domain_model.AccessData.getEmSysmon(AccessData.java:20)

at domain_model.AccessData.xfrctl00GetAll(AccessData.java:215)

at
server.LoadXfrctl00.getAuditControlSetSerialized(LoadXfrctl00.java:71)

at server.Monitor.newSerialized(Monitor.java:417)

at server.Monitor.main(Monitor.java:215)

Caused by: com.ibm.db2.jdbc.app.DB2SQLInvalidAuthorizationException:
Authorization failure on distributed database connection attempt.

at java.lang.Throwable.<init>(Throwable.java:196)

at java.lang.Exception.<init>(Exception.java:41)

at java.sql.SQLException.<init>(SQLException.java:40)

at

com.ibm.db2.jdbc.app.DB2SQLException.createException(DB2SQLException.jav
a:77)

at
com.ibm.db2.jdbc.app.DB2ConnectionRuntimeImpl.SQLConnect(Native
Method)

at

com.ibm.db2.jdbc.app.DB2ConnectionRuntimeImpl.connect(DB2ConnectionRunti
meImpl.java:160)

at
com.ibm.db2.jdbc.app.DB2Connection.<init>(DB2Connection.java:442)

at

com.ibm.db2.jdbc.app.DB2Driver.handleURLProcessing(DB2Driver.java:1465)

at com.ibm.db2.jdbc.app.DB2Driver.connect(DB2Driver.java:999)

at java.sql.DriverManager.getConnection(DriverManager.java:525)

at java.sql.DriverManager.getConnection(DriverManager.java:140)

at

org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnect
or.java:97)

... 19 more



_____________

The information contained in this message is proprietary and/or
confidential. If you are not the
intended recipient, please: (i) delete the message and all copies;
(ii) do
not disclose,
distribute or use the message in any manner; and (iii) notify the
sender
immediately. In addition,
please be aware that any message addressed to our domain is subject to
archiving and review by
persons other than the intended recipient. Thank you.
_____________
--
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.