1. $JEUS_HOME/lib/datasource 디렉토리에 TIBERO JDBC 드라이버 jar 파일을 복사 한다.

($TIBERO_HOME/client/lib 디렉토리에 있음)


2. JEUSMain.xml 을 설정 한다.


<resource>
<data-source>
<database>
<!-- JEUS5 fix23 이전 -->
<!--
<vendor>others</vendor>
-->

 <!-- JEUS5 fix23 이후 --> 

<vendor>tibero</vendor>

<export-name>jdbc/datasource</export-name>
<data-source-class-name>
com.tmax.tibero.jdbc.ext.TbConnectionPoolDataSource
</data-source-class-name>
<data-source-type>
ConnectionPoolDataSource
</data-source-type>

<!-- TIBERO SID -->
<database-name>TBSVR</database-name>

<port-number>8629</port-number>
<server-name>tbsvr</server-name>
<user>username</user>
<password>userpwd</password>
<connection-pool>
<pooling>
<min>10</min>
<max>20</max>
<step>4</step>
<period>3600000</period>
</pooling>
<wait-free-connection>
<enable-wait>false</enable-wait>
<wait-time>10000</wait-time>
</wait-free-connection>
<max-use-count>0</max-use-count>
<dba-timeout>-1</dba-timeout>
<stmt-caching-size>-1</stmt-caching-size>
<stmt-fetch-size>-1</stmt-fetch-size>
</connection-pool>
</database>
</data-source>
</resource>


3. Unable to open a session 오류 발생 시

[2012.10.24 13:42:39][0][0_434] [container1-10] Fail to getPooledConnection in jdbc/datasource 
<<__Exception__>>
com.tmax.tibero.jdbc.TbSQLException: Unable to open a session.
at com.tmax.tibero.jdbc.msg.common.TbMsgError.readErrorStackInfo(TbMsgError.java:112)
at com.tmax.tibero.jdbc.msg.TbMsgEreply.deserialize(TbMsgEreply.java:32)
at com.tmax.tibero.jdbc.comm.TbStream.readMsg(TbStream.java:360)
at com.tmax.tibero.jdbc.comm.TbCommType4.logon(TbCommType4.java:2057)
at com.tmax.tibero.jdbc.TbConnection.openConnection(TbConnection.java:516)
at com.tmax.tibero.jdbc.TbDriver.connectInternal(TbDriver.java:73)
at com.tmax.tibero.jdbc.TbDriver.connect(TbDriver.java:52)
at com.tmax.tibero.jdbc.ext.TbDataSource.getConnection(TbDataSource.java:80)
at com.tmax.tibero.jdbc.ext.TbConnectionPoolDataSource.getPooledConnection(TbConnectionPoolDataSource.java:33)
at com.tmax.tibero.jdbc.ext.TbConnectionPoolDataSource.getPooledConnection(TbConnectionPoolDataSource.java:22)


설정에 문제가 없는데도 Unable to open a session 라는 오류가 발생한다면 현재 TIBERO 가 트라이얼 라이센스인지 확인 한다. 트라이얼 라이센스의 경우  커넥션 갯수에 제한이 있기 때문에  위와 같이<connection-pool> 아래의 <min> 값이 10일 경우 제한된 갯수를 초과하기 때문에 오류가 발생 한다.


해결방법 : 

1) <min> 값 을 3 정도로 줄여 준다.

2) 티베로 테크넷에서 데모라이센스를 발급 받는다.


+ Recent posts