Thimmayya
Thimmayya

Reputation: 2064

Spring 3.0 webapp NoClassDefFoundError - classpath issue

My webapp fails to find org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean class despite having org.springframework.web-3.0.2.RELEASE.jar in the WEB-INF/lib directory. If I add an older version of spring.jar(2.5.6) to the webapp, then the class is found. Any ideas why this may be occurring and how I can fix it without reverting to spring-2.5.6 or keeping both versions of spring in the same webapp?

I am deploying on Tomcat 6.0.28.

Here's the error:

Here are the spring jars in the classpath (WEB-INF/lib):

Possibly related questions:

Upvotes: 2

Views: 4015

Answers (1)

gigadot
gigadot

Reputation: 8969

NoClassDefFoundError isn't the same as ClassNotFoundException. It means the class definition used inside HttpInvokerProxyFactoryBean cannot be found, not the class itself.

In other words, all the import classes of HttpInvokerProxyFactoryBean and of its superclasses must be found in your classpath.

Since the HttpInvokerProxyFactoryBean is a subclass of org.springframework.aop.framework.ProxyFactory and ProxyFactory depends on aopalliance-1.0.jar, you will need to include this in your classpath.

Upvotes: 3

Related Questions