|
|
|
|||||
|
error running Java server on XP
I am trying to run the Hello Server in Java. Initially the code would not compile because I didnot have the ice.jar in the classpath. ( I had the directory in the classpath as mentioned in the documentation - 3.4 - Writing an Ice application with Java and it doesn't work). Once I added the jar, I went past compilation and ended up with error below.
F:\iceproject>set ICEJ_HOME=F:\IceJ-1.0.0 F:\iceproject>javac -d classes -classpath classes;F:/IceJ-1.0.0/lib/ice.jar -sou rce 1.4 Server.java HelloI.java generated/*.java F:\iceproject>javac -d classes -classpath classes;F:/IceJ-1.0.0/lib/ice.jar -sou rce 1.4 Client.java HelloI.java generated/*.java F:\iceproject>java -classpath classes;F:/IceJ-1.0.0/lib/ice.jar;. Server Ice.SyscallException error = 0 at Ice.PropertiesI.load(PropertiesI.java:171) at Server.main(Server.java:37) Caused by: java.io.FileNotFoundException: config (The system cannot find the fil e specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.jav a:103) at java.io.FileInputStream.<init>(FileInputStream.jav a:66) at java.io.FileReader.<init>(FileReader.java:39) at Ice.PropertiesI.load(PropertiesI.java:165) ... 1 more F:\iceproject>java -version java version "1.4.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92) Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode) |
|
||||||
|
Hi,
Quote:
Quote:
Regards, Matthew |
|
|||||
|
Mark/Mathew,
I don't see a config file under demo/Ice/hello. There is a config directory under ICEJ_ROOT. I downloaded the following file IceJ-1.0.0.zip. Can you confirm if this zip file includes the config file under demo/Ice/hello. Mark, Thanks for the advice about upgrading Java. I will try to find time to do that. thanks, Dipak |
|
||||||
|
It's definitely in the .zip file:
[...] 6641 02-04-03 17:32 IceJ-1.0.0/demo/Ice/hello/Client.java 549 02-04-03 17:32 IceJ-1.0.0/demo/Ice/hello/Hello.ice 860 02-04-03 17:32 IceJ-1.0.0/demo/Ice/hello/HelloI.java 1638 02-04-03 17:32 IceJ-1.0.0/demo/Ice/hello/Server.java 1630 02-04-03 17:32 IceJ-1.0.0/demo/Ice/hello/build.xml 1117 02-06-03 18:56 IceJ-1.0.0/demo/Ice/hello/config <--- here it is [...] |
|
|||||
|
Somehow I missed this file when I unzipped the zip file. I started the server and then ran the client and ended up with this error.
F:\IceJ-1.0.0\demo\Ice\hello>java -classpath classes;F:\IceJ-1.0.0\lib\ice.jar C lient usage: t: send greeting as twoway o: send greeting as oneway O: send greeting as batch oneway d: send greeting as datagram D: send greeting as batch datagram f: flush all batch requests T: set a timeout S: switch secure mode on/off s: shutdown server x: exit ?: help ==> t Ice.ConnectFailedException error = 0 at IceInternal.Network.doConnect(Network.java:205) at IceInternal.TcpConnector.connect(TcpConnector.java :30) at IceInternal.OutgoingConnectionFactory.create(Outgo ingConnectionFactor y.java:254) at Ice._ObjectDelM.setup(_ObjectDelM.java:322) at Ice.ObjectPrxHelper.__getDelegate(ObjectPrxHelper. java:697) at HelloPrxHelper.sayHello(Unknown Source) at HelloPrxHelper.sayHello(Unknown Source) at Client.run(Unknown Source) at Client.main(Unknown Source) Caused by: java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketC hannelImpl.java:334 ) at IceInternal.Network.doConnect(Network.java:177) ... 8 more |
|
|||||
|
I have downloaded java 1.4.1 and the sample seems to work for TCP. However if i use the option 'd' on the client it throws the following exception. Do I need to change something so that the server accepts UDP connections? I am attaching the trace of my server and client sessions.
warning: connection exception: Ice.SocketException error = 0 at IceInternal.UdpTransceiver.read(UdpTransceiver.jav a:150) at IceInternal.Connection.read(Connection.java:676) at IceInternal.ThreadPool.read(ThreadPool.java:654) at IceInternal.ThreadPool.run(ThreadPool.java:604) at IceInternal.ThreadPool.access$100(ThreadPool.java: 17) at IceInternal.ThreadPool$EventHandlerThread.run(Thre adPool.java:886) Caused by: java.net.PortUnreachableException at sun.nio.ch.DatagramChannelImpl.receive0(Native Method) at sun.nio.ch.DatagramChannelImpl.receiveIntoNativeBu ffer(DatagramChann lImpl.java:185) at sun.nio.ch.DatagramChannelImpl.receive(DatagramCha nnelImpl.java:174) at sun.nio.ch.DatagramChannelImpl.receive(DatagramCha nnelImpl.java:122) at IceInternal.UdpTransceiver.read(UdpTransceiver.jav a:141) ... 5 more Caused by: java.net.PortUnreachableException at sun.nio.ch.DatagramChannelImpl.receive0(Native Method) at sun.nio.ch.DatagramChannelImpl.receiveIntoNativeBu ffer(DatagramChann lImpl.java:185) at sun.nio.ch.DatagramChannelImpl.receive(DatagramCha nnelImpl.java:174) at sun.nio.ch.DatagramChannelImpl.receive(DatagramCha nnelImpl.java:122) at IceInternal.UdpTransceiver.read(UdpTransceiver.jav a:141) at IceInternal.Connection.read(Connection.java:676) at IceInternal.ThreadPool.read(ThreadPool.java:654) at IceInternal.ThreadPool.run(ThreadPool.java:604) at IceInternal.ThreadPool.access$100(ThreadPool.java: 17) at IceInternal.ThreadPool$EventHandlerThread.run(Thre adPool.java:886) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Duplicate naming error while running slice2java | Sameerrele | Help Center | 3 | 10-02-2006 09:52 AM |
| encoding error when Ice java client get string from Ice c++ server | casper | Help Center | 1 | 09-16-2005 04:01 AM |
| Error running allTests.py (certificate problem?) | PeteH | Help Center | 1 | 03-09-2005 03:28 AM |
| err: java Server | jschina | Help Center | 3 | 10-26-2004 02:47 AM |
| running sample server error on rh9 | a2234 | Help Center | 1 | 10-12-2004 11:50 PM |