Topic
  • 10 replies
  • Latest Post - ‏2012-07-19T21:49:30Z by andymc_
wiedela
wiedela
19 Posts

Pinned topic Can't get xscmd to work with OSGi bundles

‏2012-06-13T16:47:26Z |
We are running our catalog and container servers in OSGi bundles using Eclipse's "OSGi Framework" launcher. We can't seem to get the xscmd to work to administer our grid:

C:\opt>xscmd -c osgiAll
Starting at: 2012-06-13 10:45:11.108
CWXSI0068I: Executing command: osgiAll
CWXSI0062E: Catalog service is unavailable at the localhost:2809 endpoint.
Unable to inflate the ClusterConfiguration. See the cause for details.
Ending at: 2012-06-13 10:45:12.172

We were able to make a connection with xsadmin using the "jmxUrl" flag and also write a simple client to insert and retrieve data from the grid.

Any help with troubleshooting this problem is greatly appreciated.

Thanks
Updated on 2012-07-19T21:49:30Z at 2012-07-19T21:49:30Z by andymc_
  • Erwin_Karbasi
    Erwin_Karbasi
    186 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-13T17:28:49Z  
    Hello Adam,

    Sorry for unhelpful reply, but we also have exactly the same problem.
  • mcgarvey@us.ibm.com
    mcgarvey@us.ibm.com
    6 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-14T20:06:42Z  
    We tried xscmd with OSGi bundles, and it is working here, so we'd have to understand more about the environment where it fails.

    By any chance, is xscmd being run against a previous version of eXtreme Scale code in the OSGi bundle?
  • Erwin_Karbasi
    Erwin_Karbasi
    186 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-14T21:07:27Z  
    We tried xscmd with OSGi bundles, and it is working here, so we'd have to understand more about the environment where it fails.

    By any chance, is xscmd being run against a previous version of eXtreme Scale code in the OSGi bundle?
    Hello John,

    We have been tried xscmd in Unix, WXS version 7.1.1 and 7.1.1.1 and it didn't work.

    What do you mean: "previous version of eXtreme Scale code"?

    Thank you a lot,
    Erwin
  • mcgarvey@us.ibm.com
    mcgarvey@us.ibm.com
    6 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-14T21:42:25Z  
    Hello John,

    We have been tried xscmd in Unix, WXS version 7.1.1 and 7.1.1.1 and it didn't work.

    What do you mean: "previous version of eXtreme Scale code"?

    Thank you a lot,
    Erwin
    Erwin,

    I was wondering if perhaps the xscmd was not at the same product level as the XS code you were running under OGSi. It doesn't sound as if this is the case. We can check it on 7.111. Do you have security enabled?

    • John
  • Erwin_Karbasi
    Erwin_Karbasi
    186 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-15T07:07:07Z  
    Erwin,

    I was wondering if perhaps the xscmd was not at the same product level as the XS code you were running under OGSi. It doesn't sound as if this is the case. We can check it on 7.111. Do you have security enabled?

    • John
    John,

    Thanks for reply.

    We have just installed the WXS version 7.1.1.1, we started catalog and container then we have tried the xscmd command without any success.
    We don't have any security enabled.

    Cheers,
    Erwin
  • wiedela
    wiedela
    19 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-15T20:20:40Z  
    We got an 8.5 version of WXS and we have no security enabled. I'm sending the launch script that I'm using in RAD to execute what how we are. It's rough, but at least you will have an idea what we are doing. Our grid definition is simple, and we CAN write data to it through our test clients. We are also using a Blueprint file for our catalog and container server definitions.

    <?xml version="1.0" encoding="UTF-8"?>
    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:objectgrid="http://www.ibm.com/schema/objectgrid" default-activation="lazy" xmlns:bpext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/schema/objectgrid http://www.ibm.com/schema/objectgrid/objectgrid.xsd">

    <objectgrid:server id="NG_Blue_Server" isCatalog="true" name="NG_Blue_Server" tracespec="ObjectGridOSGi=all=enabled" tracefile="C:/opt/ngc/grid/blue/logs/trace.log" workingDirectory="C:/opt/ngc/grid/blue" jmxport="1199" listenerPort="2810">
    <objectgrid:catalog host="localhost" port="2811" />
    </objectgrid:server>
    <objectgrid:container id="NG_Blue_Container_1" objectgridxml="/META-INF/NGObjectgrid.xml" deploymentxml="/META-INF/NGDeployment.xml" server="NG_Blue_Server" />
    <objectgrid:container id="NG_Blue_Container_2" objectgridxml="/META-INF/NGObjectgrid.xml" deploymentxml="/META-INF/NGDeployment.xml" server="NG_Blue_Server" />
    </blueprint>

    Here's the launch script:

    <?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
    <booleanAttribute key="append.args" value="true"/>
    <booleanAttribute key="automaticAdd" value="true"/>
    <booleanAttribute key="automaticValidate" value="false"/>
    <stringAttribute key="bootstrap" value=""/>
    <stringAttribute key="checked" value="NONE"/>
    <booleanAttribute key="clearConfig" value="false"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.appendFile" value="false"/>
    <stringAttribute key="com.ibm.debug.breakpoints.java.traceFilename" value="${workspace_loc}\${launch_config_name}_${launch_timestamp}.log"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.traceToConsole" value="true"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.traceToFile" value="true"/>
    <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Blue Grid"/>
    <booleanAttribute key="default" value="true"/>
    <booleanAttribute key="default_auto_start" value="true"/>
    <intAttribute key="default_start_level" value="4"/>
    <stringAttribute key="deselected_workspace_plugins" value="WMQPlugins,org.eclipse.gemini.blueprint.extender"/>
    <booleanAttribute key="includeOptional" value="true"/>
    <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
    <listEntry value="org.eclipse.debug.ui.launchGroup.profile"/>
    <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
    <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
    </listAttribute>
    <stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
    <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true"/>
    <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="C:\opt\ngc\grid\blue"/>
    <stringAttribute key="pde.version" value="3.3"/>
    <booleanAttribute key="show_selected_only" value="false"/>
    <stringAttribute key="target_bundles" value="j2ee@default:default,org.eclipse.gemini.blueprint.io@default:default,org.eclipse.gemini.blueprint.extender@default:default,org.eclipse.osgi@-1:true,org.springframework.core@default:default,was_dependencies@default:default,was_public@default:default,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.springframework.expression@default:default,osgi.cmpn@default:default,com.ibm.websphere.xs.server@default:default,org.eclipse.equinox.transforms.hook@default:false,com.springsource.org.apache.commons.logging@default:default,org.springframework.asm@default:default,org.eclipse.equinox.common@2:true,org.eclipse.gemini.blueprint.core@default:default,com.springsource.org.aopalliance@default:default,org.eclipse.equinox.weaving.hook@default:false,org.springframework.context@default:default,org.apache.felix.fileinstall@default:default,org.springframework.beans@default:default,org.eclipse.osgi.util@default:default,org.springframework.aop@default:default,org.apache.commons.logging@default:default"/>
    <booleanAttribute key="tracing" value="true"/>
    <booleanAttribute key="useCustomFeatures" value="false"/>
    <booleanAttribute key="useDefaultConfigArea" value="true"/>
    <stringAttribute key="workspace_bundles" value="ngc.osgi.grid.common@2:default,com.ibm.msg@default:default,ngc.osgi.msg@2:default,ngc.osgi.grid.stats@default:default,ngc.osgi.common@2:default,ngc.osgi.grid.log@2:default"/>
    </launchConfiguration>

    Thanks
  • mcgarvey@us.ibm.com
    mcgarvey@us.ibm.com
    6 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-06-18T18:31:09Z  
    We have duplicated the problem and are working on it.
  • abajpai
    abajpai
    1 Post

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-07-16T10:28:05Z  
    I am trying to deploy a sample application which uses Extreme scale object grid osgi bundle deployed in liberty osgi platform. while running the application i am getting the following error.

    7/16/12 14:25:57:734 IST 00000006 ObjectGridImp W CWOBJ0006W: An exception occurred: com.ibm.websphere.objectgrid.ObjectGridException: ClassNotFoundException resolving a QueryConfig class

    i can see the bean class in compiled bundle. But looks like Extreme scale object grid osgi bundle is not able to load the class from my sample application bundle.

    The same code works in eclipse stand alone environment , but in osgi context i get the above error.
    Below is my code snippet :

    ObjectGrid og = null;
    try {
    og = ObjectGridManagerFactory.getObjectGridManager().createObjectGrid();
    } catch ( ObjectGridException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    og.defineMap( "Order" );
    // Define the schema
    QueryConfig queryCfg = new QueryConfig();

    OrderBean o = new OrderBean();
    o.customerName = "John Smith";
    o.date = new java.util.Date( System.currentTimeMillis() );
    o.itemName = "Widget";
    o.orderNumber = "1";
    o.price = 99.99;
    o.quantity = 1;
    queryCfg.addQueryMapping( new QueryMapping( "Order", OrderBean.class.getName(), "orderNumber",
    QueryMapping.FIELD_ACCESS ) );
    og.setQueryConfig( queryCfg );
    Session s = null;
    try {
    s = og.getSession();

    } catch ( TransactionCallbackException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch ( ObjectGridException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
  • lisaw
    lisaw
    101 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-07-16T17:14:53Z  
    • abajpai
    • ‏2012-07-16T10:28:05Z
    I am trying to deploy a sample application which uses Extreme scale object grid osgi bundle deployed in liberty osgi platform. while running the application i am getting the following error.

    7/16/12 14:25:57:734 IST 00000006 ObjectGridImp W CWOBJ0006W: An exception occurred: com.ibm.websphere.objectgrid.ObjectGridException: ClassNotFoundException resolving a QueryConfig class

    i can see the bean class in compiled bundle. But looks like Extreme scale object grid osgi bundle is not able to load the class from my sample application bundle.

    The same code works in eclipse stand alone environment , but in osgi context i get the above error.
    Below is my code snippet :

    ObjectGrid og = null;
    try {
    og = ObjectGridManagerFactory.getObjectGridManager().createObjectGrid();
    } catch ( ObjectGridException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    og.defineMap( "Order" );
    // Define the schema
    QueryConfig queryCfg = new QueryConfig();

    OrderBean o = new OrderBean();
    o.customerName = "John Smith";
    o.date = new java.util.Date( System.currentTimeMillis() );
    o.itemName = "Widget";
    o.orderNumber = "1";
    o.price = 99.99;
    o.quantity = 1;
    queryCfg.addQueryMapping( new QueryMapping( "Order", OrderBean.class.getName(), "orderNumber",
    QueryMapping.FIELD_ACCESS ) );
    og.setQueryConfig( queryCfg );
    Session s = null;
    try {
    s = og.getSession();

    } catch ( TransactionCallbackException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch ( ObjectGridException e ) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    Your application bundle needs to have the correct imports for the QueryConfig. Add these imports to your manifest.mf file.

    
    Import-Package: com.ibm.websphere.objectgrid, com.ibm.websphere.objectgrid.query, com.ibm.websphere.objectgrid.config,
    


    • Lisa

    Websphere eXtreme Scale Development
  • andymc_
    andymc_
    16 Posts

    Re: Can't get xscmd to work with OSGi bundles

    ‏2012-07-19T21:49:30Z  
    • wiedela
    • ‏2012-06-15T20:20:40Z
    We got an 8.5 version of WXS and we have no security enabled. I'm sending the launch script that I'm using in RAD to execute what how we are. It's rough, but at least you will have an idea what we are doing. Our grid definition is simple, and we CAN write data to it through our test clients. We are also using a Blueprint file for our catalog and container server definitions.

    <?xml version="1.0" encoding="UTF-8"?>
    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:objectgrid="http://www.ibm.com/schema/objectgrid" default-activation="lazy" xmlns:bpext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/schema/objectgrid http://www.ibm.com/schema/objectgrid/objectgrid.xsd">

    <objectgrid:server id="NG_Blue_Server" isCatalog="true" name="NG_Blue_Server" tracespec="ObjectGridOSGi=all=enabled" tracefile="C:/opt/ngc/grid/blue/logs/trace.log" workingDirectory="C:/opt/ngc/grid/blue" jmxport="1199" listenerPort="2810">
    <objectgrid:catalog host="localhost" port="2811" />
    </objectgrid:server>
    <objectgrid:container id="NG_Blue_Container_1" objectgridxml="/META-INF/NGObjectgrid.xml" deploymentxml="/META-INF/NGDeployment.xml" server="NG_Blue_Server" />
    <objectgrid:container id="NG_Blue_Container_2" objectgridxml="/META-INF/NGObjectgrid.xml" deploymentxml="/META-INF/NGDeployment.xml" server="NG_Blue_Server" />
    </blueprint>

    Here's the launch script:

    <?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
    <booleanAttribute key="append.args" value="true"/>
    <booleanAttribute key="automaticAdd" value="true"/>
    <booleanAttribute key="automaticValidate" value="false"/>
    <stringAttribute key="bootstrap" value=""/>
    <stringAttribute key="checked" value="NONE"/>
    <booleanAttribute key="clearConfig" value="false"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.appendFile" value="false"/>
    <stringAttribute key="com.ibm.debug.breakpoints.java.traceFilename" value="${workspace_loc}\${launch_config_name}_${launch_timestamp}.log"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.traceToConsole" value="true"/>
    <booleanAttribute key="com.ibm.debug.breakpoints.java.traceToFile" value="true"/>
    <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Blue Grid"/>
    <booleanAttribute key="default" value="true"/>
    <booleanAttribute key="default_auto_start" value="true"/>
    <intAttribute key="default_start_level" value="4"/>
    <stringAttribute key="deselected_workspace_plugins" value="WMQPlugins,org.eclipse.gemini.blueprint.extender"/>
    <booleanAttribute key="includeOptional" value="true"/>
    <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
    <listEntry value="org.eclipse.debug.ui.launchGroup.profile"/>
    <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
    <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
    </listAttribute>
    <stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
    <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
    <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
    <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true"/>
    <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="C:\opt\ngc\grid\blue"/>
    <stringAttribute key="pde.version" value="3.3"/>
    <booleanAttribute key="show_selected_only" value="false"/>
    <stringAttribute key="target_bundles" value="j2ee@default:default,org.eclipse.gemini.blueprint.io@default:default,org.eclipse.gemini.blueprint.extender@default:default,org.eclipse.osgi@-1:true,org.springframework.core@default:default,was_dependencies@default:default,was_public@default:default,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.springframework.expression@default:default,osgi.cmpn@default:default,com.ibm.websphere.xs.server@default:default,org.eclipse.equinox.transforms.hook@default:false,com.springsource.org.apache.commons.logging@default:default,org.springframework.asm@default:default,org.eclipse.equinox.common@2:true,org.eclipse.gemini.blueprint.core@default:default,com.springsource.org.aopalliance@default:default,org.eclipse.equinox.weaving.hook@default:false,org.springframework.context@default:default,org.apache.felix.fileinstall@default:default,org.springframework.beans@default:default,org.eclipse.osgi.util@default:default,org.springframework.aop@default:default,org.apache.commons.logging@default:default"/>
    <booleanAttribute key="tracing" value="true"/>
    <booleanAttribute key="useCustomFeatures" value="false"/>
    <booleanAttribute key="useDefaultConfigArea" value="true"/>
    <stringAttribute key="workspace_bundles" value="ngc.osgi.grid.common@2:default,com.ibm.msg@default:default,ngc.osgi.msg@2:default,ngc.osgi.grid.stats@default:default,ngc.osgi.common@2:default,ngc.osgi.grid.log@2:default"/>
    </launchConfiguration>

    Thanks
    Adam,

    Are you still seeing the xscmd issue where it fails to inflate the ClusterConfig?

    This was a problem in our 7.1.1 release where bundleresource URLs were getting passed back to the client -- and those URLs could not be deserialized because the xscmd client did not have a protocol handler for bundleresource URLs.
    We resolved this problem in the 7.1.1.1 fixpack - and it should also be resolved in 8.5 (note that the issue is on the server, so your server must be at 7.1.1.1 or 8.5 for this issue to be resolved).

    If you are still seeing this problem, can you provide the full stack trace from the xscmd client (you can get this by adding "-trf xscmd.log" to your command line) and a trace from the server side that includes "ObjectGrid*=all"?

    Thanks,
    Andy