Re: Bugs Informix Jdbc Drivers...
Posted in 2000
Hi Ben,
I have installed Sun JVM for Linux.
I confirm the version : INFORMIX-Universal Server Version 9.14.UC6
I can't send you my servlet ... it's too big !
But i use the connection like that :
static DBConnectionManager connMgr = DBConnectionManager.getInstance();
protected int getNoPays(String c_pays) throws SQLException
{
int no_pays = -1;
PreparedStatement pst = null;
ResultSet rs = null;
Connection con = null;
con = connMgr.getConnection("Informix");
if (con != null)
{
pst = con.prepareStatement("SELECT no_pays FROM t_pays WHERE cod_pays = ?;");
pst.setString(1, c_pays);
rs = pst.executeQuery();
if (rs.next() == true)
{
int tmp = rs.getInt(1);
no_pays = tmp;
}
}
else throw new SQLException("Connection au pool echoue : Client.getNoPays("+c_pays+")");
try { if (rs != null) { rs.close(); rs=null; }} catch (SQLException E) {}
try { if (pst != null) { pst.close(); pst=null; }} catch (SQLException E) {}
connMgr.freeConnection("Oracle", con);
return (no_pays);
}
For my problem I lost the connection : con is null !
regards,
/Franck Andriano
Ben Wilde wrote:
> Hi Franck,
>
> Can you post a copy of the Servlet code and the stack trace(s) that you get
> from it. Can you also confirm the version of Informix you are using,
> 9.14.UC6? and which JVM you are using (Blackdown JVM or Sun JVM for Linux)
> (it will all help in terms of trying to repo this).
>
> regards
>
> ben
>
> "Franck Andriano" <franck.andriano@travelprice.com> wrote in message
> news:399BF6F9.C944CDAA@travelprice.com...
> > Hi,
> >
> > I have installed Informix V9.4.UC6 on Mandrake 7.1 and the last version
> (2.11) of informix Jdbc Driver.
> > I have developped a servlet java with JDK 1.2.2 and Jsdk2.0 that
> communicate with Informix...
> > For my developpment I have a dbspace that link some tables on other
> dbspace by the command :
> > create synonym t_pays for xdbspace:t_pays;> >
> > Every things work well if i make different select in dbaccess ! Cool !
> > But I lost my connections in my servlet when I call a synonym table and
> after a simple table in my dbspace.
> > Differents messages appeared during different process (but it's always
> same the request):
> > - Column (no_pays) not found in any table in the query (! it's a synonym
> table)
> > - The connection to my pool is dead (connexion is null)
> > - etc ...
> >
> > What wrong in Jdbc Driver ?
> >
> > Another bug in Jdbc Driver when the time is 00:00:00 (hh:mm:ss) that crash
> my SQL request !!!
> >
> > /Franck Andriano
> >
> >
> >
> >