2
votes

I have a requirement to load a given class via a . I'm trying read class annotations like @WebService that are mentioned in classes. But, I'm getting ClassNotFoundException since the classloader of org.apache.catalina.LifecycleListener which is the tomcat classloader cannot load classes in a webapp. Only the webapp classloader can do that.

How I can get around this issue? Should I try to load the jar file separately, and read the classes?

1
Please note that, I register the lifecycle listener via the TOMCAT_HOME/conf/context.xml - user3580723

1 Answers

0
votes

Tomcat expects this class to be available in the {catalina.base}/lib (lib directory in the tomcat installation folder).