开发者

How to use a jar that uses Spring in common lib?

开发者 https://www.devze.com 2022-12-17 14:22 出处:网络
I\'m really new to Spring and I\'m not sure if I\'m doing it the right way. Here\'s my prob : I\'ve exported a jar which uses Spring 2.5 to inject dependency to a class in another project called \"bu

I'm really new to Spring and I'm not sure if I'm doing it the right way. Here's my prob :

I've exported a jar which uses Spring 2.5 to inject dependency to a class in another project called "business". There's an accessor which uses ClassPathXmlApplicationContext to get the bean.

I've placed that jar in the common/lib of JBoss 4.2.

In a webapp, in a jsp, I get the accessor, and then call a method with it. The compilation is fine, but when I reach the jsp, I have a NoClassDefFound on ClassPathXmlApplicationContext.

If I move the jar from the common/lib in the webapp/lib, I then have an java.lang.ClassNotFou开发者_Python百科ndException: org.acegisecurity.AccessDeniedException.

How can I make it work? Or is there another way to doing so?


You seem to be dependent on spring-security somehow. Download the spring-security jar.

0

精彩评论

暂无评论...
验证码 换一张
取 消