Hi,
I am using <tx:annotation-driven /> as shown :
and the error it is giving is :Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <tx:annotation-driven/>
Code:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chatSessionDAO' defined in file [/local/jboss-eap-4.2/jboss-as/server/mercer02/deploy/mercerhr.ear/mercer.war/WEB-INF/classes/com/mercer/chat/app/dao/ChatSessionDAO.class]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: com/mercer/chat/app/dao/ChatSessionDAO$$EnhancerByCGLIB$$c2bd3f90$$FastClassByCGLIB$$bc114739, method: invoke signature: (ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Inconsistent stack height 2 != 1
here is my ChatSessionDAO class :
I am new to Spring transaction so dont have much idea about that. I am using JTA transaction ManagerCode:Repository("chatSessionDAO") @Transactional public class ChatSessionDAO extends MercerChatDAO { /** mySessionFactory */ @Autowired @Qualifier("mySessionFactory") private LocalSessionFactoryBean mySessionFactory; /** chatAlertsDO */ @Autowired @Qualifier("chatAlertsDO") private MHRContChatAlertsDO chatAlertsDO; /** * Method to retrieve chat session objects for a particular id * * @param chatSessionQO * @return * @throws MercerException */ public List<?> retrieveSessionInfo(ChatSessionQO chatSessionQO) throws MercerException { Criteria criteria = null; List<?> lstReturn = null; try { long chatSessionId = chatSessionQO.getChatSessionId(); Long chatSessionIdLong = new Long(chatSessionId); log.info("creating criteria for chatsession"); SessionFactory sessionFactory = mySessionFactory.getObject(); Session session = sessionFactory.getCurrentSession(); criteria = session.createCriteria(MHRContChatSessionDO.class, "chatSession").add( Restrictions.eq("id", chatSessionIdLong)); if (criteria != null) { lstReturn = processQuery(criteria); } } catch (Exception e) { log.error("error :::", e); throw new MercerException("No transaction"); } return lstReturn; } ..... other methods


Reply With Quote
