Results 1 to 7 of 7

Thread: Icegrid java icebox service

  1. #1
    xdm's Avatar
    xdm
    xdm is online now ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    Icegrid java icebox service

    Hello

    I have a problem deploying a java icebox service with IceGrid

    this service previously running with icepack with out problem

    I use this descriptor to deploy
    Code:
    <icegrid>
    <application name="oz-cms">
    <node name="titanio">
     <icebox
      id="LuceneServer"
      exe="java"
      activation="on-demand">
    		
       <service name="Lucene" entry="Oz.Searchs.SearchServiceI">
          <adapter name="SearchServer" endpoints="default">
             <object 								
                    identity="LuceneServer/LuceneServer" 
                    type="::Oz::Searchs::LuceneServer"/>
          </adapter>
          <property name="Identity" value="LuceneServer/LuceneServer"/>
        </service>
     </icebox>
    </node>
    </application>
    </icegrid>
    Error ouput form icegridregistry
    Code:
     icegridnode: Server: changed server `LuceneServer' state to `Activating' ]
    [ icegridnode: Activator: activating server `LuceneServer'
      path = java
      pwd =
      args = java --Ice.Config=/opt/oz-cms/DB/icegrid/titanio/servers/LuceneServer/config/config --Ice.Default.Locator=IceGrid/Locator:tcp -h 192.168.0.197 -p 12000 --Ice.ServerId=LuceneServer ]
    [ icegridnode: Activator: activated server `LuceneServer' (pid = 19562) ]
    Unrecognized option: --Ice.Config=/opt/oz-cms/DB/icegrid/titanio/servers/LuceneServer/config/config
    Could not create the Java virtual machine.
    [ icegridnode: Activator: detected termination of server `LuceneServer' ]
    [ icegridnode: Server: changed server `LuceneServer' state to `WaitForActivation' ]
    [ icegridnode: Adapter: server `LuceneServer' adapter `LuceneServer.Lucene.SearchServer' deactivated ]
    [ icegridnode: Server: changed server `LuceneServer' state to `Inactive' ]
    Is this a error in my descriptor?

    in previous version with IcePack i use kind="java-icebox" property but i can't find it in Ice-3.0.0

    Thanks in advantage

  2. #2
    xdm's Avatar
    xdm
    xdm is online now ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    IceGridGui

    I adding a comand argument IceBox.Service with the icegridadgui and service now try to start but produce a new error

    Java Service for test this
    Code:
    public class SearchServiceI extends Ice.LocalObjectImpl
    	implements IceBox.Service
    {
    	public void start(
    		String name, 
    		Ice.Communicator communicator,
    		String[] args)
    	{
    		_adapter = communicator.createObjectAdapter(name);
    		_adapter.activate();
    	} 
    	
    	public void stop() 
    	{ 
    		_adapter.deactivate(); 
    	} 
    	
    	private Ice.ObjectAdapter _adapter;
    }
    IceGrid ouput
    Code:
    [ icegridnode: Server: changed server `LuceneServer' state to `Activating' ]
    [ icegridnode: Activator: activating server `LuceneServer'
      path = /opt/blackdown-jdk-1.4.2.02/bin/java
      pwd =
      args = /opt/blackdown-jdk-1.4.2.02/bin/java IceBox.Server --Ice.Config=/opt/oz-cms/DB/icegrid/titanio/servers/LuceneServer/config/config --Ice.Default.Locator=IceGrid/Locator:tcp -h 192.168.0.197 -p 12000 --Ice.ServerId=LuceneServer ]
    [ icegridnode: Activator: activated server `LuceneServer' (pid = 20256) ]
    [ icegridnode: Server: changed server `LuceneServer' state to `WaitForActivation' ]
    [ icegridnode: Server: changed server `LuceneServer' state to `ActivationTimeout' ]
    [ icegridnode: Server: server `LuceneServer' activation timed out ]
    [ icegridnode: Adapter: server `LuceneServer' adapter `LuceneServer.Lucene.SearchServer' activation timed out ]

    Any ideas?

    Thanks

  3. #3
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    In the first descriptor you should be using a "server" descriptor, not a "service" descriptor. service is only for IceBox services. This is why the command line is incorrect (and hence why the JVM doesn't start).

    For the second, since you didn't provide the descriptor its hard to tell for sure, but chances are you are not activating the correct object adapter. If the descriptor is like the first descriptor then the OA is named "SearchServer" not the service name.

  4. #4
    xdm's Avatar
    xdm
    xdm is online now ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    IceBox

    the firs exameple and second use the same descriptor.

    in the first descriptor you should be using a "server" descriptor, not a "service" descriptor. service is only for IceBox services. This is why the command line is incorrect (and hence why the JVM doesn't start).
    my application is a java IceBox service you can view the implementation in my second post.

    If i add the Ice.Box arguments in the gui to the app descriptor-genearated it runs whith the problem of the second post.


    Thanks

  5. #5
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Then you are activating the wrong object adapter.

    Code:
    _adapter = communicator.createObjectAdapter(name);
    Must be changed to

    Code:
    _adapter = communicator.createObjectAdapter("SearchServer");

  6. #6
    xdm's Avatar
    xdm
    xdm is online now ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    Set Comanda Arguments in file descriptor

    matthew thanks for your quick reply and one question more

    Is posible set Comand Argument IceBox.Server in the descriptor?


    and a report about IceGridGui

    when set Path to executable is not the same tipe "java" that "java " this is a bit confusing

  7. #7
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    You can set command line arguments with the <option> XML element. See the Ice documentation for more information (the migration section also describes how to migrate descriptors from IcePack to IceGrid). Thanks for the report about the GUI.

    Benoit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to debug a icebox service .
    By fan in forum Help Center
    Replies: 2
    Last Post: 02-16-2011, 01:18 AM
  2. about icebox service
    By luis12 in forum Help Center
    Replies: 3
    Last Post: 05-14-2009, 04:37 AM
  3. Replies: 12
    Last Post: 01-15-2009, 05:17 PM
  4. How to start the iceBox in java for the storm service
    By Jason Gao in forum Help Center
    Replies: 5
    Last Post: 10-20-2006, 05:32 AM
  5. IceBox hosting java services in IceGrid
    By Sameerrele in forum Help Center
    Replies: 5
    Last Post: 08-21-2006, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •