Hi there, I've run into a problem trying to deploy an web application on Wildfly that includes the tomcat-embed-el JAR (which is now the default EL for Spring Boot 2.5 applications). The spec at https://docs.oracle.com/javaee/7/api/javax/el/ExpressionFactory.html#newInstance-- says:
> Use the Services API (as detailed in the JAR specification). If a resource with the name of META-INF/services/javax.el.ExpressionFactory exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. but the tomcat-embed-el.jar file (as of 9.0.31 - "Add a META-INF/services entry to jasper-el.jar so that the Expression Language implementation can be discovered via the services API. (markt)") has the following file content: # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. org.apache.el.ExpressionFactoryImpl and thus having the licence header violates the spec. When the class loader situation means that a non-Tomcat javax.el.ExpressionFactory is resolving which implementation to use (which happens in Wildfly but judging by Google, also several other app servers), then it fails with a trace with the following sort of root cause: Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more from [Module "deployment.services-boot.war" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) at javax.el.api@2.0.0.Final //javax.el.FactoryFinder.newInstance(FactoryFinder.java:48) ... 30 common frames omitted In this specific case, it's the JBoss spec implementation at https://github.com/jboss/jboss-jakarta-el-api_spec/blob/master/api/src/main/java/org/jboss/el/cache/FactoryFinderCache.java#L99 which reads the first line only, but the RI also does the same: https://github.com/javaee/el-spec/blob/master/api/src/main/java/javax/el/FactoryFinder.java#L154 so it's the Tomcat ExpressionFactory that appears to be more tolerant than the specification allows rather than the others being buggy? Assuming you agree that it's a spec violation, do I raise a bugzilla myself or does one of the Tomcat developers? Would an acceptable solution be to simply move the licence header to be _after_ the first line ? regards, Steve -- Steve Storey e: ssto...@gmail.com