Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

M. Manna
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
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:[hidden email]]
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 <[hidden email]> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

M. Manna
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 <[hidden email]> 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:[hidden email]]
> 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 <[hidden email]> 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
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
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:[hidden email]]
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 <[hidden email]> 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:[hidden email]]
> 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 <[hidden email]> 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
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

M. Manna
So if you don't want to scan jar, do you still need that Jar scanner in the
context? All you have done in the code above, is disabled the jar scanner.

Do you want to try without adding the jarscanner to the context? Or try the
following:

JarScanner jsc = new JarScanner() {
 public void scan(ServletContext arg0, ClassLoader arg1,
                JarScannerCallback arg2, Set<String> arg3) {
        // DUMMY NOTHING
}
};
context.setJarScanner(jsc);


On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:

> 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:[hidden email]]
> 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 <[hidden email]> 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:[hidden email]]
> > 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 <[hidden email]> 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
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
Hi

I tried that also .Still it's giving the same error msg. Please help me to solve the issue.

Regards,
Abirami.S

-----Original Message-----
From: M. Manna [mailto:[hidden email]]
Sent: Friday, August 04, 2017 2:24 PM
To: Tomcat Users List
Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

So if you don't want to scan jar, do you still need that Jar scanner in the context? All you have done in the code above, is disabled the jar scanner.

Do you want to try without adding the jarscanner to the context? Or try the
following:

JarScanner jsc = new JarScanner() {
 public void scan(ServletContext arg0, ClassLoader arg1,
                JarScannerCallback arg2, Set<String> arg3) {
        // DUMMY NOTHING
}
};
context.setJarScanner(jsc);


On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:

> 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:[hidden email]]
> 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 <[hidden email]> 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:[hidden email]]
> > 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 <[hidden email]> 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
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
Hi ,

To be more clear

Context context= Tomcat.addwebapp(contextpath,docpath);

JarScanner jsc = new JarScanner() {
 public void scan(ServletContext arg0, ClassLoader arg1,
                JarScannerCallback arg2, Set<String> arg3) {
        // DUMMY NOTHING
}
};
context.setJarScanner(jsc);



but the method call of = Tomcat.addwebapp(contextpath,docpath); itself triggering this exception.
So whatever I need to do before addwebapp.

Regards,
Abirami.S
-----Original Message-----
From: S Abirami
Sent: Friday, August 04, 2017 3:08 PM
To: Tomcat Users List
Subject: RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

Hi

I tried that also .Still it's giving the same error msg. Please help me to solve the issue.

Regards,
Abirami.S

-----Original Message-----
From: M. Manna [mailto:[hidden email]]
Sent: Friday, August 04, 2017 2:24 PM
To: Tomcat Users List
Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

So if you don't want to scan jar, do you still need that Jar scanner in the context? All you have done in the code above, is disabled the jar scanner.

Do you want to try without adding the jarscanner to the context? Or try the
following:

JarScanner jsc = new JarScanner() {
 public void scan(ServletContext arg0, ClassLoader arg1,
                JarScannerCallback arg2, Set<String> arg3) {
        // DUMMY NOTHING
}
};
context.setJarScanner(jsc);


On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:

> 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:[hidden email]]
> 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 <[hidden email]> 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:[hidden email]]
> > 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 <[hidden email]> 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
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

markt
On 04/08/17 10:49, S Abirami wrote:

<snip/>

> but the method call of = Tomcat.addwebapp(contextpath,docpath); itself triggering this exception.
> So whatever I need to do before addwebapp.

From the Javadoc:
This is equivalent to adding a web application to Tomcat's webapps
directory. The equivalent of the default web.xml will be applied to the
web application and any WEB-INF/web.xml and META-INF/context.xml
packaged with the application will be processed normally. Normal web
fragment and javax.servlet.ServletContainerInitializer processing will
be applied.

It looks like you either want:
To specify more config in META-INF/context.xml

which is exactly what you'd do if running on a standard Tomact instance
or use:

addWebapp(Host, String, String, LifecycleListener)

which will give you more control over the configuration because you can
provide the LifecycleListener or you want one of the addContext()
methods which won't do anything automatically and requires you to set
everything programmatically.

Mark

