On 7/28/05, Thomas Franke <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> we want to connect to IDS 9.4 with OJB.
> Here is our repository_database.xml:
> 
> 
> <jdbc-connection-descriptor
>     jcd-alias="mis"
>     default-connection="true"
>     platform="Informix"
>     jdbc-level="2.0"
>     driver="com.informix.jdbc.IfxDriver"
>     protocol="jdbc"
>     subprotocol="informix-sqli"
>     dbalias="//10.43.181.206:9135/wis:INFORMIXSERVER=wis_prod"
>     username="miswqq"
>     password="jkz68jngr"
>     eager-release="false"
>     batch-mode="false"
>     useAutoCommit="1"
>     ignoreAutoCommitExceptions="false"
> >
> 
> If we start our server we get this exception:
> 
> [org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR:
> Instantiation of jdbc driver failed null
> java.lang.ClassCastException
>         at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:266)
>         at java.sql.DriverManager.getConnection(Unknown Source)
>         at java.sql.DriverManager.getConnection(Unknown Source)
> 
> 
> If we trace the connection between our application and the data base we can 
> see
> that the application tries to connect the database server with the connection
> type oltlitcp and the data base server answers olsoctcp.
> 
> I think that means that the data base server expected soc. Therefore it is
> unpossible to get a connection, isn't it?
> 
> We use the IBM Informix JDBC Driver 3.00.JC1.
> 
> Any suggestions?

I have never used Informix, but you could try to use a JNDI datasource
instead of specifying the connection directly. This way, you can use
the datasource implementation that comes with the driver. For details
on how to setup the datasource see the Informix manual:

http://publibfi.boulder.ibm.com/epubs/pdf/ct1utna.pdf

For OJB, you need to specify a JNDI datasource using the corresponding
attribute:

<jdbc-connection-descriptor
    jcd-alias="mis"
    default-connection="true"
    platform="Informix"
    jdbc-level="2.0"
    jndi-datasource-name="java:InformixDataSource"       <----
    username="miswqq"
    password="jkz68jngr"
    eager-release="false"
    batch-mode="false"
    useAutoCommit="1"
    ignoreAutoCommitExceptions="false">

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to