Home Help Center

NullPointer in Glacier?

yeranarrailayeranarraila Member Tatiana PereiraOrganization: Universidade Federal de Santa CatarinaProject: An app to transfer mobile agents
Hi!
I'm trying to test glacier here, but I receive this error:


!! 07/10/11 15:35:59:774 Client: error: main: Ice.ObjectNotExistException
id.name = "router"
id.category = "Glacier2"
facet = ""
operation = "ice_isA"
at IceInternal.Outgoing.invoke(Outgoing.java:147)
at Ice._ObjectDelM.ice_isA(_ObjectDelM.java:30)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:111)
at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:77)
at Glacier2.RouterPrxHelper.checkedCast(RouterPrxHelper.java:2268)
at Client.createSession(Client.java:85)
at Glacier2.Application.doMain(Application.java:388)
at Glacier2.Application.doMain(Application.java:342)
at Ice.Application.main(Application.java:182)
at Ice.Application.main(Application.java:118)
at Client.main(Client.java:9)


id.name = "router" and id.category = "Glacier2" because I have specified in client configuration file:

Ice.Default.Router=Glacier2/router:tcp -h 150.162.236.249 -p 20000
Ice.ACM.Client=0
Ice.RetryIntervals=-1

"router" should be created when I run glacier2router --Ice.Config=router.glacier2

Glacier2.Client.Endpoints=tcp -h 150.162.236.249 -p 4063
Glacier2.SessionTimeout=60
Glacier2.CryptPasswords=passwords.glacier2
Glacier2.InstanceName=Glacier2

What can I do?
Hugs!

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Tatiana,

    The port number in your proxy and in your server configuration must be the same.
    Ice.Default.Router=Glacier2/router:tcp -h 150.162.236.249 -p 20000
    ...
    Glacier2.Client.Endpoints=tcp -h 150.162.236.249 -p 4063

    Cheers,
    Bernard
  • yeranarrailayeranarraila Member Tatiana PereiraOrganization: Universidade Federal de Santa CatarinaProject: An app to transfer mobile agents
    Thx so much! Now I have this error below, what can I do? Hugs!

    Glacier2.PermissionDeniedException
    reason = "permission denied"
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at IceInternal.BasicStream$DynamicUserExceptionFactory.createAndThrow(BasicStream.java:2142)
    at IceInternal.BasicStream.throwException(BasicStream.java:1564)
    at IceInternal.Outgoing.throwUserException(Outgoing.java:443)
    at Glacier2._RouterDelM.createSession(_RouterDelM.java:51)
    at Glacier2.RouterPrxHelper.createSession(RouterPrxHelper.java:129)
    at Glacier2.RouterPrxHelper.createSession(RouterPrxHelper.java:67)
    at Client.createSession(Client.java:87)
    at Glacier2.Application.doMain(Application.java:388)
    at Glacier2.Application.doMain(Application.java:342)
    at Ice.Application.main(Application.java:182)
    at Ice.Application.main(Application.java:118)
    at Client.main(Client.java:10)
    !! 08/10/11 01:11:21:582 Client: error: main: Ice.SocketException
    error = 0
    at IceInternal.ConnectRequestHandler.getConnection(ConnectRequestHandler.java:240)
    at IceInternal.ConnectRequestHandler.sendRequest(ConnectRequestHandler.java:138)
    at IceInternal.Outgoing.invoke(Outgoing.java:66)
    at Ice._ObjectDelM.ice_isA(_ObjectDelM.java:30)
    at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:111)
    at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:77)
    at Demo.CallbackPrxHelper.checkedCast(CallbackPrxHelper.java:133)
    at Client.runWithSession(Client.java:64)
    at Glacier2.Application.doMain(Application.java:406)
    at Glacier2.Application.doMain(Application.java:342)
    at Ice.Application.main(Application.java:182)
    at Ice.Application.main(Application.java:118)
    at Client.main(Client.java:10)
    Caused by: java.io.IOException: Was forced to cancel an existing connection by remote host
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(Unknown Source)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
    at sun.nio.ch.IOUtil.write(Unknown Source)
    at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
    at IceInternal.TcpTransceiver.write(TcpTransceiver.java:108)
    at Ice.ConnectionI.sendMessage(ConnectionI.java:2064)
    at Ice.ConnectionI.sendAsyncRequest(ConnectionI.java:396)
    at IceInternal.ConnectionRequestHandler.sendAsyncRequest(ConnectionRequestHandler.java:51)
    at IceInternal.OutgoingAsync.__send(OutgoingAsync.java:358)
    at Glacier2.RouterPrxHelper.begin_refreshSession(RouterPrxHelper.java:1361)
    at Glacier2.RouterPrxHelper.refreshSession_async(RouterPrxHelper.java:1409)
    at Glacier2.Application$SessionPingThread.run(Application.java:248)
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Tatiana,

    This "permission denied" exception suggests you didn't provide the correct credentials (username/password). The username/password in your client must match an entry in your Glacier2 passwords file (passwords.glacier2).

    As a first test, you could disable this authentication entirely by using the NullPermissionsVerifier; see Securing a Glacier2 Router - Ice 3.4 - ZeroC.

    Best regards,
    Bernard
  • yeranarrailayeranarraila Member Tatiana PereiraOrganization: Universidade Federal de Santa CatarinaProject: An app to transfer mobile agents
    Works! Thx so much for support =)
Sign In or Register to comment.