问题
I'm having a problem with WebSphere 8.0
I create an ID by typing this into the Jython wsadmin console:
AdminTask.createAuthDataEntry(['-alias', 'uni', '-user', 'uni', '-password', 'uni', '-description', 'uni/uni'])
AdminConfig.save()
I type this:
AdminTask.listAuthDataEntries()
and notice:
'[[alias Unica9100/uni] [userId uni] [description uni] [_Websphere_Config_Data_Id cells/UnicaVMNode03Cell|security.xml#JAASAuthData_1401128477833] [_Websphere_Config_Data_Type JAASAuthData] [password *******] ]'
I go to the JAAS2 alias page and it's listed there.
I go to a datasource and select it for the auth alias.
I test connection.
I get this error:
[5/26/14 14:23:59:621 EDT] 0000001b SystemErr R java.sql.SQLException: Login failed for user ''. ClientConnectionId:3b59e5a5-ac1c-4049-aa58-c245886b5918 DSRA0010E: SQL State = S0001, Error Code = 18,456
[5/26/14 14:23:59:621 EDT] 0000001b SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
- Notice the SQL exception says the login name is '' -- for some reason it's blank.
- I go back to the JAAS2 auth page.
- I resave the credential without any modifications.
- I test the connection again.
It works.
What am I missing?
回答1:
The server needs to be restarted for this change to be reflected when it is only done through Admin Scripting.
来源:https://stackoverflow.com/questions/23876382/websphere-scripting-admintask-createauthdataentry-java-sql-sqlexception