If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > JDBC problems in getConnection: Column (site) not found

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-30-07, 06:26
clara_italy clara_italy is offline
Registered User
 
Join Date: Aug 2007
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 08-30-07, 14:26
Tyveleyn Tyveleyn is offline
Registered User
 
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 14:31.
Reply With Quote
  #3 (permalink)  
Old 08-31-07, 05:25
clara_italy clara_italy is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 08-31-07, 07:53
Tyveleyn Tyveleyn is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 08-31-07, 09:52
clara_italy clara_italy is offline
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old 08-31-07, 10:49
Tyveleyn Tyveleyn is offline
Registered User
 
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
File Type: txt onconfig.txt (11.1 KB, 146 views)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On