<p>I am trying to set some values in server.xml using environment variables. From this <a href="https://stackoverflow.com/questions/67214216/how-to-set-org-apache-tomcat-util-digester-environmentpropertysource-in-tomcat">how to set org.apache.tomcat.util.digester.EnvironmentPropertySource in tomcat</a>, I create setenv.sh file in /tomcat/bin with this:</p>
<pre><code>CATALINA_OPTS=&quot;$CATALINA_OPTS -Dorg.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource&quot;
</code></pre>
<p>When I run tomcat, I get this exception:</p>
<pre><code>org.apache.tomcat.util.digester.Digester.&lt;clinit&gt; Unable to load property source[org.apache.tomcat.util.digester.EnvironmentPropertySource].
</code></pre>
<p>I am really new to tomcat, so I have no idea what it means. I am not sure even if it is related to the <code>setenv.sh</code>. I don't see the same exception without <code>setenv.sh</code> file. I tried to research on this topic, but not many information was found.</p>
<p>Can anyone please answer why this is happening?</p>
<p>EDIT: here is my whole stack trace from the log file</p>
<pre><code>26-Apr-2021 19:32:44.857 SEVERE [main] org.apache.tomcat.util.digester.Digester.&lt;clinit&gt; Unable to load property source[org.apache.tomcat.util.digester.EnvironmentPropertySource].
 java.lang.ClassNotFoundException: org.apache.tomcat.util.digester.EnvironmentPropertySource
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.apache.tomcat.util.digester.Digester.&lt;clinit&gt;(Digester.java:97)
        at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:272)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:644)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)

26-Apr-2021 19:32:44.859 SEVERE [main] org.apache.tomcat.util.digester.Digester.&lt;clinit&gt; Unable to load property source[org.apache.tomcat.util.digester.EnvironmentPropertySource].
 java.lang.ClassNotFoundException: org.apache.tomcat.util.digester.EnvironmentPropertySource
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.apache.tomcat.util.digester.Digester.&lt;clinit&gt;(Digester.java:97)
        at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:272)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:644)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)

</code></pre>

Jonathan Hagen
<p>The <code>org.apache.tomcat.util.digester.EnvironmentPropertySource</code> class is available since <a href="https://tomcat.apache.org/tomcat-7.0-doc/changelog.html#Tomcat_7.0.101_(violetagg)" rel="nofollow noreferrer">Tomcat 7.0.108</a>, <a href="https://tomcat.apache.org/tomcat-8.5-doc/changelog.html#Tomcat_8.5.52_(markt)" rel="nofollow noreferrer">Tomcat 8.5.65</a> and <a href="https://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.32_(markt)" rel="nofollow noreferrer">Tomcat 9.0.45</a>. You must be running an older release.</p>
