Archived

This forum has been archived. Please start a new discussion on GitHub.

Icegrid java icebox service

xdm
xdm La Coruña, Spain
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
<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
 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

Comments

  • xdm
    xdm La Coruña, Spain
    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
    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
    [ 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
  • matthew
    matthew NL, Canada
    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.
  • xdm
    xdm La Coruña, Spain
    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
  • matthew
    matthew NL, Canada
    Then you are activating the wrong object adapter.
    _adapter = communicator.createObjectAdapter(name);
    

    Must be changed to
    _adapter = communicator.createObjectAdapter("SearchServer");
    
  • xdm
    xdm La Coruña, Spain
    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
  • benoit
    benoit Rennes, France
    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.