timmorrow
Sep 3rd, 2004, 05:31 PM
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.JtaTransaction Manager" />
The error was:
org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'transactionManager' defined in class path resource [com/somepackage/ApplicationContext.xml]: Class that bean class [org.springframework.transaction.jta.JtaTransactio nManager] 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.BeanDefi nitionReaderUtils.createBeanDefinition(BeanDefinit ionReaderUtils.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
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransaction Manager" />
The error was:
org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'transactionManager' defined in class path resource [com/somepackage/ApplicationContext.xml]: Class that bean class [org.springframework.transaction.jta.JtaTransactio nManager] 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.BeanDefi nitionReaderUtils.createBeanDefinition(BeanDefinit ionReaderUtils.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