论坛首页 入门技术论坛

ibatis 连接ORACLE 10G 的双机热备时出错 ERR=1153

浏览 5695 次
该帖已经被评为新手帖
作者 正文
   发表时间:2007-10-02  
ibatis 连接ORACLE 10G 的双机热备时出错,但是如果不用IBATIS,只用纯JDBC连接的话就不存在问题。希望得到大家的帮助。
异常描述:
Cause: java.sql.SQLException: Io 异常: Connection refused
(DESCRIPTION=
        (ERR=1153)(VSNNUM=169869568)
        (ERROR_STACK=
             (ERROR=(CODE=1153)
                    (EMFI=4)
                     (ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=主机名)(PORT=1521))')
              )
            (ERROR=(CODE=305)(EMFI=1))
       )
)

我的JDBC_URL为
jdbc:oracle:thin:@
     (DESCRIPTION =
          (ADDRESS_LIST=(LOAD_BALANCE = YES)
                        (FAILOVER = ON)
                        (ADDRESS = (PROTOCOL = TCP)
                                   (HOST = 172.5.1.19)
                                   (PORT = 1521)
                         )
                        (ADDRESS = (PROTOCOL = TCP)
                                   (HOST = 172.5.1.20)
                                   (PORT = 1521))
                         )
                         (CONNECT_DATA =(SERVER = DEDICATED)
                                        (SERVICE_NAME = WAYNET)
                                        (FAILOVER_MODE =(TYPE = SELECT)
                                                        (METHOD = BASIC)
                                                        (RETRIES = 30)
                                                        (DELAY = 5)
                                        )
                           )
           )
)


配置文件
<sqlMapConfig>

    <properties resource="ibatis-conf/DataSource.properties"/>

    <settings
        cacheModelsEnabled="true"
        enhancementEnabled="true"
        lazyLoadingEnabled="true"
        maxRequests="32"
        maxSessions="10"
        maxTransactions="5"
        useStatementNamespaces="false"
        />

    <transactionManager type="JDBC">
        <dataSource type="SIMPLE">
            <property name="JDBC.Driver" value="${MCS-driver}"/>
            <property name="JDBC.ConnectionURL" value="${MCS-url}"/>
            <property name="JDBC.Username" value="${MCS-username}"/>
            <property name="JDBC.Password" value="${MCS-password}"/>
        </dataSource>
    </transactionManager>
    <sqlMap resource="datamap/SiteDB.xml"/>

</sqlMapConfig>


   发表时间:2007-10-06  
问题已经解决,
JDBC Thin for All Platforms
    classes12.jar (1,594,191 bytes) - for use with JDK 1.2 and JDK 1.3
     ojdbc14.jar (1,540,457 bytes) - classes for use with JDK 1.4 and 1.5

使用JDK1.5。
因为使用的是classes12.jar ,所以导致报错,但是很不明白为什么用JDBC直接连接时一直不报错呢?

没注意导致的错误,引以为戒。
0 请登录后投票
   发表时间:2007-11-06  
不会哦? 我一直用的class12和jdk1.4都没错呢??
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics