Re: java connection to IDS
Posted in 1999
Hi,
Are you sure your server release supports Socket TCP API ?
Try changing onsoctcp to ontlitcp.
If this will not help, could you post the DBSERVERNAME, DBSERVERALIASES
and NETTYPE parameters from your ONCONFIG file ?
Best Regards,
Octav
On Thu, Jul 29, 1999 at 02:44:29PM +1000, james wrote:
> Hi Octav
>
> Thanks for your help with this.
> I tried doing this and itresults in the following error :-
>
> onint: Fatal error in initializing ASF with
> 'ASF_INT_DATA' flags; asfcode='25507'
>
> Any ideas on this one,
> thanks,
> james.
>
>
> >My understanding is you have no server listening to port 1521 ?
> >If I'm right you could just add the interface2 server name
> >to your DBSERVERALIASES parameter in ONCONFIG and restart the
> >server.
> >
> >Best Regards,
> >Octav
> >
> >On Thu, Jul 29, 1999 at 12:29:16AM +1000, james wrote:
> >> Hi,
> >>
> >> Yet another question on how to connect java to IDS.
> >>
> >> /etc/services conatins a line :-
> >> thingo 1521/tcp
> >>
> >> /usr/informix/etc/sqlhosts conatins a couple of lines :-
> >> interface1 onipcshm mycomputer on_server
> >> interface2 onsoctcp mycomputer thingo> >>
> >> CLASSPATH = /usr/java/lib/classes.zip:
> >> /usr/informix/lib/java/lib/driver/lib/ifxjdbc.jar:.
> >>
> >> INFORMIXDIR = /usr/informix
> >> INFORMIXDIR = interface1
> >> INFORMIXSQLHOSTS = /usr/informix/etc/sqlhosts
> >>
> >> The java program says :-
> >>
> >> Class.forName("com.informix.jdbc.IfxDriver");
> >>
> >> This runs OK.
> >>
> >> Then the connection bit says :-
> >>
> >> Connection connection = DriverManager.getConnection("
> >>
> >>"jdbc:informix-sqli://mycomputer:1521/databasename:informixserver=interface1;use
> >> r=me;password=mine");
> >>
> >> This results in an SQLException :-
> >> Attempt to connect to database server ( Java socket exception encounted:
> >> connection refused ) failed.
> >>
> >> The IDS ( Solaris 2.6 with the java 1.6 running on the same box ) is
> >> on-line OK, but what gets it listening on 1521 as nothing shows in netstat
> >> -a ? The interface2 produces the same result.
> >>
> >> thanks,
> >> james ( jamesb at nelsonbay dot com ).
--
Octav Chiriac Phone: (373) 2 22 99 67
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 22 84 88
Moldova, Republic of mailto:com@netinfo-moldova.com