You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/01/25 08:25:37 UTC

[Bug 64097] New: Service loader implementation incomplete

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

            Bug ID: 64097
           Summary: Service loader implementation incomplete
           Product: Tomcat 9
           Version: 9.0.x
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: dev@tomcat.apache.org
          Reporter: markt@apache.org
  Target Milestone: -----

The custom service loader implementation used by the EL API is incomplete. It
does not skip comments causing it to use a comment line as a class name. This
means it often fails to load a valid EL implementation present on the class
path.

I suspect the issues are not limited to comment handling but I haven't dug
further.

Switching to using ServiceLoader rather than a custom implementation looks to
be the best solution.

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

Josh V <jo...@btinternet.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |WONTFIX

--- Comment #5 from Josh V <jo...@btinternet.com> ---
(In reply to Peer Heijnen from comment #4)
> You are absolutely right. Thanks for your quick and correct analysis!
> 
> Problem was caused by the depedency of the Maven plugin on an older Tomcat
> version. Fixed by updating its dependency.

May I ask exactly what you changed? I am getting a similar issue and cannot
find a maven plugin in my project with a tomcat dependency. Thanks!

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
You aren't using 8.5.51. That stack trace is from 8.5.50. Looks like you have a
strange combination of versions. The users list is the place to see further
help.

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

Peer Heijnen <he...@numdata.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Peer Heijnen <he...@numdata.com> ---
In Tomcat 8.5.51 we now have a regression when compiling JSP's in Maven (using
io.leonard.maven.plugins:jspc-maven-plugin:2.4.5) that might be related to this
fix:

javax.el.ELException: Unable to find ExpressionFactory of type: # Licensed to
the Apache Software Foundation (ASF) under one or more
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:154)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:93)
        at org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
        at org.apache.jasper.JspC.processFile(JspC.java:1263)
        at org.apache.jasper.JspC.execute(JspC.java:1415)
        at io.leonard.maven.plugins.jspc.JspcWorker.call(JspcWorker.java:27)
        at io.leonard.maven.plugins.jspc.JspcWorker.call(JspcWorker.java:9)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software
Foundation (ASF) under one or more
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:147)
        ... 12 more

This seems to be the direct opposite of what was intended.

Reverting to Tomcat 8.5.50 fixes the issue.

Related Google search result:
https://forum.axelor.com/t/error-when-trying-to-start-the-demo-app-on-tomcat-com-axelor-internal-javax-el-elexception-unable-to-find-expressionfactory-of-type-licensed-to-the-apache-software-foundation-asf-under-one-or-more/2625

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- master for 10.0.0.0-M1 onwards
- 9.0.x for 9.0.31 onwards
- 8.5.x for 8.5.51 onwards
- 7.0.x for 7.0.100 onwards

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

--- Comment #4 from Peer Heijnen <he...@numdata.com> ---
You are absolutely right. Thanks for your quick and correct analysis!

Problem was caused by the depedency of the Maven plugin on an older Tomcat
version. Fixed by updating its dependency.

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

--- Comment #8 from Mark Thomas <ma...@apache.org> ---
You aren't using the EL API from 8.5.51. The EL API you are using suffers from
this bug. The users list is the place to see help.

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |FIXED

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Restore the correct resolution. If you have questions, please use the users
mailing list.

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

--- Comment #7 from sandeepiitcs@gmail.com ---
Hi Mark, 

I recently upgraded it to tomcat 8.5.51. And observing this error stack trace

Servlet.service() for servlet [jsp] in context with path [/my-app] threw
exception [Unable to compile class for JSP] with root cause
java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation
(ASF) under one or more
 at
org.eclipse.gemini.web.tomcat.internal.loader.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:318)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:147)
 at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:93)
 at org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:116)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)
 at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
 at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
 at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
 at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
 at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)

Can you please let me know, why i am getting this error after upgrading to
8.5.51 version ?
As i havent faced this issue while upgrading it to 8.5.50

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


[Bug 64097] Service loader implementation incomplete

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64097

--- Comment #9 from sandeepiitcs@gmail.com ---


(In reply to Mark Thomas from comment #8)
> You aren't using the EL API from 8.5.51. The EL API you are using suffers
> from this bug. The users list is the place to see help.

Hi Mark, Thanks for your reply. Can you please let me know how can i check that
i am not using EL API from 8.5.51 and so i can update it.

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