Discussion:
Exception: com.informix.asf.IfxASFException
(too old to reply)
Leo
2005-01-21 10:57:15 UTC
Permalink
Hi,
I'm newbie with informix and I have to develop a java application that
will have to connect to Informix.
It will be running with Informix 5 SE ( with Informix NET ) on AIX
4.3.3

Ihave set the environement variable
INFORMIXDIR,INFORMIXSERVER,SQLEXEC...
I'v launched $INFORMIXDIR/lib/sqlexecd -l logfile

When I try to connect to Informix with the following url
I've a problem with the url
"jdbc:informix-sqli://myhost:1533/testDB:INFORMIXSERVER=myserver;user=rdtest;password=test"
I have the following error
MESSAGE:com.informix.asf.IfxASFException
java.sql.SQLException: com.informix.asf.IfxASFException
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:950)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:243)
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:216)
at DBConnection.main(DBConnection.java:102)
In the log file, I have : ^A\^A< myhost M-^@A


When I use the url "jdbc:informix-sqli://myhost:1533/testDB:INFORMIXSERVER=myserver;USEV5SERVER=1;user=rdtest;password=test"
Exception in thread "main" java.lang.ClassCastException:
java.lang.NoSuchMethodError
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:247)
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:216)
at DBConnection.main(DBConnection.java:102)
In the log file, I have :sqlexec myhost rdtest -p

Any idea?
Thanks.
superboer
2005-01-26 08:00:22 UTC
Permalink
ahum sorry about my prev responce; did not see that this is V5.

if V5 and the daemon is started using sqlexecd
and there is no sqlhost file then the service will be
sqlexec, INFORMIXSERVER=<yourhostname>

so try
jdbc:informix-sqli://myhost:1533/testDB:INFORMIXSERVER=myhost;UESV5SERVER=1;user=rdtest;password=test
am not sure about this-----------^^^^^^

it would be nice to see what the error# is so try and catch it...

e.getErrorCode()
e.getMessage()


Superboer.
When I use the url "jdbc:informix-sqli://myhost:1533/testDB:INFORMIXSERVER=myserver;UESV5SERVER=1;user=rdtest;password=test"
java.lang.NoSuchMethodError
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:247)
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:216)
at DBConnection.main(DBConnection.java:102)
In the log file, I have :sqlexec myhost rdtest -p
Any idea?
Thanks.
Loading...