Hi guys,
I am trying to add second HOST under tomcat server.xml, but getting the following erros:
01-Sep-2023 09:47:12.469 SEVERE [main] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [RESTServlet] in web application [] threw load() exception
javax.servlet.ServletException: the web context [01b7860cceaf57b6652dc36e17e29042] has defined the same configuration directory [/srv/www/catalina-base/lucee-web] as the web context [4e9bf5f1d43c9c61c370ce45dd5f01b2]
at lucee.runtime.config.XMLConfigWebFactory.newInstance(XMLConfigWebFactory.java:245)
at lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:940)
at lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:800)
at lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:87)
at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:211)
at lucee.loader.servlet.RestServlet.init(RestServlet.java:42)
and
01-Sep-2023 09:47:12.466 SEVERE [main] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [CFMLServlet] in web application [] threw load() exception
javax.servlet.ServletException: the web context [01b7860cceaf57b6652dc36e17e29042] has defined the same configuration directory [/srv/www/catalina-base/lucee-web] as the web context [4e9bf5f1d43c9c61c370ce45dd5f01b2]
at lucee.runtime.config.XMLConfigWebFactory.newInstance(XMLConfigWebFactory.java:245)
at lucee.runtime.engine.CFMLEngineImpl.loadJSPFactory(CFMLEngineImpl.java:940)
at lucee.runtime.engine.CFMLEngineImpl.addServletConfig(CFMLEngineImpl.java:800)
at lucee.loader.engine.CFMLEngineWrapper.addServletConfig(CFMLEngineWrapper.java:87)
at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:211)
at lucee.loader.servlet.CFMLServlet.init(CFMLServlet.java:42)
I am using mod_cfml version: 1.1.11
My server.xml file is like:
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="false" autoDeploy="false">
<Context path="" docBase="${server.webroot}" mapperDirectoryRedirectEnabled="true" mapperContextRootRedirectEnabled="true"/>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%{yyyy-MM-dd'T'HH:mm:ssZ}t %s %a %r %{Referer}i "%{User-Agent}i" %I %T %{X-Original-URI}i %{cfid}c %{X-Request-ID}i"
requestAttributesEnabled="true"
/>
<Valve className="mod_cfml.core"
loggingEnabled="false"
maxContexts="999"
timeBetweenContexts="0"
scanClassPaths="false"
sharedKey="My_secret_key"
/>
</Host>
<Host name="test-mysite.com" appBase="webapps"
unpackWARs="false" autoDeploy="true">
<Context path="" docBase="/srv/www/app/webroot/mysite/src" />
<Alias>test-mysite.com</Alias>
</Host>
</Engine>
The error is not showen when I have onl yone Host tag.
Do you have ideas how to resolve the errors?
I have tried with diferent versions of mod_cfml.core, different docBase and diferent appBase names.
This is my webContext:
Java Version: 11.0.20 (Red Hat, Inc.) 64bit
Tomcat Version: 9.0.80
Lucee Version: 5.4.3.2