You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thomas Burns <th...@riskmetrics.com> on 2004/08/20 00:13:38 UTC

configuration is frozen

I am in the process of finalizing a move to Struts 1.1 under Tomcat 5 and am
having problems getting our unit test servlet running properly - I am
getting a "java.lang.IllegalStateException: Configuration is frozen" error.

The source of the problem seems to be how we define our contexts.  In this
case, we have 2 contexts (one our main application context and one our unit
test context) defined with unique paths, but pointing to the same docbase.
When initializing, the second context is failing with the above exception
and it appears (though I may be wrong) that Tomcat 5 is deciding that since
2 contexts have the same docbase they are the same servlet.  As a result,
when the second one initializes and FormBeanConfig.setModuleConfig() is
called (indirectly from ActionServlet.init()) Struts determines that it has
already been initialized and throws the exception.

Can anyone tell me if this is a Tomcat or Struts issue?  Any suggestions
would be appreciated.

If I comment out either of the 2 context definitions, all is well - having
both is causing problems.  For reference, following are the context defs as
found in our server.xml:

<Context path="/CreditManager"
    reloadable="true"
    docBase="C:\Program Files\eclipse\workspace\CreditManager\webapp"
    workDir="C:\Program Files\eclipse\workspace\CreditManager\work" >
        <Logger className="org.apache.catalina.logger.SystemOutLogger"
verbosity="4" timestamp="true"/>
</Context>

<Context path="/unitTest"
    docBase="C:\Program Files\eclipse\workspace\CreditManager\webapp"
    crossContext="false">
        <Logger className="org.apache.catalina.logger.SystemOutLogger"
verbosity="4" timestamp="true"/>
</Context>

Thanks -

t


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org