You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Franke <fr...@softenergy.de> on 2005/07/28 14:25:24 UTC
Informix
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?
Thank you for your help!
Regards,
Thomas
--
Mit freundlichen Grüßen
Thomas Franke
Geschäftsführer
Leiter Entwicklung
------------------------------
the energy for a better world
------------------------------
softEnergy GmbH
Platz der Freundschaft 1
18059 Rostock
------------------------------
fon: +49 381 40 587 535
fax: +49 381 40 587 555
mobil: +49 162 249 8860 (Achtung neue Nummer!)
http://www.softenergy.de
mail: info@softenergy.de
------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Informix
Posted by Thomas Franke <fr...@softenergy.de>.
Thomas Dudziak wrote:
> For OJB, you need to specify a JNDI datasource using the corresponding
> attribute:
Thank you, Tom. I try it. :)
Regards,
Thomas
--
Mit freundlichen Grüßen
Thomas Franke
Geschäftsführer
Leiter Entwicklung
------------------------------
the energy for a better world
------------------------------
softEnergy GmbH
Platz der Freundschaft 1
18059 Rostock
------------------------------
fon: +49 381 40 587 535
fax: +49 381 40 587 555
mobil: +49 162 249 8860 (Achtung neue Nummer!)
http://www.softenergy.de
mail: info@softenergy.de
------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Informix
Posted by Thomas Dudziak <to...@gmail.com>.
On 7/28/05, Thomas Franke <fr...@softenergy.de> 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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org