>
> Regards,
> Abirami.S
> -----Original Message-----
> From: S Abirami
> Sent: Friday, August 04, 2017 3:08 PM
> To: Tomcat Users List
> Subject: RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x
>
> Hi
>
> I tried that also .Still it's giving the same error msg. Please help me to solve the issue.
>
> Regards,
> Abirami.S
>
> -----Original Message-----
> From: M. Manna [mailto:[hidden email]]
> Sent: Friday, August 04, 2017 2:24 PM
> To: Tomcat Users List
> Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x
>
> So if you don't want to scan jar, do you still need that Jar scanner in the context? All you have done in the code above, is disabled the jar scanner.
>
> Do you want to try without adding the jarscanner to the context? Or try the
> following:
>
> JarScanner jsc = new JarScanner() {
>  public void scan(ServletContext arg0, ClassLoader arg1,
>                 JarScannerCallback arg2, Set<String> arg3) {
>         // DUMMY NOTHING
> }
> };
> context.setJarScanner(jsc);
>
>
> On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:
>
>> 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:[hidden email]]
>> 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 <[hidden email]> 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:[hidden email]]
>>> 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 <[hidden email]> 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
>>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

M. Manna
In reply to this post by S Abirami
Can you please post your entire Tomcat code? I.e. how you are instantiating
Tomcat just before you had the JarScanner code.
Send us the full code don't keep anything.

On 4 August 2017 at 10:49, S Abirami <[hidden email]> wrote:

> Hi ,
>
> To be more clear
>
> Context context= Tomcat.addwebapp(contextpath,docpath);
>
> JarScanner jsc = new JarScanner() {
>  public void scan(ServletContext arg0, ClassLoader arg1,
>                 JarScannerCallback arg2, Set<String> arg3) {
>         // DUMMY NOTHING
> }
> };
> context.setJarScanner(jsc);
>
>
>
> but the method call of = Tomcat.addwebapp(contextpath,docpath); itself
> triggering this exception.
> So whatever I need to do before addwebapp.
>
> Regards,
> Abirami.S
> -----Original Message-----
> From: S Abirami
> Sent: Friday, August 04, 2017 3:08 PM
> To: Tomcat Users List
> Subject: RE: Embedded Tomcat throws FileNotFoundException for TldScanner
> upgrade from 8.0.x to 8.0.x
>
> Hi
>
> I tried that also .Still it's giving the same error msg. Please help me to
> solve the issue.
>
> Regards,
> Abirami.S
>
> -----Original Message-----
> From: M. Manna [mailto:[hidden email]]
> Sent: Friday, August 04, 2017 2:24 PM
> To: Tomcat Users List
> Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner
> upgrade from 8.0.x to 8.0.x
>
> So if you don't want to scan jar, do you still need that Jar scanner in
> the context? All you have done in the code above, is disabled the jar
> scanner.
>
> Do you want to try without adding the jarscanner to the context? Or try the
> following:
>
> JarScanner jsc = new JarScanner() {
>  public void scan(ServletContext arg0, ClassLoader arg1,
>                 JarScannerCallback arg2, Set<String> arg3) {
>         // DUMMY NOTHING
> }
> };
> context.setJarScanner(jsc);
>
>
> On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:
>
> > 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:[hidden email]]
> > 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 <[hidden email]> 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:[hidden email]]
> > > 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 <[hidden email]> 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
> > > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
In reply to this post by markt
HI Thomas,

Thanks for the response.
It worked for me.

Regards,
Abirami.S

-----Original Message-----
From: Mark Thomas [mailto:[hidden email]]
Sent: Friday, August 04, 2017 3:30 PM
To: users >> Tomcat Users List
Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

On 04/08/17 10:49, S Abirami wrote:

<snip/>

> but the method call of = Tomcat.addwebapp(contextpath,docpath); itself triggering this exception.
> So whatever I need to do before addwebapp.

From the Javadoc:
This is equivalent to adding a web application to Tomcat's webapps directory. The equivalent of the default web.xml will be applied to the web application and any WEB-INF/web.xml and META-INF/context.xml packaged with the application will be processed normally. Normal web fragment and javax.servlet.ServletContainerInitializer processing will be applied.

It looks like you either want:
To specify more config in META-INF/context.xml

which is exactly what you'd do if running on a standard Tomact instance or use:

addWebapp(Host, String, String, LifecycleListener)

