• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

informix connection to linux

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I have a url in a java file which is connectiong to database setup on linux

url is jdbc:informix-sqli://sc.px-dc.dl.com :5100/cb:INFORMIXSERVER=cc

Now I am getting following exception.
here I am assuming that as database and file is on same linux server so user name and password for database is not required.
network is running.database is up.and on command line i just login to linux machine and i can access database using dbaccess command means no seprate user name and password for database.only linux user name i used.


any idea


com.dhl.auditdatamgr.exceptions.DatabaseException: Unable to connect to database.
at com.dhl.auditdatamgr.utils.db.DriverDBService.getConnection(DriverDBService.java:61)
at com.dhl.auditdatamgr.dao.AuditDAO.setDetailedAuditData(AuditDAO.java:60)
at com.dhl.auditdatamgr.process.AuditDataHandler.main(AuditDataHandler.java:105)
Caused by: java.sql.SQLException: com.informix.asf.IfxASFException: Attempt to connect to database server (cc) failed.
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:1026)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:79)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:43)
at java.lang.reflect.Constructor.newInstance(Constructor.java:313)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:254)
at java.sql.DriverManager.getConnection(DriverManager.java:538)
at java.sql.DriverManager.getConnection(DriverManager.java:210)
at com.dhl.auditdatamgr.utils.db.DriverDBService.getConnection(DriverDBService.java:55)
... 2 more

regards
 
Bartender
Posts: 1093
19
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DBAccess (and i4gl / isql ) use the settings in the $INFORMIXDIR/etc/sqlhosts file (for example TCP/IP) to connect to the database. I don't remember how these tools authenticate (maybe you have to be in the INFORMIX group). If you are logged in as the informix user, then you are the DBA - and no authentication is required (other than the normal UNIX).

Connecting by using JDBC, is a different protocol. You will need to supply a user and password for a database user who has the correct database schema rights.

Which version of Informix are you connecting to? Sorry I cannot be more helpful, but I'm a few thousand miles from my Informix manuals (and it�s been a while since I used it)... Have you checked the IBM web site?
IBM bought Infomix becasue DB2 is so slow... [Sorry about that - could not resist it ).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic