You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sabari Gandhi <SG...@kivasystems.com> on 2013/09/05 23:00:00 UTC

Tomcat class loading with index.list - invalid jar index exception

All:

I am facing an invalid jar index exception in both tomcat 5.5.x and 7.0.39 . After some investigation , we figured out this is because of class loading in tomcat which uses  index.list file in jar files. I have two jars with same package names but classes in those package are different. Since the package name are defined or mentioned in the index.list file of every jar for some reason tomcat is showing me an invalid jar index exception even if try to load  a simple index.jsp.

Any suggestions to overcome this is greatly appreciated. Thanks !!

Thanks and Regards,
Sabari




Re: Tomcat class loading with index.list - invalid jar index exception

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Sabari,

On 9/6/13 2:01 PM, Sabari Gandhi wrote:
> Thanks for the response. The issue we were facing is when we are 
> tying to access  a simple index.jsp file which is deployed on 
> tomcat.
> 
> I am sure java handles the libraries properly since tomcat is a 
> component in our system and all other components are working fine. 
> This issue is very particular to tomcat where it detects a
> duplicate package name across jar files and throws an invalid jar
> index exception.And also as you have mentioned I regenerate all the
> jar files using maven/jenkins build before deploying.

Stack trace?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSKkFOAAoJEBzwKT+lPKRYpTIQAIiGrig75t4iIpNsLKhk3dif
OIgbMEcP+/sxAG3k4RehPBodRbQGO2JGZc3xBHOi9Vsy+YIy2O4sxGzdDJS9ko4a
aEPkPOB4ofvd6Ybv6wgHgC3BasrAvv2SB9qQOoST7J44GOQ84xw/B3u0ImV8D4ca
SV4DQO/Eo7QcWJHtYMfOMBzW6EW1RlDjQj96lszd9Tt0Y3r3cVm2I9laS92/hxRg
0T+vtDCrfzU9je3/Iusv+zEEXN6FZQZkM3nvTvuygwfFWKAwlee6n1VLdK1l3VMa
KT7QDDYGx5qSj9wPu/XD8jwdwbB9oAKfF8B9cIkPrNYBU0uSws8IgO1070DxnNwG
tazR/qUjZ5BcqqE7ZXNWJYhwSE62WRdvWYmJyzGFkjIMxONovc2s5BK5h60BZQda
O3uzRbiVxiljW0IyU56yi20D37kUPuTHkh/VYZSAb3p91PbqIq4cbB+dItSjfYxE
D2ytiL6zaaK0SSVAZeHQBlSPVquC5FSeTHjhjAn6K9OcJsEcbDLIRNHrA4FYaUNC
22pnnhwet/8pxPitMGOVlcFpg2mvQy1KwRWR+WlXACOY6EdtcRSy3QA+C3xliJ55
VHEwYPJuKR3sIPwsZMfPsCmBQZ17APigVD8dlbVexPKHdxQKJ54bxsn8wUO1sEch
N47YoHzMewBKm1MQsVwe
=ZKn4
-----END PGP SIGNATURE-----

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


Re: Tomcat class loading with index.list - invalid jar index exception

Posted by Sabari Gandhi <SG...@kivasystems.com>.
Mark:

Thanks for the response. The issue we were facing is when we are tying to access  a simple index.jsp file which is deployed on tomcat.

I am sure java handles the libraries properly since tomcat is a component in our system and all other components are working fine. This issue is very particular to tomcat where it detects a duplicate package name across jar files and throws an invalid jar index exception.And also as you have mentioned I regenerate all the jar files using maven/jenkins build before deploying.

Thanks and Regards,
SG



On Sep 5, 2013, at 5:55 PM, Mark Thomas wrote:

On 05/09/2013 22:00, Sabari Gandhi wrote:
All:

I am facing an invalid jar index exception in both tomcat 5.5.x and
7.0.39 . After some investigation , we figured out this is because of
class loading in tomcat which uses  index.list file in jar files. I
have two jars with same package names but classes in those package
are different. Since the package name are defined or mentioned in the
index.list file of every jar for some reason tomcat is showing me an
invalid jar index exception even if try to load  a simple index.jsp.

Any suggestions to overcome this is greatly appreciated. Thanks !!

Your jar indexes are broken. They need to be re-generated for all the
JAR files in in one go so that the package mappings are correct.

The error you are seeing is from the JRE code, not from Tomcat.

Mark

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



Re: Tomcat class loading with index.list - invalid jar index exception

Posted by Mark Thomas <ma...@apache.org>.
On 05/09/2013 22:00, Sabari Gandhi wrote:
> All:
> 
> I am facing an invalid jar index exception in both tomcat 5.5.x and
> 7.0.39 . After some investigation , we figured out this is because of
> class loading in tomcat which uses  index.list file in jar files. I
> have two jars with same package names but classes in those package
> are different. Since the package name are defined or mentioned in the
> index.list file of every jar for some reason tomcat is showing me an
> invalid jar index exception even if try to load  a simple index.jsp.
> 
> Any suggestions to overcome this is greatly appreciated. Thanks !!

Your jar indexes are broken. They need to be re-generated for all the
JAR files in in one go so that the package mappings are correct.

The error you are seeing is from the JRE code, not from Tomcat.

Mark

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