Hello, I am unable to start my application on Tomcat 9.0.73 with JDK19 on RHEL 8.7. It appears to be ignoring everything in my context.xml, for example:
<Environment name="environment" value="dev" type="java.lang.String" override="false" /> Code: try { Context initContext = new InitialContext(); environment = (String) initContext.lookup("environment"); } catch (final NamingException nx) { ERROR_RECORDER.error(nx.getMessage(), nx); } Exception: [2023-03-17T16:47:54.663-0400] GC(3) Concurrent Mark Cycle 89.898ms SecurityService: xmlURL provided was valid and found, continuing configuration Name [jdbc/cwssec] is not bound in this Context. Unable to find [jdbc]. eSolutionsCore: xmlURL provided was valid and found, continuing configuration Name [jdbc/esolutions] is not bound in this Context. Unable to find [jdbc]. [Time: 17 Mar 2023 16:47:55,836][Thread: main][Log: ERROR_RECORDER.][Level: ERROR] - [File: ResponseTimeFilter.java:80] - Name [environment] is not bound in this Context. Unable to find [environment]. javax.naming.NameNotFoundException: Name [environment] is not bound in this Context. Unable to find [environment]. This code works just fine in other containers (for example, IBM WebSphere), so I must be doing something wrong with the context file. Can anyone assist?