Hi , It is contextPath is a String which used to mention my Webapp location. Also I don’t want to scan any jar files. I want to disable Jarscanner.
Regards, Abirami.S -----Original Message----- From: M. Manna [mailto:manme...@gmail.com] Sent: Friday, August 04, 2017 1:26 PM To: Tomcat Users List Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x Okay, where are you getting your contextPath from? The code you posted is below: 3)Context context= Tomcat.addwebapp(contextpath,docpath); StandardJarScanner scanner=new StandardJarScanner(); scanner.setScanClassPath( false ); scanner.setScanManifest( false ); context.setJarScanner(scanner); Also, setScanClassPath(false) you sure this is should not be "true"? bootstrap scanner is set to "False" by default so I'm not sure if this is supposed to work properly. https://tomcat.apache.org/tomcat-8.0-doc/config/jar-scanner.html Please update. Regards, On 4 August 2017 at 08:50, S Abirami <s.abir...@ericsson.com> wrote: > Hi, > > I am trying to create EmbeddedTomcat so no context.xml created. > Tomcat t=new Tomcat(); > Everything through object creation. > > Regards, > Abirami.S > > -----Original Message----- > From: M. Manna [mailto:manme...@gmail.com] > Sent: Friday, August 04, 2017 1:18 PM > To: Tomcat Users List > Subject: Re: Embedded Tomcat throws FileNotFoundException for > TldScanner upgrade from 8.0.x to 8.0.x > > Hi, > > What is in your context.xml file? You can find it in conf directory. > > Regards, > > On 4 August 2017 at 08:43, S Abirami <s.abir...@ericsson.com> wrote: > > > Hi , > > > > I am using Embedded tomcat to create webapp. when I am trying > > to add web app it is throwing the following exception but Server > > started successfully. > > However,I need to eradicate this exception from the log. > > > > java.io.FileNotFoundException: /var/lib/jide-grids.jar (No such file > > or > > directory) > > at java.util.zip.ZipFile.open(Native Method) > > at java.util.zip.ZipFile.<init>(ZipFile.java:219) > > at java.util.zip.ZipFile.<init>(ZipFile.java:149) > > at java.util.jar.JarFile.<init>(JarFile.java:166) > > at java.util.jar.JarFile.<init>(JarFile.java:130) > > at org.apache.tomcat.util.scan.JarFileUrlJar.<init>( > > JarFileUrlJar.java:60) > > at org.apache.tomcat.util.scan.JarFactory.newInstance( > > JarFactory.java:49) > > at org.apache.tomcat.util.scan.StandardJarScanner.process( > > StandardJarScanner.java:334) > > at org.apache.tomcat.util.scan.StandardJarScanner.scan( > > StandardJarScanner.java:284) > > at org.apache.jasper.servlet.TldScanner.scanJars( > > TldScanner.java:262) > > at org.apache.jasper.servlet.TldScanner.scan(TldScanner. > java:106) > > at org.apache.jasper.servlet.JasperInitializer.onStartup( > > JasperInitializer.java:101) > > at org.apache.catalina.core.StandardContext.startInternal( > > StandardContext.java:5303) > > at org.apache.catalina.util.LifecycleBase.start( > > LifecycleBase.java:145) > > at org.apache.catalina.core.ContainerBase.addChildInternal( > > ContainerBase.java:753) > > at org.apache.catalina.core.ContainerBase.addChild( > > ContainerBase.java:729) > > at org.apache.catalina.core.StandardHost.addChild( > > StandardHost.java:717) > > > > > > The above exception I am getting nearly for 10 jars in that some of > > the jars already have with version in name (Eg: jide-grids-3.3.jar) > > I tried to disable the scan by following steps but none worked out. > > > > 1)tomcat.util.scan.StandardJarScanFilter.jarsToSkip = sonic_*.jar in > > conf/exclusion.list > > > > 2) ContextConfig contextConfig = new ContextConfig() { > > private boolean invoked = false; > > > > @Override > > public void lifecycleEvent(LifecycleEvent event) { > > if (!invoked) { > > StandardJarScanner scanner = new > StandardJarScanner(); > > scanner.setScanClassPath(false); > > scanner.setScanManifest(false); > > ((Context) event.getLifecycle()). > > setJarScanner(scanner); > > invoked = true; > > } > > super.lifecycleEvent(event); > > } > > }; > > Tomcat.getServer().addLifecycleListener(contextconfig); > > Tomcat.addwebapp(contextpath,docpath) > > > > 3)Context context= Tomcat.addwebapp(contextpath,docpath); > > StandardJarScanner scanner=new StandardJarScanner(); > > scanner.setScanClassPath( false ); scanner.setScanManifest( false ); > > context.setJarScanner(scanner); > > > > > > Please help me here to resolve the problem. > > > > Regards, > > Abirami.S > > >