JtaTransactionManager depends on aopalliance.jar?
Not really a problem, I was just suprised to get the following error when using JtaTransactionManager programmatically with the following bean defintion (I only had spring.jar in my classpath):
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager" />
The error was:
Code:
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'transactionManager' defined in class path resource [com/somepackage/ApplicationContext.xml]: Class that bean class [org.springframework.transaction.jta.JtaTransactionManager] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/AspectException
java.lang.NoClassDefFoundError: org/aopalliance/aop/AspectException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:50)
...
I added aopalliance.jar to my classpath and it took care of the problem. Is it expected that this is a required dependency? Is it generally accepted that we should add all the supporting libs to the classpath, or just add them piecemeal as dependencies show themselves through errors like this?
Cheers,
Tim