createSession issue

I tried to create a java application using my Rational Application Developer to access a domino server. I used NotesFactory.createSession(“server.address.com”, “username”, “password”).

The problem I have, is the command always failing because it cannot make connection to my server. It always resolve the server name to use the local ip address, instead using the external ip address.

If I use ping from my laptop, the system return the correct IP address (which is an external address, 207.7…)

My question is, why Rational Application Developer always use internal address, instead of ip address from DNS (which is external).

I hope this makes sense.

Thanks a lot for your help

Subject: createSession issue

i can only guess…what about proxy settings in the rational app?may be rational does not have access to an external nameserver so that the ip will always be a local one.

if rational might get through a proxy to an external dns the ip may be correct.

found at http://64.233.183.104/search?q=cache:-_SmQbHADVEJ:editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5225/%24FILE/5225_EXP.pdf+Rational-Application-Developer+proxy+settings&hl=de

Tip: If you’re running within an intranet that uses a firewall to access

the Internet, you might need to specify a proxy server in your Work-

bench preferences in order to access the finance.yahoo.com Web site.

To specify a proxy server, select Window

Preferences, and then

select Internet – Proxy Settings in the list of Preferences. Check the

Enable proxy check box and enter the proxy host name and port (the

same values you’d specify in a Web browser to access the Internet). If

the proxy is a SOCKS server, check the Use SOCKS check box. If

necessary, also enter authentication values for the proxy

hth

so far alex

Subject: RE: createSession issue

Thanks for the response.

However, I did not use proxy server. Here is the error message that I got when I run the application from within RAD.

NotesException: Could not open Notes session: org.omg.CORBA.COMM_FAILURE: java.net.SocketException: Operation timed out: connect:could be due to invalid address Host: 192.168.0.68 Port: 63148 vmcid: 0x0 minor code: 1 completed: No

at lotus.domino.cso.Session.initSession(Unknown Source)

at lotus.domino.cso.Session.<init>(Unknown Source)

at lotus.domino.cso.Session.createSession(Unknown Source)

at lotus.domino.NotesFactory.createSessionUP(Unknown Source)

at lotus.domino.NotesFactory.createSession(Unknown Source)

at com.swift.form.Form1099.createNotesDocument(Form1099.java:40)

at com.swift.form.Form1099.main(Form1099.java:72)

If I ping the server, the address of the server is 207.7… instead of the 192.168… address.

I am confused where does java get the 192.168 address from? The 192.168 address is the internal address of the server.

Thanks in advance.

Subject: Take a look at the server configuration

The DIIOP task advertises itself and it may be configured incorrectly or it’s selecting the wrong address by default. On the domino server console use the command “tell diiop show config” and look for the Public IP Address/DNS name entry. This can be changed in the server document or the internet site documents.

Here’s some reference material for this area of the product:

Java access to the Domino Objects, Part 1
An introduction to Domino Objects for Java programmers, this article covers the basics of local and remote access, then addresses access control. This article focuses on developing Java applications.

Java access to the Domino Objects, Part 2
Part 2 of 2: This article covers advanced topics in developing Java applications using Domino Objects including SSL encryption, servlets, connection pooling, single sign-on, session timeouts, and recycling, and suggests some troubleshooting techniques.

Subject: RE: Take a look at the server configuration

Yeah, you are correct. I need to create Internet Site Documents for IIOP. After I created the document, everything works fine.

Thanks a lot for the responses