Getting deployment time error java.lang.NoClassDefFoundError: org/apache/tomcat/util/res/StringManager after JBOSS EAP Version Upgrade from 6.4 to 7.4

619 views Asked by At

I am trying to migrate my application server (JBOSS EAP) from 6.4 to 7.4.3. But, after migration I am getting the below error during my spring boot microservice deployment time.

Caused By: java.lang.NoClassDefFoundError: org/apache/tomcat/util/res/StringManager

Thus, after doing some research I have removed couple of essential tomcat dependencies(tomcat-embed-el-9.0.58 and tomcat-embed-websocket-9.0.58 from my maven pom and the deployment time issue has resolved. Now, I can deploy my application in my new local JBOSS EAP 7.4.3 server. But, the above mentioned two dependencies are essential and we can't exclude that as per our upper environment configuration.

Could you please give me some solutions except the above one(means without removing the tomcat dependencies) if you have faced this issue before. Thank you all!

Regards, Ritesh

1

There are 1 answers

4
ehsavoie On

EAP 7.4 is using Undertow and not Tomcat so Tomcat classes aren't available. also it is really a bad practice to depend on spec implementations internal in your code. The fix would be to remove all usage of that Tomcat class or make it part of your application.