Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

java.net.ConnectException: Connection refused

843834Nov 29 2002 — edited Dec 13 2002
Hi,

I have deployed a webservice on Weblogic7 .I have written a sample client to access this webservice .I am able to access the service from the local box,without any problem.

When i try to access the service with the client from a remote machine i am gettting the following error message.

If anyone could suggest a solution to this problem ,it would be of great help to me..

Thanx in advance ..

java.net.ConnectException: Connection refused: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at weblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
lientBinding.java:412)
at weblogic.webservice.binding.soap.HttpClientBinding.createSocket(HttpC
lientBinding.java:390)
at weblogic.webservice.binding.soap.HttpClientBinding.send(HttpClientBin
ding.java:246)
at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
ndler.java:34)
at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
:131)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:417)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:359)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
at weblogic.jws.proxies.SessionManagementServiceSoap_Stub.login(SessionM
anagementServiceSoap_Stub.java:129)
at weblogic.jws.proxies.SessionManagementServiceSoap_Stub.login(SessionM
anagementServiceSoap_Stub.java:155)
at FOClient.main(FOClient.java:77)
javax.xml.rpc.JAXRPCException: Failed to send request:java.net.ConnectException:
Connection refused: no further information
at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHa
ndler.java:37)
at weblogic.webservice.core.HandlerChain.handleRequest(HandlerChain.java
:131)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:417)
at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.jav
a:359)
at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:225)
at weblogic.jws.proxies.SessionManagementServiceSoap_Stub.login(SessionM
anagementServiceSoap_Stub.java:129)
at weblogic.jws.proxies.SessionManagementServiceSoap_Stub.login(SessionM
anagementServiceSoap_Stub.java:155)
at FOClient.main(FOClient.java:77)
Exception in handler's handleRequest().

Comments

What are you trying to run?
What platform are you on?
Where is your JDeveloper installed?
488269
OK, sorry, should have been more specific.

I'm running on Windows XP Professional SP1.
My JDeveloper is installed in C:\Program Files\JDev
I started getting this error when running projects that worked in JDev 9.0.5
I then created a new Web Project with one simple JSP (no taglibs and no code, just some text in the body) and still get the error on that.

The entire text of the error I get is:

[Starting OC4J using the following ports: HTTP=8988, RMI=23791, JMS=9227.]

**** Unable to obtain password from principals.xml. Using default.

C:\Program Files\JDev\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config>

"C:\Program Files\JDev\jdk\bin\javaw.exe" -ojvm "-Doracle.home=C:\Program Files\JDev" -classpath "C:\Program Files\JDev\j2ee\home\oc4j.jar;C:\Program Files\JDev\jdev\lib\jdev-oc4j-embedded.jar" -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config "C:\Program Files\JDev\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config\server.xml"

[waiting for the server to complete its initialization...]

06/02/05 11:30:47 java.net.ConnectException: Connection timed out: connect

06/02/05 11:30:47 at java.net.PlainSocketImpl.socketConnect(Native Method)

06/02/05 11:30:47 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

06/02/05 11:30:47 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

06/02/05 11:30:47 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

06/02/05 11:30:47 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)

06/02/05 11:30:47 at java.net.Socket.connect(Socket.java:507)

06/02/05 11:30:47 at java.net.Socket.connect(Socket.java:457)

06/02/05 11:30:47 at java.net.Socket.<init>(Socket.java:365)

06/02/05 11:30:47 at java.net.Socket.<init>(Socket.java:207)

06/02/05 11:30:47 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)

06/02/05 11:30:47 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)

06/02/05 11:30:47 at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1091)

06/02/05 11:30:47 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:951)

06/02/05 11:30:47 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)

06/02/05 11:30:47 at java.lang.Thread.run(Thread.java:595)

06/02/05 11:30:47 Oracle Containers for J2EE 10g (10.1.3.0.0) initialized

Any help is appreciated.
Reinstall JDeveloper in a directory that doesn't have a space in it's path. (e.g not in program files, but rather in c:\jdev1013). Then create a new project and let us know if the problem is still there.
488269
Yes, that was the problem. I moved it to c:\Jdev and worked fine.

