You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jerry Malcolm <te...@malcolms.com> on 2020/04/05 04:10:11 UTC

jarsToSkip/jarsToScan

I've encountered some very strange behavior in a new TC instance.  It's 
not actually 'new'.  I cloned an Amazon EC2 that had a fully functional 
ApacheHTTPD/Tomcat.  I replaced the domain on the clone with a new 
domain.  Otherwise, nothing was changed. I use JSTL extensively on both 
the original domain and the new domain.  When I brought up TC on the 
clone EC2 with the new domain, I got an error on the first jsp saying it 
couldn't resolve the jstl taglib reference.  I'm familiar with all of 
the google posts about this message.  But all of the responses I found 
said to make sure I had the 1.2 jstl taglib jars, etc.  I verified that 
the jars were there.  And I definitely had the right version.

After several hours, I remembered to check the JarsToSkip and JarsToScan 
properties in Catalina.properties.  I hadn't touched that file in 
months, and the clone EC2 was using the same version that was working on 
the original EC2.  In all of my TC instances, I use JarsToSkip=*, and I 
list out the specific jars with TLDs on JarsToScan.  When I removed the 
JarsToSkip, it took forever to boot as expected.  But this time it did 
find the jstl taglib jars and everything worked.  I then changed the 
JarsToSkip to the massive list of jars in my application that don't have 
tag definitions.  But when I listed the jars out, the loader ignored the 
list, and still processed the listed jars continually reminding me to 
add each one to the list to skip.

The skip/scan lists are working fine on all of the other TC 
installations I manage.  But they are not working on this one new 
installation.  I've tried several variations of the skip/scan 
configurations.  The only way it seems to work as expected is if the 
skip list is "*" or if there is no skip list at all.  Listing out 
individual jars in either list is being ignored.

This is on a 8.5.x.  I did a yum update.  So I assume it's close to the 
latest point release of 8.5.  Maybe I'll have a clearer mind tomorrow 
and see something obvious.  But right now, it's making no sense.  And 
the fact that it started failing with an untouched months-old 
Catalina.properties file that had been working is a real point of 
confusion.  Is there any additional debug info I can turn on that shows 
the skip/scan lists being processed?  I've already set 
org.apache.jasper.servlet.TldScanner.level = FINEST.  It's not showing 
anything other than listing the jars it scans and the results.  What 
could be happening to cause the jar scanner to act wonky?

Here's a subset of JarsToSkip from my Catalina.properties (they are NOT 
skipped)

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
   annotations-api.jar,\
   ant-junit*.jar,\
   ant-launcher.jar,\
   ant.jar,\
   asm-*.jar,\
   aspectj*.jar,\
   bootstrap.jar,\
<<etc>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jarsToSkip/jarsToScan

Posted by Mark Thomas <ma...@apache.org>.
On 05/04/2020 17:44, Jerry Malcolm wrote:
> What am I missing?

You found:
https://bz.apache.org/bugzilla/show_bug.cgi?id=63691
(the likely cause)

but I suspect you missed:
https://bz.apache.org/bugzilla/show_bug.cgi?id=64247
(the fix for the regression)

unless you were looking at recently fixed issues. The CI version of the
changelog is useful for that (in conjunction with open issues in Bugzilla).

https://ci.apache.org/projects/tomcat/tomcat85/docs/changelog.html

Bugzilla still seems to be down. I'm taking a look at that now.

You should be able to find the details in the dev archives although that
will take a little more digging than accessing Bugzilla directly.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jarsToSkip/jarsToScan

Posted by Jerry Malcolm <te...@malcolms.com>.
On 4/5/2020 2:20 AM, Mark Thomas wrote:
> On 05/04/2020 05:10, Jerry Malcolm wrote:
>
> <snip/>
>
>> This is on a 8.5.x.  I did a yum update.  So I assume it's close to the
>> latest point release of 8.5.  Maybe I'll have a clearer mind tomorrow
>> and see something obvious.
> Did you look in the changelog?
>
> Hint: search for "jarsToSkip"
>
> Mark
>
Thanks, Mark.

The change log says to skip scanning if the skip parameter is set to 
"*".  It doesn't say to ignore jarsToScan if jarsToSkip=*.  If the 
design is intended to ignore jarsToScan override if jarsToSkip=* it 
seems to me that it defeats the whole purpose.  Is that the intended new 
design to ignore jarsToScan if jarsToSkip=*?  (I tried clicking the link 
to the defect, but it times out and I can't view it)  The change log 
also does not explain why it ignores the jar files that are specifically 
listed in jarsToSkip if they are listed individually.  With the new 
design, if I have a 'billion' jar files and want to scan 5 of them, what 
is the correct way to define them?

Maybe I'm not understanding the release numbering philosophy.  I was 
under the impression that a minor (8.5.xx) update was only for cleanup 
and bug fixes and should never require code changes on my part to 
continue running.  I do yum updates by habit often.  I may be doing it 
wrong, but I have been trusting that a yum update of minor releases of 
products are safe with existing client products.  I'm really surprised 
that a minor point release of 8.5 would include a change that is 
intended to start ignoring a parameter that was honored in the previous 
point release (jarsToScan).  Maybe that was not intended.  But from 
everything I can tell, that's what is happening.  My functioning code 
broke when I did the update.

What am I missing?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jarsToSkip/jarsToScan

Posted by Mark Thomas <ma...@apache.org>.
On 05/04/2020 05:10, Jerry Malcolm wrote:

<snip/>

> This is on a 8.5.x.  I did a yum update.  So I assume it's close to the
> latest point release of 8.5.  Maybe I'll have a clearer mind tomorrow
> and see something obvious.

Did you look in the changelog?

Hint: search for "jarsToSkip"

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org