在WebSphere 7中定義了一個JNDI名稱爲「jdbc/project/SimpleDS」的數據源。在管理控制檯中,我更改了數據源屬性:db_name,db_port,db_host,登錄名和密碼。WebSphere中的數據源
藉助於此,其引用爲「jdbc /項目/ SimpleDS」數據源拋出異常的部署的應用程序:
java.sql.SQLInvalidAuthorizationSpecException: [jcc][t4][2013][11249]
[4.8.87] Connection authorization failure occurred. Reason: User ID or Password invalid. ERRORCODE=-4214, SQLSTATE=28000DSRA0010E:
SQL State = 28000, Error Code = -4,214
at com.ibm.db2.jcc.am.gd.a(gd.java:674)
at com.ibm.db2.jcc.am.gd.a(gd.java:60)
at com.ibm.db2.jcc.am.gd.a(gd.java:120)
at com.ibm.db2.jcc.t4.b.p(b.java:2060)
at com.ibm.db2.jcc.t4.b.c(b.java:1649)
at com.ibm.db2.jcc.t4.db.r(db.java:799)
at com.ibm.db2.jcc.t4.db.k(db.java:353)
at com.ibm.db2.jcc.t4.db.c(db.java:133)
at com.ibm.db2.jcc.t4.b.Wc(b.java:1263)
at com.ibm.db2.jcc.t4.b.b(b.java:1184)
at com.ibm.db2.jcc.t4.b.a(b.java:5175)
at com.ibm.db2.jcc.t4.b.d(b.java:743)
at com.ibm.db2.jcc.t4.b.c(b.java:685)
at com.ibm.db2.jcc.t4.b.a(b.java:368)
at com.ibm.db2.jcc.t4.b.<init>(b.java:308)
at com.ibm.db2.jcc.t4.c.<init>(c.java:32)
at com.ibm.db2.jcc.DB2PooledConnection.<init>(DB2PooledConnection.java:192)
at com.ibm.db2.jcc.DB2XAConnection.<init>(DB2XAConnection.java:56)
at com.ibm.db2.jcc.DB2XADataSource.getXAConnection(DB2XADataSource.java:168)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:1338)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:1375)
at com.ibm.ws.rsadapter.spi.InternalDB2UniversalDataStoreHelper.getPooledConnection(InternalDB2UniversalDataStoreHelper.java:1855)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:2624)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1695)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2086)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1761)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2636)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1064)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:701)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:668)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:635)
我使用Ubuntu 14.04
我怎樣才能在運行時替換數據源的屬性?
也許您正在使用認證別名,而您忘記將其更新爲正確的用戶/密碼。最好的方法是在更改數據源屬性後重新啓動服務器。 – Gas