Hi Mark,

Thanks for the suggestion. It worked at my end.
We are verifying further and keep you posted.

Thank you again !

Thanks,
Ravi


On Wed, Jan 9, 2019 at 3:56 PM Mark Thomas <ma...@apache.org> wrote:

> On 09/01/2019 09:19, Ravi Kumar wrote:
> >  Dear Team,
> >
> > We have a web application running on Tomcat server container. Web
> > application is compiled and using JDK 11 as runtime JRE for execution
> > purpose.
> >
> > Tomcat Version : - 7.0.92
> > JDK Version :-  11
>
> The stack trace below is not consistent with the version information
> above. It looks like you are using 7.0.91.
>
>
> >
> > Problem Description :-
> > 1.We are seeing the errors in tomcat log regarding jar scanning at time
> of
> > Tomcat server startup.
> > 2. Once Tomcat server is getting launched through our web application, it
> > searches the Tools.jar for annotations purpose.
> > 3. As we all know, JDK 11 has stopped shipping / bundling JRE which
> > contains the tools.jar,
> >  Tomcat server reports an error which is following :--
> >
> > *ERROR localhost-startStop-1 org.apache.catalina.startup.ContextConfig -
> > Unable to process Jar [jar:file:/ C:/JDK11/lib/tools.jar!/] for
> annotations*
> >  java.nio.file.NoSuchFileException: C:\JDK11\lib\tools.jar
> >     at
> >
> java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
> >     at
> >
> java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> >     at
> >
> java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> >     at
> >
> java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
> >     at
> >
> java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
> >     at
> >
> java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:194)
> >     at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
> >     at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1222)
> >     at
> >
> java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:824)
> >     at
> >
> java.base/java.util.zip.ZipFile$CleanableResource$FinalizableResource.<init>(ZipFile.java:850)
> >     at
> > java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:839)
> >     at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:246)
> >     at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:176)
> >     at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
> >     at
> > java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103)
> >     at
> >
> java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
> >     at
> >
> java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:109)
> >     at
> >
> java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:125)
> >     at
> >
> java.base/sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:92)
> >     at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:48)
> >     at
> > org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1957)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1932)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1917)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1322)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
> >     at
> >
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
> >     at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> >     at
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >     at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
> >     at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> >     at
> >
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707)
> >     at
> >
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697)
> >     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> >     at
> >
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> >     at
> >
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> >     at java.base/java.lang.Thread.run(Thread.java:834)
> >
> >
> >  Resolution / workaround applied :-  Post extensive search on Google and
> > other community like STACKExchange,
> >                                                                  We found
> > that a property is suggested to be applied in the catalina.properties
> file
> > which would
> >                                                                 help
> > avoiding the scanning of all the jars.
> >
> > *org.apache.catalina.startup.**ContextConfig.jarsToSkip=*.jar*
> >                                                                We have
> this
> > property already in place and even this has not helped resolving this
> issue.
> >
> >
> > Therefore, we request you to kindly provide some insight / working
> > resolution of this issue. Please revert in case any more info is
> required.
>
> It look like tools.jar is on the class path. Removing it should fix this
> issue.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to