0

The application we run on is based on Struts 2.0. Many of us access this application simultaneously. Every evening around the same time, the application comes to a haul. If we reload the application on the browser, it never moves ahead of the Login page. Seeing the logs for the server, I can see that the last message was "thread sleep".

On doing some research I came across the use of annotation for Spring framework. Does the same work for Struts2 also? Can u please illustrate the use if possible in a struts file?

[4/25/12 15:20:19:595 GMT+05:30] 00000029 SystemOut     O 25 Apr 2012 15:20:19,595 DEBUG [Thread-64][GreeceSynchronizer] thread sleep
action [cape.base.lbxoutclearing.ui.action.LoginAction@1f601f6]
[4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] intercept '//doLogin' { 
[4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] requested_locale=null
[4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][I18nInterceptor] before Locale=en_US
[4/25/12 15:20:26:293 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,293 DEBUG [WebContainer : 5][InstantiatingNullHandler] Entering nullPropertyValue [target=[cape.base.lbxoutclearing.ui.action.LoginAction@1f601f6, com.opensymphony.xwork2.DefaultTextProvider@58605860], property=struts]
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][FileUploadInterceptor] Bypassing // doLogin
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][StaticParametersInterceptor] Setting static parameters {}
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][ParametersInterceptor] Setting params password => [ DEMO9 ] changePassword => [ false ] forgotPassword => [  ] username => [ DEMO9 ] 
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] Property: changePassword
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] Class: cape.base.lbxoutclearing.ui.action.LoginAction
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] field-level type converter for property [changePassword] = none found
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] global-level type converter for property [changePassword] = none found
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][XWorkConverter] falling back to default type converter [com.opensymphony.xwork2.util.XWorkBasicConverter@48c648c6]
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'forgotPassword' (no setter could be found).
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'password' (no setter could be found).
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][CompoundRootAccessor] No object in the CompoundRoot has a publicly accessible property named 'username' (no setter could be found).
[4/25/12 15:20:26:294 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,294 DEBUG [WebContainer : 5][LoginAction] Validating login
[4/25/12 15:20:26:295 GMT+05:30] 00000030 SystemOut     O 25 Apr 2012 15:20:26,295 DEBUG [WebContainer : 5][LoginAction] 1
[4/25/12 15:20:31:256 GMT+05:30] 00000036 FreePool      E   J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource lockBoxDSJNDI.
[4/25/12 15:20:31:292 GMT+05:30] 00000036 SystemOut     O 25 Apr 2012 15:20:31,289 ERROR [WebContainer : 8][BaseDAO] Exception in getConnection()
com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180007
    at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:1252)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:444)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:400)
    at cape.base.lbxoutclearing.ui.dao.BaseDAO.getConnection(BaseDAO.java:49)
Caused by: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 180007
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1496)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2273)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:903)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:603)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:431)
    ... 130 more
4

1 に答える 1

3

これはStruts/Springとは何の関係もありません。

コンテナWASは、接続プールから接続を取得できないと言っています。

Connectiontimeout期間は、データソースで指定されます。その期間待機した後、WASランタイムがアプリケーションにプールからの接続を提供できない場合、この例外がスローされます。

プール内の接続を保持しているのは誰かを調べ、接続が解放されていることを確認する必要があります。

このトレース文字列ConnLeakLogic=finestを使用してトレースをオンにします。この例外が発生すると、その時点で接続を使用しているすべてのスレッドを一覧表示する状態がダンプされます。これがあなたの出発点になるはずです。

HTH

マングル

于 2012-04-26T00:39:13.437 に答える