ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eOk <...@vodafone.ie>
Subject iBatis, Informix, JNDI and Sun One Web Server
Date Wed, 29 Jun 2005 16:42:47 GMT
Hey,

Firstly sorry about the long email.

I have been working happily with iBatis for some time until now :( I 
have been tasked with connecting to a database (Informix) that I have 
very little or limited visibility. The table and the selects I have to 
do are very straight forward however I can't even get as far as getting 
a connection?

I am using Sun WebServer 6.1 and I am getting the follwing error

        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:280)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
        at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
        at 
com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
        at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
----- Root Cause -----
java.lang.ClassCastException
        at 
com.sun.enterprise.resource.JdbcAllocator.<init>(JdbcAllocator.java:58)
        at 
com.sun.enterprise.resource.JdbcDataSource.getAllocator(JdbcDataSource.java:234)
        at 
com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:200)
        at 
com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:132)
        at 
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
        at 
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
        at 
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:119)
        at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610)
        at 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584)
        at com.ibatis.sqlmap.engine.impl.SqlMapSession

I have enclosed my configs, any help would be greatly appreciated :(

sqlmapconfig.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 
2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
    <settings cacheModelsEnabled="true" enhancementEnabled="true" 
maxSessions="64" maxTransactions="8" maxRequests="128"/>
    <transactionManager type="JDBC">
        <dataSource type="JNDI">
            <property name="DataSource" value="java:comp/env/jdbc/kinny"/>
        </dataSource>
    </transactionManager>
    <sqlMap resource="ie/gimme/persistence/sqlmapdao/sql/Jinny.xml"/>
</sqlMapConfig>

server.xml

<JDBCCONNECTIONPOOL
            name="jinnyjdbcpool"
            
datasourceclassname="com.informix.jdbcx.IfxConnectionPoolDataSource"
            steadypoolsize="8"
            maxpoolsize="200"
            poolresizequantity="2"
            idletimeout="300"
            maxwaittime="60000"
            connectionvalidationrequired="off"
            connectionvalidationmethod="auto-commit"
            validationtablename=""
            failallconnections="off"
            transactionisolationlevel="read-uncommitted"
            isolationlevelguaranteed="off">
            <PROPERTY name="serverName" value="somehost"/>
            <PROPERTY name="portNumber" value="1526"/>
            <PROPERTY name="User" value="informix"/>
            <PROPERTY name="Password" value="informix"/>
          </JDBCCONNECTIONPOOL>
          <JDBCRESOURCE jndiname="jdbc/kinny" poolname="kinnyjdbcpool" 
enabled="on"/>

Mime
View raw message