Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
602 views
in Technique[技术] by (71.8m points)

java - jar: Package org.apache.catalina.ssi missing from ModulePackages class file attribute

I changed my tomcat version 9 to 8 but when I wrote jar uf ../catalina.jar org/apache/catalina/util/ServerInfo.properties it gave me the following error

jar: Package org.apache.catalina.ssi missing from ModulePackages class file attribute

How can I solve this issue?

question from:https://stackoverflow.com/questions/65870630/jar-package-org-apache-catalina-ssi-missing-from-modulepackages-class-file-attr

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Had the same issue. Upgraded from apache 9.0.16 to 9.0.41, wanted to remove server version/infos, edited ServerInfo.properties, and when time came to jar uf ../catalina.jar org/apache/catalina/util/ServerInfo.properties got the same error than you.

I think I found the why : I opened catalina.jar both on 9.0.16 and 9.0.41, and lo and behold : there is no ssi in org/apache/catalina/ for 9.0.41 Yet the MANIFEST.MF still includes it, as well as the module-info.class

From reading Tomcat changelog, it looks like this happened with tomcat 9.0.30 : Moved server-side include (SSI) module into a separate JAR library. (schultz) (looking in the lib directory, it seems like it is catalina-ssi.jar now)

Not sure how clean this is, but I went around the problem by opening catalina.jar with 7zip, modify the ServerInfo.properties from there, saved, restarted Tomcat, and it worked.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...