[Seasar-user:4588] includeを複数回行った際にESSR0007

内田 淳一 [E-MAIL ADDRESS DELETED]
2006年 9月 11日 (月) 22:32:01 JST


いつもお世話になっております。
内田と申します。

Tomcat5.0.28
S2Struts1.2.5
S2Container2.3.10
Struts1.2.9
Java1.4.10
環境において、S2Strutsを使用しております。

現象としては、下記の通りです。

((app.dicon))
<components>
    <include path="menu.dicon"/>
</components>

((menu.dicon))
<components>
    <include path="test.dicon"/>
</components>

((test.dicon))
<components>
    <component class="jp.co.office.TestImpl" instance="session"/>
</components>

((web.xml ※抜粋))
  <servlet>
    <servlet-name>s2container</servlet-name>
    <servlet-class>org.seasar.framework.container.servlet.S2ContainerServlet
</servlet-class>
    <init-param>
      <param-name>debug</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.seasar.struts.servlet.S2ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

このような状態で、Webサーバ起動を起動すると、
org.seasar.framework.exception.EmptyRuntimeException: [ESSR0007]sessionは
nullあるいは空であってはいけません
        at
org.seasar.framework.container.deployer.SessionComponentDeployer.deploy(Sess
ionComponentDeployer.java:44)
        at
org.seasar.framework.container.impl.ComponentDefImpl.getComponent(ComponentD
efImpl.java:94)
        at
org.seasar.framework.container.impl.S2ContainerImpl.getComponent(S2Container
Impl.java:123)
        at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.bindAuto(Abs
tractBindingTypeDef.java:83)
        at
org.seasar.framework.container.assembler.BindingTypeShouldDef.doBind(Binding
TypeShouldDef.java:38)
        at
org.seasar.framework.container.assembler.AbstractBindingTypeDef.bind(Abstrac
tBindingTypeDef.java:64)
        at
org.seasar.framework.container.assembler.AutoPropertyAssembler.assemble(Auto
PropertyAssembler.java:51)
        at
org.seasar.framework.container.deployer.SingletonComponentDeployer.assemble(
SingletonComponentDeployer.java:81)
        at
org.seasar.framework.container.deployer.SingletonComponentDeployer.deploy(Si
ngletonComponentDeployer.java:51)
        at
org.seasar.framework.container.deployer.SingletonComponentDeployer.init(Sing
letonComponentDeployer.java:97)
        at
org.seasar.framework.container.impl.ComponentDefImpl.init(ComponentDefImpl.j
ava:284)
        at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:396)
        at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:393)
        at
org.seasar.framework.container.impl.S2ContainerImpl.init(S2ContainerImpl.jav
a:393)
        at
org.seasar.framework.container.factory.SingletonS2ContainerFactory.init(Sing
letonS2ContainerFactory.java:53)
        at
org.seasar.framework.container.servlet.S2ContainerServlet.init(S2ContainerSe
rvlet.java:69)
        at javax.servlet.GenericServlet.init(GenericServlet.java:168)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
29)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4013)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
23)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
        at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.
java:903)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
        at org.apache.commons.digester.Rule.end(Rule.java:276)
        at
org.apache.commons.digester.Digester.endElement(Digester.java:1058)
        at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:7
6)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:488)
        at
org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483
)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:480)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

と、例外をスローします。

しかし、<component class="jp.co.office.TestImpl" instance="session"/>の定義
を、
menu.diconへ移動すると正常に起動します。

お忙しいところを申し訳ありませんが、
アドバイスをお願いします。
以上です。




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