To avoid classpath issues, I would recommend to first try your code and put all the needed jars inside the lib/optional folder of smx (and ensure that there is no jars in your SU). Once this work, you can take care of the classloading issues..
On 6/29/07, Michal Palička <[EMAIL PROTECTED]> wrote:
Hello, is it possible to use Spring @Transactional annotations together with ServiceMix lightweight container component? I am not able to configure my service unit. The service unit stores some data to a relational database (HSQLDB) using Hibernate and Spring DAO layer. If the "servicemix.xml" contains the <tx:annotation-driven> element, then errors occur during deployment. (1) Firstly, ServiceMix could not find several AOP-related classes from Spring. I had to add "spring-aop-2.0.1.jar" and "aopalliance-1.0.jar" to SERVICEMIX/lib directory. (2) During deployment another error occured: java.lang.ClassNotFoundException: org.springframework.transaction.annotation.AnnotationsTransactionAttributeSource in classloader org.springframework.transaction.annotation.AnnotationsTransactionAttributeSource (3) This looked like a classloader problem, so I tried to reverse the classloader order in servicemix.xml: <classpath inverse="true"/> (4) This didn't help either: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from file [servicemix.xml]; nested exception is java.lang.IllegalArgumentException: Class [org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does not implement the NamespaceHandler interface (5) It seems that the code contains some class incopatibility - probably a classloader issue. I also put "aspectjrt.jar" and "aspectjweaver.jar" in "SERVICEMIX/lib" but the problem still persists. --- Did anyone manage to combine LWC with annotation driven transactions? Thanks in advance for help. mp.
-- Cheers, Guillaume Nodet ------------------------ Principal Engineer, IONA Blog: http://gnodet.blogspot.com/
