Uploaded image for project: 'Teeda'
  1. Teeda
  2. TEEDA-354

Pageクラスで@Bindingを使用してメンバ変数にコンポーネントをバインドすると実行時にClassNotFoundExceptionになることがある

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical Critical
    • None
    • Affects Version/s: 1.0.8
    • Component/s: None
    • None
    • Environment:
      (環境)
      JDK 1.5.0_12(JRE込み)
      Tomcat 5.5.23
      Eclipse 3.2.2(WST 1.5.4のall in one)

      (Eclipse plugin)
      Dolteng 0.21.0
      Sysdeo/SQLI Eclipse Tomcat Launcher 3.2.1

      (手順)
      1. Chura ProjectをSuper Agileで作成
       (例えばプロジェクト名:bug1、ルートパッケージ名:bug1)
      2. Tomcatのコンテキスト定義を更新
      3. src/main/webapp/viewにindex.htmlを作成
      4. src/main/webapp/viewにbug1.htmlを作成
      5. 3と4に対応したPageクラスをそれぞれに作成
      6. 適当なコンポーネントを作成
       (例えばbug1.service.BugService)
      7. 6のコンポーネントを以下のようにコンテナに登録
      +---------------------
      @Component(name = "bugService", instance = InstanceType.SESSION)
      public class BugService {

      }
      ---------------------+
      8. 6のコンポーネントを5で作成したそれぞれのPageクラスのメンバ変数に以下のようにバインド
      +---------------------
      public class IndexPage {

      @Binding
      BugService bugService;

      ...(省略)
      ---------------------+
      9. 以下のURLにアクセス
      +---------------------
      http://localhost/bug1/view/index.html
      ---------------------+
      10. 9に続いて以下のURLにアクセス
      http://localhost/bug1/view/bug1.html

      (現象)
      手順10で以下の例外のスタックトレースを得る。
      以降、手順9にアクセスしても同様の例外となる。
      +---------------------
      org.seasar.framework.exception.ClassNotFoundRuntimeException: [ESSR0044]クラスが見つかりませんでした。詳細はjava.lang.ClassNotFoundException: bug1.web.Bug1Page$$EnhancedByS2AOP$$16d8a64
      org.seasar.framework.container.hotdeploy.HotdeployUtil$RebuilderImpl.rebuild(HotdeployUtil.java:166)
      org.seasar.framework.container.hotdeploy.HotdeployUtil.rebuildValueInternal(HotdeployUtil.java:126)
      org.seasar.framework.container.hotdeploy.HotdeployUtil.rebuildValue(HotdeployUtil.java:107)
      org.seasar.framework.container.external.RebuildableExternalContextMap.get(RebuildableExternalContextMap.java:63)
      javax.faces.internal.scope.VariableScope.getContexts(VariableScope.java:100)
      javax.faces.internal.scope.VariableScope.getOrCreateContext(VariableScope.java:58)
      javax.faces.internal.scope.RedirectScope.getOrCreateContext(RedirectScope.java:46)
      org.seasar.teeda.extension.util.TeedaExtensionErrorPageManagerImpl.saveException(TeedaExtensionErrorPageManagerImpl.java:85)
      org.seasar.teeda.extension.util.TeedaExtensionErrorPageManagerImpl.handleException(TeedaExtensionErrorPageManagerImpl.java:59)
      org.seasar.teeda.core.lifecycle.LifecycleImpl.handleException(LifecycleImpl.java:113)
      org.seasar.teeda.core.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:105)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:92)
      org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:63)
      org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:64)
      org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:62)
      ---------------------+

      (望まれる動作)
      各Pageクラスに正常にコンポーネントがバインドされる。

      参考にプロジェクトファイルを添付(要領が大きいのでsources等一部ファイルを削除している)。

            Assignee:
            shot shot
            Reporter:
            iochi Kotaro Iochi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: