Hello Mark,

I have tested on 8.5.54, still not able to load
javax.servlet.ServletContainerInitializer. I have created sample code to
recreate the issue.
https://github.com/salvatore-clong/tomcatSCI

We use custom webapp class loader to load jar from common path, for this
case I put the jar in this path (tomcatSCI/WebContent/WEB-INF/commonLib).
Custom webapp class loader will load the jar in this path. (
https://github.com/salvatore-clong/tomcat-custom-class-loader)

1) copy and place custom-classloader-tomcat-8.5.jar in tomcat lib folder
2) Run tomcatSCI project on tomcat 8.5
3) check console if this appear INFO: jar addedtomcatSCI.jar (this is
printed from custom webapp class loader)
4) check console if this appear ABC. (this is printed from
ServletContainerInitializer onStartup)

On Tue, Apr 7, 2020 at 4:55 PM Mark Thomas <ma...@apache.org> wrote:

> On 07/04/2020 08:09, Jackson Ong wrote:
> > Hi,
> >
> > I have tested 8.5.51 and 8.5.53, both doesn't work. The current version
> > that works for me is tomcat 8.5.50
> > The recent changed on SCI was tomcat 7.0.103 (
> > https://tomcat.apache.org/tomcat-7.0-doc/changelog.html)
> > Previously we have issue with tomcat 7.0.100 to 102, tested it works in
> > 7.0.103.
>
> Can you test with the 8.5.54 release candidate please? Details on how to
> obtain it are on the dev@ list.
>
> If you still see an issue, please create the simplest possible test case
> that recreates the issue and provide the steps necessary to recreate the
> issue from a clean 8.5.54 install.
>
> Thanks,
>
> Mark
>
>
> >
> > Jackson
> >
> > On Tue, Apr 7, 2020 at 2:51 PM Martin Grigorov <mgrigo...@apache.org>
> wrote:
> >
> >> Hi,
> >>
> >> On Tue, Apr 7, 2020 at 9:01 AM Jackson Ong <83cl...@gmail.com> wrote:
> >>
> >>> We have an webapp running fine on Tomcat 8.5.50 and below and we used a
> >>> custom WebappClassLoader to load jars (common path for jars), but it
> >> failed
> >>> to load on Tomcat 8.5.51 and above. Upon checking, we noticed that
> >>>
> >>
> >> Which versions of "above" you have tried ?
> >> Because there was a regression with SCI recently that have been fixed in
> >> 8.5.53 (I think. Better check the changelogs).
> >> 8.5.54 is being tested at the moment and if no issues are found it will
> be
> >> released in the next few days.
> >>
> >> Martin
> >>
> >>
> >>> javax.servlet.ServletContainerInitializer that we defined in the jar is
> >> not
> >>> being loaded.
> >>>
> >>> From org.apache.catalina.startup.WebappServiceLoader source code of
> >> Tomcat
> >>> 8.5.51, the classLoader was changed from
> servletContext.getClassloader()
> >>> (Tomcat 8.5.50 line 97) to context.getParentClassLoader() (Tomcat
> 8.5.51
> >>> line 144)
> >>>
> >>> However placing the jar at WEB-INF/lib it was able to load
> >>> javax.servlet.ServletContainerInitializer. The problem is when the jar
> is
> >>> outside of WEB-INF/lib or common path (/opt/client/libraries/test.jar).
> >>>
> >>> Thanks
> >>>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to