which will give you more control over the configuration because you can provide the LifecycleListener or you want one of the addContext() methods which won't do anything automatically and requires you to set everything programmatically.

Mark

>
> Regards,
> Abirami.S
> -----Original Message-----
> From: S Abirami
> Sent: Friday, August 04, 2017 3:08 PM
> To: Tomcat Users List
> Subject: RE: Embedded Tomcat throws FileNotFoundException for
> TldScanner upgrade from 8.0.x to 8.0.x
>
> Hi
>
> I tried that also .Still it's giving the same error msg. Please help me to solve the issue.
>
> Regards,
> Abirami.S
>
> -----Original Message-----
> From: M. Manna [mailto:[hidden email]]
> Sent: Friday, August 04, 2017 2:24 PM
> To: Tomcat Users List
> Subject: Re: Embedded Tomcat throws FileNotFoundException for
> TldScanner upgrade from 8.0.x to 8.0.x
>
> So if you don't want to scan jar, do you still need that Jar scanner in the context? All you have done in the code above, is disabled the jar scanner.
>
> Do you want to try without adding the jarscanner to the context? Or
> try the
> following:
>
> JarScanner jsc = new JarScanner() {
>  public void scan(ServletContext arg0, ClassLoader arg1,
>                 JarScannerCallback arg2, Set<String> arg3) {
>         // DUMMY NOTHING
> }
> };
> context.setJarScanner(jsc);
>
>
> On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:
>
>> 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:[hidden email]]
>> 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 <[hidden email]> 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:[hidden email]]
>>> 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 <[hidden email]> 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
>>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

S Abirami
In reply to this post by markt
Hi Thomas,

Thanks for the response.
It worked for me.

Regards,
Abirami.S

-----Original Message-----
From: Mark Thomas [mailto:[hidden email]]
Sent: Friday, August 04, 2017 3:30 PM
To: users >> Tomcat Users List
Subject: Re: Embedded Tomcat throws FileNotFoundException for TldScanner upgrade from 8.0.x to 8.0.x

On 04/08/17 10:49, S Abirami wrote:

<snip/>

> but the method call of = Tomcat.addwebapp(contextpath,docpath); itself triggering this exception.
> So whatever I need to do before addwebapp.

From the Javadoc:
This is equivalent to adding a web application to Tomcat's webapps directory. The equivalent of the default web.xml will be applied to the web application and any WEB-INF/web.xml and META-INF/context.xml packaged with the application will be processed normally. Normal web fragment and javax.servlet.ServletContainerInitializer processing will be applied.

It looks like you either want:
To specify more config in META-INF/context.xml

which is exactly what you'd do if running on a standard Tomact instance or use:

addWebapp(Host, String, String, LifecycleListener)

which will give you more control over the configuration because you can provide the LifecycleListener or you want one of the addContext() methods which won't do anything automatically and requires you to set everything programmatically.

Mark

>
> Regards,
> Abirami.S
> -----Original Message-----
> From: S Abirami
> Sent: Friday, August 04, 2017 3:08 PM
> To: Tomcat Users List
> Subject: RE: Embedded Tomcat throws FileNotFoundException for
> TldScanner upgrade from 8.0.x to 8.0.x
>
> Hi
>
> I tried that also .Still it's giving the same error msg. Please help me to solve the issue.
>
> Regards,
> Abirami.S
>
> -----Original Message-----
> From: M. Manna [mailto:[hidden email]]
> Sent: Friday, August 04, 2017 2:24 PM
> To: Tomcat Users List
> Subject: Re: Embedded Tomcat throws FileNotFoundException for
> TldScanner upgrade from 8.0.x to 8.0.x
>
> So if you don't want to scan jar, do you still need that Jar scanner in the context? All you have done in the code above, is disabled the jar scanner.
>
> Do you want to try without adding the jarscanner to the context? Or
> try the
> following:
>
> JarScanner jsc = new JarScanner() {
>  public void scan(ServletContext arg0, ClassLoader arg1,
>                 JarScannerCallback arg2, Set<String> arg3) {
>         // DUMMY NOTHING
> }
> };
> context.setJarScanner(jsc);
>
>
> On 4 August 2017 at 09:35, S Abirami <[hidden email]> wrote:
>
>> 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:[hidden email]]
>> 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 <[hidden email]> 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:[hidden email]]
>>> 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 <[hidden email]> 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
>>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Loading...