ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eOk <...@vodafone.ie>
Subject Re: iBatis, Informix, JNDI and Sun One Web Server
Date Thu, 30 Jun 2005 07:50:06 GMT
Thanks, I tried it without using iBatis and I get the same thing :(

My mistake.

regards

Eoin

Clinton Begin wrote:

>
> Unfortunately you're going to have to look here for your problem:
>
> com.sun.enterprise.resource.JdbcAllocator.<init>(JdbcAllocator.java:58)
>
> It looks like the last thing iBATIS does is 
> DataSource.getConnection().  After that, it's all up to Sun's app 
> server.  They just open sourced it, so you might be able to get the 
> source. 
>
> My own guess is that the JNDI context is wrong, and it's retrieving an 
> object of some kind, but it's not a connection. (you could verify with 
> 3 lines of JNDI code).
>
> Cheers,
> Clinton
>
> On 6/29/05, *eOk* <eok@vodafone.ie <mailto:eok@vodafone.ie>> wrote:
>
>     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"
>     <http://www.ibatis.com/dtd/sql-map-config-2.dtd%22>>
>     <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