https://bz.apache.org/bugzilla/show_bug.cgi?id=64849

            Bug ID: 64849
           Summary: Embedded EL module descriptor missing uses and
                    provides clauses
           Product: Tomcat 9
           Version: 9.0.39
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: dev@tomcat.apache.org
          Reporter: rob.pl...@dai.co.uk
  Target Milestone: -----

Tomcat Embedded EL has a bug closely related to one reported and fixed to the
core module, issue 64751 "Incomplete module info descriptor". This is the
stacktrace:

java.util.ServiceConfigurationError: javax.el.ExpressionFactory: module
org.apache.tomcat.embed.el does not declare `uses`
[ERROR]         at
java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
[ERROR]         at
java.base/java.util.ServiceLoader.checkCaller(ServiceLoader.java:574)
[ERROR]         at
java.base/java.util.ServiceLoader.<init>(ServiceLoader.java:503)
[ERROR]         at
java.base/java.util.ServiceLoader.load(ServiceLoader.java:1646)
[ERROR]         at
org.apache.tomcat.embed.el@9.0.39/javax.el.ExpressionFactory.getClassNameServices(ExpressionFactory.java:372)
[ERROR]         at
org.apache.tomcat.embed.el@9.0.39/javax.el.ExpressionFactory.discoverClassName(ExpressionFactory.java:330)
[ERROR]         at
org.apache.tomcat.embed.el@9.0.39/javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:134)
[ERROR]         at
org.apache.tomcat.embed.el@9.0.39/javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:86)

Looking at module-info.java and the contents of META-INF/services I think there
are two missing lines for this module descriptor; not just the uses clause, but
also and the provides clauses. Both of these lines need adding:

uses javax.el.ExpressionFactory;
provides javax.el.ExpressionFactory with org.apache.el.ExpressionFactoryImpl;

Both lines are necessary to recreate the service provider / loader mechanism
with the module system; ExpressionFactory has static methods to look up the
implementation (as part of the public newInstance method), so the module uses
its own provided implementation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to