Ritesh_RM
Ritesh_RM

Reputation: 15

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

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

Upvotes: 0

Views: 855

Answers (1)

ehsavoie
ehsavoie

Reputation: 3517

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.

Upvotes: 1

Related Questions