Thanks a ton! I was about ready to give up on it.
448717
Hello Every One,
I'm facing the same problem using older version of Jdeveloper (Jdev10.1.2)
I tried ur solution but it didn't work
My OS is Windows Server 2003
My Jdeveloper Home is D:\jdev1012

and the exception I get is here:

[waiting for the server to complete its initialization...]

06/02/22 13:34:09 Auto-deploying file:/D:/jdev1012/jdev/mywork/Application3/ViewController/public_html/ (New server version detected)...

06/02/22 13:34:31 java.net.ConnectException: Connection timed out: connect

06/02/22 13:34:31 at java.net.PlainSocketImpl.socketConnect(Native Method)

06/02/22 13:34:31 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)

06/02/22 13:34:31 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)

06/02/22 13:34:31 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)

06/02/22 13:34:31 at java.net.Socket.connect(Socket.java:452)

06/02/22 13:34:31 at java.net.Socket.connect(Socket.java:402)

06/02/22 13:34:31 at java.net.Socket.<init>(Socket.java:309)

06/02/22 13:34:31 at java.net.Socket.<init>(Socket.java:153)

06/02/22 13:34:31 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)

06/02/22 13:34:31 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)

06/02/22 13:34:31 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1629)

06/02/22 13:34:31 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)

06/02/22 13:34:31 at java.lang.Thread.run(Thread.java:534)

06/02/22 13:34:31 Oracle Application Server Containers for J2EE 10g (10.1.2.0.0) initialized
488269
I found that I got this error when I didn't have enough available memory to run the application. By removing a bunch of my startup options and closing all other programs (including internet connection) I was able to use JDev with 512K memory. Since then I've upgraded with more memory and no problems.
4172
Hello,
I getting the some error in my JDev 10.1.3 with Service Update 2. I already check all suggestions from previous forum threads, but without any luck. It's very strange, because i only have problems when work from home (connection to internet via wireless router). At the company (Ethernet connection to internet), it works OK. Please help.

My computer: IBM ThinkPad R52 ; Window XP SP2 (Firewall is ON) ; JDev 10.1.3 + SU2

Regards,
Matic

06/04/17 09:40:32 java.net.ConnectException: Connection timed out: connect
06/04/17 09:40:32 at java.net.PlainSocketImpl.socketConnect(Native Method)
06/04/17 09:40:32 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
06/04/17 09:40:32 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
06/04/17 09:40:32 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
06/04/17 09:40:32 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
06/04/17 09:40:32 at java.net.Socket.connect(Socket.java:507)
06/04/17 09:40:32 at java.net.Socket.connect(Socket.java:457)
06/04/17 09:40:32 at java.net.Socket.<init>(Socket.java:365)
06/04/17 09:40:32 at java.net.Socket.<init>(Socket.java:207)
06/04/17 09:40:32 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.sendMessage(Oc4jNotifier.java:98)
06/04/17 09:40:32 at oracle.jdevimpl.runner.oc4j.Oc4jNotifier.postInitApplicationServer(Oc4jNotifier.java:55)
06/04/17 09:40:32 at com.evermind.server.ApplicationServer.serverExtensionPostInit(ApplicationServer.java:1091)
06/04/17 09:40:32 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:951)
06/04/17 09:40:32 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
06/04/17 09:40:32 at java.lang.Thread.run(Thread.java:595)
antonio.gagliardi
Hello, i've got the same problem of connection time out.

This is my solution/workaround: disable the second network card!

I don't know why but, in a pc with 2 network card (generally a wifi card and an ethernet) embedded OC4J running inside JD choose the wrong host ip ( you can see the mistake Tool->Embedded OC4J Server Preferences->StartUp LocalHostFullName ) even if you set it manually .

If you run the server form command with ....\jdevstudiobase\jdev\bin\start_oc4j.bat all works fine but not inside JD.

So the workaround is to leave only one network card.

Regards
Antonio.
1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 10 2003
Added on Nov 29 2002
2 comments
743 views