How to use a jar that uses Spring in common lib?
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.
精彩评论