Archived
This forum has been archived. Please start a new discussion on GitHub.
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:46)
at Ice.ObjectPrxHelper.ice_isA(ObjectPrxHelper.java:34)
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?
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:46)
at Ice.ObjectPrxHelper.ice_isA(ObjectPrxHelper.java:34)
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?
0
Comments
-
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.0 -
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\config\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!0 -
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:[ 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: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: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.0 -
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!0