Invalid ASF API parameters
Posted in 2013
Rafael couldn't connect a Tomcat 4 / Java 1.5 app to Informix 11 via JDBC, getting "com.informix.asf.IfxASFException: Invalid ASF API input parameters" using a URL that relied on SQLH_TYPE=FILE/SQLH_FILE with a group entry in /etc/sqlhost. Fernando pointed out the URL syntax was wrong (missing slashes/port), but trying variations didn't help; Hrvoje suggested the error usually indicates a problem with the sqlhosts file and asked for its permissions/contents. Rafael noted the same setup works under Java 6/Tomcat 6 with a newer driver, suspecting a driver version issue. No resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Networking & sqlhosts Configuration, Java & JDBC Development, Internationalization & Character Sets
Hi there,
I trying to connect a tomcat4 - Java 1.5 app to informix11 database, but after
starting tomcat, got an error:
com.informix.asf.IfxASFException: Invalid ASF API input parameters.
My Datasource looks like
<Resource name="jdbc/MyDatasource" type="javax.sql.DataSource"
maxActive="10" maxIdle="2" maxWait="10000"
validationQuery="select count(*) from systables"
driverClassName="com.informix.jdbc.IfxDriver"
url="jdbc:informix-sqli:/bbdd:informixserver=ids_ddd;
user=user;
password=passwd;
CLIENT_LOCALE=es_ES.8859-15;
DB_LOCALE=es_ES.8859-15;SQLH_TYPE=FILE;
SQLH_FILE=/etc/sqlhost;
ENABLE_HDRSWITCH=true"/>
And the /etc/sqlhost file looks like
ids_ddd group - - i=8
ids_dddf onsoctcp 10.1.x.x 50011 g=ids_ddd
ids_dddp onsoctcp 10.1.x.x 50011 g=ids_ddd
Any Idea? What can I look for?
Thanks,
Rafael
Your URL does not contain a port number...
Regards
On Wed, Feb 6, 2013 at 5:45 PM, RAFAEL SEGOVIA <rafael.segovia@fi2net.es>wrote:
> Hi there,
>
> I trying to connect a tomcat4 - Java 1.5 app to informix11 database, but
> after
> starting tomcat, got an error:
>
> com.informix.asf.IfxASFException: Invalid ASF API input parameters.
>
> My Datasource looks like
>
> <Resource name="jdbc/MyDatasource" type="javax.sql.DataSource"
> maxActive="10" maxIdle="2" maxWait="10000"
> validationQuery="select count(*) from systables"
> driverClassName="com.informix.jdbc.IfxDriver"
> url="jdbc:informix-sqli:/bbdd:informixserver=ids_ddd;
> user=user;
> password=passwd;
> CLIENT_LOCALE=es_ES.8859-15;
> DB_LOCALE=es_ES.8859-15;> SQLH_TYPE=FILE;
> SQLH_FILE=/etc/sqlhost;
> ENABLE_HDRSWITCH=true"/>
>
> And the /etc/sqlhost file looks like
>
> ids_ddd group - - i=8
> ids_dddf onsoctcp 10.1.x.x 50011 g=ids_ddd
> ids_dddp onsoctcp 10.1.x.x 50011 g=ids_ddd
>
> Any Idea? What can I look for?
>
> Thanks,
>
> Rafael
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--047d7bdcad2660f38b04d511fea2
I should have been more precise. An Informix URL uses the format:
jdbc:informix-sqli://hostname:portnumber/database:INFORMIXSERVER=panther
Example:
jdbc:informix-sqli://pacman:1540/sysmaster:INFORMIXSERVER=panther
Regards
On Wed, Feb 6, 2013 at 5:52 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Your URL does not contain a port number...
> Regards
>
> On Wed, Feb 6, 2013 at 5:45 PM, RAFAEL SEGOVIA
> <rafael.segovia@fi2net.es>wrote:
>
> > Hi there,
> >
> > I trying to connect a tomcat4 - Java 1.5 app to informix11 database, but
> > after
> > starting tomcat, got an error:
> >
> > com.informix.asf.IfxASFException: Invalid ASF API input parameters.
> >
> > My Datasource looks like
> >
> > <Resource name="jdbc/MyDatasource" type="javax.sql.DataSource"
> > maxActive="10" maxIdle="2" maxWait="10000"
> > validationQuery="select count(*) from systables"
> > driverClassName="com.informix.jdbc.IfxDriver"
> > url="jdbc:informix-sqli:/bbdd:informixserver=ids_ddd;
> > user=user;
> > password=passwd;
> > CLIENT_LOCALE=es_ES.8859-15;
> > DB_LOCALE=es_ES.8859-15;> > SQLH_TYPE=FILE;
> > SQLH_FILE=/etc/sqlhost;
> > ENABLE_HDRSWITCH=true"/>
> >
> > And the /etc/sqlhost file looks like
> >
> > ids_ddd group - - i=8
> > ids_dddf onsoctcp 10.1.x.x 50011 g=ids_ddd
> > ids_dddp onsoctcp 10.1.x.x 50011 g=ids_ddd
> >
> > Any Idea? What can I look for?
> >
> > Thanks,
> >
> > Rafael
> >
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
>
> --047d7bdcad2660f38b04d511fea2
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--f46d043d6771e653ec04d51213ce
The port number is defined in the sqlhost file
On Wed, Feb 6, 2013 at 5:45 PM, RAFAEL SEGOVIA <rafael.segovia@fi2net.es>wrote: > > url="jdbc:informix-sqli:/bbdd:informixserver=ids_ddd; > The syntax is: jdbc:informix-sqli://[ {ip-address|host-name} : {port-number|server-name} ] [/dbname] :INFORMIXSERVER=servername [{;user=user;password=password] So... 1- You're missing a "/" 2- The syntax makes us think that if you specify a hostname/ip you must specify a port number. So I assume "/bbdd" is the database name Apparently just a missing "/". Can you check? -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --bcaec501624194ed3e04d5125e0f
Sorry, id doesn´t seem to be the problem, I have tried with 1, 2 and 3 '/' in the URL, but still same exception. I believe it may be the driver version, but still I do not have documentation about this exception. Any other ideas? Thanks Rafael
Is your sqlhosts file: /etc/sqlhost Can you execute: ls -l /etc/sqlhost cat /etc/sqlhost AFAIK "Invalid ASF API input parameters." error is thrown if there's problem with sqlhosts file. HTH Hrvoje On 8.2.2013. 13:00, RAFAEL SEGOVIA wrote: > Sorry, id doesn´t seem to be the problem, I have tried with 1, 2 and 3 '/' in > the URL, but still same exception. I believe it may be the driver version, but > still I do not have documentation about this exception. Any other ideas? > > Thanks > > Rafael > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
sqlhost file seems ok. We have several environments, one of them is JAVA6 / TOMCAT6 with latest version of driver, it works fine there. Maybe it's something to do with version of driver ( it does not work with java1.5 / tomcat5 / old version of driver, neither with java1.5 / tomcat4 / old version of driver). I do not know hot to proceed... any further ideas?
ls -l /etc/sqlhost ? H On 12.2.2013. 10:45, RAFAEL SEGOVIA wrote: > sqlhost file seems ok. > > We have several environments, one of them is JAVA6 / TOMCAT6 with latest > version of driver, it works fine there. > > Maybe it's something to do with version of driver ( it does not work with > java1.5 / tomcat5 / old version of driver, neither with java1.5 / tomcat4 / > old version of driver). > > I do not know hot to proceed... any further ideas? > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >