IBM - old/WAS 문제&해결

ebSphere 6.0.2 + EJB + Ibatis 에서 Transaction Error

freeman98 2016. 5. 6. 20:56

1. WAS 버전 : WebSphere ND v6.0.2 + EJB + Ibatis

2. OS : X

3. Error 발생 시점 : Ejb상에서 단순 update나 insert는 잘되는데 select만 하면 아래와 같은 에러가 발생

4. Error message :
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException:  ; nested exception is:
 com.ibm.websphere.csi.CSITransactionRolledbackException:   vmcid: 0x0  minor code: 0  completed: No
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled Code))
 at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
 at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:341)
 at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:805)
 at javax.rmi.CORBA.Util.copyObject(Util.java:333)
 at com.scfb.hanaro.bl.ejb._EjbDelegator_Stub.delegate(_EjbDelegator_Stub.java:267)
 at com.scfb.hanaro.bl.target.EJBServiceTarget.execute(EJBServiceTarget.java:12)
 at com.scfb.hanaro.bl.target.ServiceExecutor.execute(ServiceExecutor.java:25)
 at com.scfb.hanaro.bl.target.ServiceExecutor.execute(ServiceExecutor.java:16)
 at com.scfb.hanaro.ba.broker.ServiceBrokerServlet.doPost(ServiceBrokerServlet.java:51)
 at com.scfb.hanaro.ba.broker.ServiceBrokerServlet.doGet(ServiceBrokerServlet.java:31)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
 at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
 at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1802)
 at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:469)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:408)
 at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)
 at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
 at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
 at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
 at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1455)

5. 예상 이유 : Ibatis 를 위한 transactionManager 설정이 잘못되어 있어서

6. 조치 방안 : sql-map-config에서 transactionManager를 하단과 같이 변경

       <transactionManager commitRequired="true"  type="EXTERNAL">
            <property name="DefaultAutoCommit" value="false"/>
            <property name="SetAutoCommitAllowed" value="false"/>
            <dataSource type="JNDI">
          <property name="DataSource" value="hanaroOracleDS"/>
            </dataSource>
        </transactionManager>

참조 : http://ikinox.tistory.com/category/java