We're running into some odd problems when trying to build a simple transactional app using Spring 2.0.5 and JDK 1.4.2.
We're trying to use the schema-based tags to set up our AOP and transactions, but whenever we include the tx:advice tag, we get this error:
For reference, our config file is below.Code:java.lang.IllegalStateException: Unable to load class [org.springframework.transaction.annotation.AnnotationTransactionAttributeSource]. Are you running on Java 1.5+? Root cause: java.lang.UnsupportedClassVersionError: org/springframework/transaction/annotation/AnnotationTransactionAttributeSource (Unsupported major.minor version 49.0)
As you can see, we're not using <tx:annotation-driven> or anything similar that requires JDK 1.5. Has anyone run into this before, and if so, how did you get around it?Code:<?xml version="1.0" encoding="UTF-8"?> <!-- Service and Transaction definitions for the Profanimator application --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> <!-- Service definitions --> <bean id="videoService" class="com.molecular.service.VideoServiceImpl"> <property name="videoDao" ref="videoDao"/> </bean> <bean id="userService" class="com.molecular.service.UserServiceImpl"> <property name="userDao" ref="userDao"/> </bean> <!-- DAOs and session factory are defined in a seperate file --> <!-- Transactional support --> <aop:config> <aop:advisor advice-ref="txAdvice" pointcut="execution(* com.molecular.service.*.*(..))"/> </aop:config> <tx:advice id="txAdvice" transaction-manager="transactionManager"/> <!-- Define the transaction manager --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> </beans>
Thanks
- Don


Reply With Quote
