[Seasar-user:8563] [S2Dao]OGNL で NullPointerException

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2007年 6月 21日 (木) 19:09:41 JST


お世話になっております。
石川と申します。
   
  s2-container-2.3.19
s2-dao-1.0.42
ognl-2.6.7
マルチCPU環境下
   
  上記環境において、マルチスレッド(2〜4)で
同SQLファイル(※1)のクエリを実行した場合、
初回アクセスにおいて稀にOGNLで例外(※2)が発生します。
(マルチCPU以外では再現しませんでした)
   
  ※1…添付:OrderDao_findbyOrderShipNo_oracle.sql
※2…添付:OGNL-Exception.txt
   
  SQLファイル「/*IF dto.orderNo != null*/」の
「orderNo」の部分をOGNLが取得出来ずに落ちています。
例外情報からOGNLのソースをトレースすると以下の箇所が
スレッドセーフには出来ていない様です。
   
  [ognl.SimpleNode.java#evaluateGetValueBody]
protected Object evaluateGetValueBody(
    OgnlContext context, Object source)
        throws OgnlException {
    Object      result;
    context.setCurrentObject(source);
    context.setCurrentNode(this);
    if (!constantValueCalculated) {
        constantValueCalculated = true;
        // 以下でフラグを立ててから値を設定している。初回アクセス時、
        // 別スレッドではconstantValueが未設定で返される可能性あり。
        hasConstantValue = isConstant(context);
        if (hasConstantValue) {
            constantValue = getValueBody(context, source);
        }
    }
    return hasConstantValue ? constantValue : getValueBody(context, source);
}
   
  スレッドセーフに作成されていないOGNLがまずいのでしょうか。
それともスレッドセーフを前提とする様なdicon設定をしている
私の使い方がまずいのでしょうか。
  ご確認頂ければ幸いです。
   
  
    
---------------------------------
  Start Yahoo! Auction now! Check out the cool campaign

 

 
---------------------------------
Start Yahoo! Auction now! Check out the cool campaign
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: http://ml.seasar.org/archives/seasar-user/attachments/20070621/24f50d9b/attachment.html 
-------------- next part --------------
文字コード指定の無い添付文書を保管しました...
名前: OGNL-Exception.txt
URL:  http://ml.seasar.org/archives/seasar-user/attachments/20070621/24f50d9b/attachment.txt 
-------------- next part --------------
テキスト形式以外の添付ファイルを保管しました...
ファイル名: OrderDao_findbyOrderShipNo_oracle.sql
型:         application/octet-stream
サイズ:     226 バイト
説明:       4053339289-OrderDao_findbyOrderShipNo_oracle.sql
URL:        http://ml.seasar.org/archives/seasar-user/attachments/20070621/24f50d9b/attachment.obj 


Seasar-user メーリングリストの案内