Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    3

    Unanswered: JDBC problems in getConnection: Column (site) not found

    Hi all.
    I'm trying to connect to a informix db using jdbc, and I don't understand what is wrong. This is my connection string:
    Connection conn = DriverManager.getConnection("jdbc:informix-sqli://10.1.4.158:11111:INFORMIXSERVER=cms;database=cms;u ser=usercms;password=pwdcms");

    When I try to connect, I got the following error on the previous instruction:
    java.sql.SQLException: Column (site) not found in any table in the query (or SLV is undefined).

    Anybody could help me please?
    I quite don't know where could be the error, because all data should be correct, and I have no error in server log.

    Thanks a lot!

    Clara

  2. #2
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi, shouldn't the connectionstring be like?:
    Code:
    "jdbc:informix-sqli://hostname:port-number/database:" + 
    "INFORMIXSERVER=servername;user=username;password=passwd";
    It's been a while since I did this but my application can connect to a IDS 7.3 workgroup with this stringformat.
    You could also check the examples in the appropriate guide here:http://www-306.ibm.com/software/data...ry/jdbc_1.html

    Regards
    Last edited by Tyveleyn; 08-30-07 at 15:31.

  3. #3
    Join Date
    Aug 2007
    Posts
    3
    Thanks for help Tyveleyn, but neither that connection string works, and I got the same error

    I'm sure that database name is correct, because if I rename database file (cms.dbs) on server, I got error "database not found or no system permission"

    I noticed a strange behaviour by INFORMIXSERVER variable: I thought it defined only the hostname, but if I change it from:
    INFORMIXSERVER=cms -> INFORMIXSERVER=only_for_test
    I got no errors; so my question is: is an important variable?

    I ask this because when informix has been installed, the hostname was different; then we have to change it for network reason, and we replace hostname in solaris config files, in informix config file and in environment variables.
    There could be any references to old name written in any binary files or so on, which cause the problem?

    Thanks again
    Clara

  4. #4
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi, what type of database do you have? Because with the multi-user versions I'm acquainted with the database parameter should not address a database file but the name of a database that is managed by the databaseserver and therefore is a logical name, not a physical one.
    The INFORMIXSERVER parameter should reflect the name of the databaseserver, that has nothing to do with the hostname. The name of the databaseserver can be obtained from the DBSERVERNAME or DBSERVERALIASES parameters in the IDS configuration file, which on Solaris should be $INFORMIXDIR/etc/$ONCONFIG. Check it out with:
    Code:
    egrep 'DBSERVERNAME|DBSERVERALIASES' $INFORMIXDIR/etc/$ONCONFIG
    And it's one of the major importance variables because over a network with this the client connect utility addresses the databaseserver it's looking for, as well as 'native' tools as dbaccess, SQL-Editor or whatever.
    If this databaseserver has a listener on the specfied service (port-number) it will respond to calls made by the client.

    Hans

  5. #5
    Join Date
    Aug 2007
    Posts
    3
    Ok, I think you have found the main problem..
    Informix server has been installed automatically by Avaya CMS, so probably informix standard configuration files are missing: there are no files called onconfig* (or something like that) in $INFORMIXDIR/etc
    There were neither a client listening on port (I have created one adding row in sqlhosts and in /etc/services/)

    Could you please send me the content of file onconfig.std so I could create it on my server?
    Thanks a lot

  6. #6
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    OK, here it is, the attachment is an onconfig.std file of an IDS 10.0 Express edition. But what puzzles me is if you can get the server on-line right now and how. Because if you can there may be an alternative way to connect to the server by JDBC. I'm not familiar with Avaya CMS so I have absolutely no clue to what kind of magic it's capable of...

    Anyway, good luck and regards,

    Hans
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •