Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-07-2004
ponyboy ponyboy is offline
Registered User
 
 
Join Date: Apr 2004
Location: P.R. CHINA
Posts: 6
hello benoit

I encouter the same question when I run the icepack simple demo.And the
following is the detail displayed on the icepacknode monitor screen.Because
I have run the demo several times,the output is redundant.

prompt>>icepacknode --Ice.Config=config
warning: administrative endpoints `IcePack.Registry.Admin.Endpoints' enabled
[ Adapter: created server adapter `Hello-Server1' ]
[ Server: created server `Server1' ]
[ Server: changed server `Server1' state to `Activating' ]
[ Activator: activating server `Server1'
path = C:\WINDOWS\System32\java.exe
pwd =
args = -ea Server --Ice.Config=db/node/servers/Server1/config/config_server -
-Ice.Default.Locator=IcePack/Locator:default -p 12000 --Ice.ServerId=Server1 ]
[ Activator: activated server `Server1' (pid = 4000) ]
[ Server: changed server `Server1' state to `Active' ]
Exception in thread "main" java.lang.NoClassDefFoundError: Server
[ Activator: detected termination of server `Server1' ]
[ Server: changed server `Server1' state to `Deactivating' ]
[ Adapter: server adapter `Hello-Server1' deactivated ]
[ Server: changed server `Server1' state to `Inactive' ]
[ Server: changed server `Server1' state to `Activating' ]
[ Activator: activating server `Server1'
path = C:\WINDOWS\System32\java.exe
pwd =
args = -ea Server --Ice.Config=db/node/servers/Server1/config/config_server -
-Ice.Default.Locator=IcePack/Locator:default -p 12000 --Ice.ServerId=Server1 ]
[ Activator: activated server `Server1' (pid = 3444) ]
[ Server: changed server `Server1' state to `Active' ]
Exception in thread "main" java.lang.NoClassDefFoundError: Server
[ Activator: detected termination of server `Server1' ]
[ Server: changed server `Server1' state to `Deactivating' ]
[ Adapter: server adapter `Hello-Server1' deactivated ]
[ Server: changed server `Server1' state to `Inactive' ]


I have uncomment the "IceBox1" server in the application.xml.
And I encounter the errors as follow when I run the demo using jbuilderX:
Ice.NoEndpointException

proxy = "Server1 -t @ Hello-Server1"

at IceInternal.Reference.getConnection(Reference.java :646)

at Ice._ObjectDelM.setup(_ObjectDelM.java:216)

at Ice.ObjectPrxHelper.__getDelegate(ObjectPrxHelper. java:657)

at Ice.ObjectPrxHelper.ice_isA(ObjectPrxHelper.java:4 6)

at Ice.ObjectPrxHelper.ice_isA(ObjectPrxHelper.java:3 4)

at HelloPrxHelper.checkedCast(HelloPrxHelper.java:91)

at Client.run(Client.java:49)

at Client.main(Client.java:169)

Can you help me handle the problem?
__________________
chenchen
Reply With Quote
  #2 (permalink)  
Old 04-07-2004
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,541
The following trace:

Exception in thread "main" java.lang.NoClassDefFoundError: Server
[ Activator: detected termination of server `Server1' ]

indicates that the Java server couldn't be started because it couldn't find some classes (the "Server" class). Are you sure your CLASSPATH is correctly set in the environment where you start the IcePack node?

It should at least contain the following (assuming Ice is installed in C:\Ice-1.3.0):

CLASSPATH=C:\Ice-1.3.0\lib\Ice.jar;classes

Let me know if this doesn't solve your problem!

Benoit.
Reply With Quote
  #3 (permalink)  
Old 04-07-2004
ponyboy ponyboy is offline
Registered User
 
 
Join Date: Apr 2004
Location: P.R. CHINA
Posts: 6
Smile hello

The server class is in the same package with client class,and I also find the file $ICEPACK_TEST_DIRECTORY\db\node\servers\Server1\co nfig\config_server contains the following contents:

#config_server
Hello.AdapterId=Hello-Server1
Hello.Endpoints=tcp:udp
Hello.RegisterProcess=1
Ice.ProgramName=Server1
Identity=Server1

The above text show the Endpoints has been registered with "tcp:udp" .Why not can I restore it from db?confused!
__________________
chenchen
Reply With Quote
  #4 (permalink)  
Old 04-07-2004
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,541
You are getting this Ice.NoEndpointException because the IcePack node failed to start the server and therefore there's no active endpoints to talk to the object with the proxy "Server1 -t @ Hello-Server1".

We need to figure out why the server fails to start. From the traces you gave me, it's clear that it's a CLASSPATH problem:

Quote:
[ Activator: activating server `Server1'
path = C:\WINDOWS\System32\java.exe
pwd =
args = -ea Server --Ice.Config=db/node/servers/Server1/config/config_server --Ice.Default.Locator=IcePack/Locator:default -p 12000 --Ice.ServerId=Server1 ]
[ Activator: activated server `Server1' (pid = 4000) ]
[ Server: changed server `Server1' state to `Active' ]
Exception in thread "main" java.lang.NoClassDefFoundError: Server
For some reasons, the Server class isn't found. This class is located in the "classes" directory of the demo directory. It should work if you add the "classes" directory to the CLASSPATH environment variable in the terminal where you started the IcePack node and if the "classes" directory contains the "Server.class" file.

Can you try to run the demo with the following steps (I assume that Ice is installed in C:\Ice-1.3.0)?

In a first terminal:

Quote:
C:\> cd Ice-1.3.0\demo\IcePack\simple
C:\Ice-1.3.0\demo\IcePack\simple> set CLASSPATH=C:\Ice-1.3.0\lib\Ice.jar;classes;%CLASSPATH%
C:\Ice-1.3.0\demo\IcePack\simple> set PATH=C:\Ice-1.3.0\bin;%PATH%
C:\Ice-1.3.0\demo\IcePack\simple> icepacknode --Ice.Config=config --warn
In a second terminal:

Quote:
C:\> cd Ice-1.3.0\demo\IcePack\simple
C:\Ice-1.3.0\demo\IcePack\simple> set CLASSPATH=C:\Ice-1.3.0\lib\Ice.jar;classes;%CLASSPATH%
C:\Ice-1.3.0\demo\IcePack\simple> set PATH=C:\Ice-1.3.0\bin;%PATH%
C:\Ice-1.3.0\demo\IcePack\simple> icepackadmin --Ice.Config=config -e "application add \"application.xml\""
C:\Ice-1.3.0\demo\IcePack\simple> java Client
Let me know if that still doesn't work (if it doesn't, please send me the traces from both terminal).

Benoit.
Reply With Quote
  #5 (permalink)  
Old 04-07-2004
ponyboy ponyboy is offline
Registered User
 
 
Join Date: Apr 2004
Location: P.R. CHINA
Posts: 6
you are right

I have overestimated the cooperation ability of Jbuilder.It can not do although I set the classpath including the *.classes which was regenerated by ant.So when I follow the step you show for me problem disapper.

That is to say,the classpath mechanism in Jbuilder is differ from the mechanism in command-line.And Ice use the operaton system environment which can not cooperation well with Jbuilder.


thanks!
__________________
chenchen
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.