org.springframework.transaction.annotation.Transactional
and not javax.transaction.Transactional
.
*
<tx:annotation-driven transaction-manager="tmNlp" />
넣어도 같음
*
org.springframework.transaction.annotation.Transactional
and not javax.transaction.Transactional
.
https://stackoverflow.com/questions/25821579/transactionrequiredexception-executing-an-update-delete-query?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
바꿨으나 같아
*
transaction = session.beginTransaction();
int result = query.executeUpdate();
transaction.commit();
성공
*transactional이 동작 안하고 있는거야.
왜?
* tx
https://stackoverflow.com/questions/10019426/spring-transactional-not-working?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
위치가 잘못됐다고..
난 context scan ,t x 모두 servlet 에 있어
순서는 xml 에서 무관할걸?
*
<context:annotation-config />
추가해도 안돼
* DAO d위에 Transactional 선언해도 안돼
https://coderanch.com/t/684651/java/javax-persistence-TransactionRequiredException-Transactional-Class
* Interface 선언 안해서
AOP 적용 안되고 있는건 아닐까.
=> 아닌데
책 500p 에도 인터페이스 구현은 안함
* service에 어놑 선언도 아냐
* 엔티티매니저 이용 필요한가?
* openSession 안된대, currentSession..
https://stackoverflow.com/questions/25821579/transactionrequiredexception-executing-an-update-delete-query?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
되네.. 시발
그 전에
// org.hibernate.HibernateException: Could not obtain transaction-synchronized Session for current thread
이건 뭐였지?
tx 선언 안해서 그랬나??
Hibernate / java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long (0) | 2018.06.07 |
---|---|
다중 트랜잭션 매니저 (0) | 2018.05.24 |
tx:annotation-driven" 요소에 대한 "tx" 접두어가 바인드되지 않았습니다. (0) | 2018.05.21 |
hibernate / SQL Error: 0, SQLState: 08001 등 (0) | 2018.05.10 |
hibernate / java.net.NoRouteToHostException: 호스트로 갈 루트가 없음 (Host unreachable) (0) | 2018.05.10 |