WebSphere Scripting : AdminTask.createAuthDataEntry(…) : java.sql.SqlException: Login failed for user ''

£可爱£侵袭症+ 提交于 2019-12-14 02:29:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!