You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Isuru Perera <is...@wso2.com> on 2013/08/08 08:49:53 UTC

Upgrading jclouds version

Hi all,

We are planning upgrade jclouds version to 1.6.1-incubating in Apache
Stratos.

I have started working on it now [1].

I think it would be great to use jclouds incubating version in first ever
Apache Stratos incubating release! :)

Best Regards,

[1] https://issues.apache.org/jira/browse/STRATOS-41
-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

Twitter: http://twitter.com/chrishantha | LinkedIn:
http://lk.linkedin.com/in/chrishantha/

Re: Upgrading jclouds version

Posted by Isuru Perera <ch...@gmail.com>.
I just went through Carbon dependencies. Removing MB features *might*
*not*help to solve the issue here. Hector is used in many components.

For example, org.wso2.carbon.logging.service component.

We need to come up with a solution for this.

Anyway, I still would like to remove MB features from Cloud Controller.

On Sun, Aug 11, 2013 at 10:54 PM, Isuru Perera <ch...@gmail.com>wrote:

> Hi all,
>
> There is a problem upgrading the jclouds to latest version.
>
> When I start the Cloud Controller, the MB seems to be failing to start.
>
> Cartridge deployer is working fine when I tested on Amazon EC2! (which
> means some jclouds APIs are working properly)
>
> Following are some details I found from OSGi console.
>
> *osgi> ls*
> All Components:
> ID    State            Component Name            Located in bundle
> *30    Unsatisfied
> org.wso2.carbon.andes.internal.QpidServiceComponent
> org.wso2.carbon.andes(bid=182)*
> *
> osgi> comp 30*
>     Component[
>     name = org.wso2.carbon.andes.internal.QpidServiceComponent
>     factory = null
>     autoenable = true
>     immediate = true
>     implementation = org.wso2.carbon.andes.internal.QpidServiceComponent
>     state = Unsatisfied
>     properties =
> {service.pid=org.wso2.carbon.andes.internal.QpidServiceComponent}
>     serviceFactory = false
>     serviceInterface = null
>     references = {
>         Reference[name =
> org.wso2.carbon.andes.authentication.service.AuthenticationService,
> interface =
> org.wso2.carbon.andes.authentication.service.AuthenticationService, policy
> = dynamic, cardinality = 1..1, target = null, bind = setAccessKey, unbind =
> unsetAccessKey]
>         Reference[name =
> org.wso2.andes.wso2.service.QpidNotificationService, interface =
> org.wso2.andes.wso2.service.QpidNotificationService, policy = dynamic,
> cardinality = 1..1, target = null, bind = setQpidNotificationService,
> unbind = unsetQpidNotificationService]
>         Reference[name = server.configuration, interface =
> org.wso2.carbon.base.api.ServerConfigurationService, policy = dynamic,
> cardinality = 1..1, target = null, bind = setServerConfiguration, unbind =
> unsetServerConfiguration]
>         Reference[name = event.broker, interface =
> org.wso2.carbon.event.core.EventBundleNotificationService, policy =
> dynamic, cardinality = 1..1, target = null, bind =
> setEventBundleNotificationService, unbind =
> unsetEventBundleNotificationService]
>         Reference[name = cassandra.service, interface =
> org.wso2.carbon.cassandra.server.service.CassandraServerService, policy =
> dynamic, cardinality = 1..1, target = null, bind =
> setCassandraServerService, unbind = unsetCassandraServerService]
>         Reference[name = coordination.service, interface =
> org.wso2.carbon.coordination.server.service.CoordinationServerService,
> policy = dynamic, cardinality = 1..1, target = null, bind =
> setCoordinationServerService, unbind = unsetCoordinationServerService]
>     }
>     located in bundle = org.wso2.carbon.andes_4.1.0 [182]
> ]
> Dynamic information :
>   The component is satisfied
>   All component references are satisfied
>   Component configurations :
>     Configuration properties:
>       service.pid = org.wso2.carbon.andes.internal.QpidServiceComponent
>       component.name = org.wso2.carbon.andes.internal.QpidServiceComponent
>       component.id = 29
>     Instances:
>     *No instances were created because: Can not activate instance of
> component org.wso2.carbon.andes.internal.QpidServiceComponent. The
> activation throws: java.lang.NoClassDefFoundError:
> me/prettyprint/hector/api/ConsistencyLevelPolicy*
>
>
> Only problem I can think of is that I upgraded guava library to solve
> following dependency when I create the Cloud Controller product.
>
> *jclouds Amazon EC2 provider 1.6.1.incubating (aws-ec2 1.6.1.incubating)
> requires 'package com.google.common.base [14.0.0,15.0.0)'*
>
> Hector client also depends on guava. So, I'm guessing guava library update
> might be causing issues.
>
> The hector component used in Cloud Controller just imports the
> "com.google.common.base" package (without version).
>
> Hector is a client for Cassandra and it's coming from MB features.
>
> As I mentioned in another thread, I think we should remove MB features
> from Cloud Controller. (As a quick solution to this issue)
>
> Please share your suggestions.
>
> Thanks!
>
> --
> Isuru Perera
> about.me/chrishantha
>



-- 
Isuru Perera
about.me/chrishantha

Re: Upgrading jclouds version

Posted by Isuru Perera <ch...@gmail.com>.
Hi all,

There is a problem upgrading the jclouds to latest version.

When I start the Cloud Controller, the MB seems to be failing to start.

Cartridge deployer is working fine when I tested on Amazon EC2! (which
means some jclouds APIs are working properly)

Following are some details I found from OSGi console.

*osgi> ls*
All Components:
ID    State            Component Name            Located in bundle
*30    Unsatisfied
org.wso2.carbon.andes.internal.QpidServiceComponent
org.wso2.carbon.andes(bid=182)*
*
osgi> comp 30*
    Component[
    name = org.wso2.carbon.andes.internal.QpidServiceComponent
    factory = null
    autoenable = true
    immediate = true
    implementation = org.wso2.carbon.andes.internal.QpidServiceComponent
    state = Unsatisfied
    properties =
{service.pid=org.wso2.carbon.andes.internal.QpidServiceComponent}
    serviceFactory = false
    serviceInterface = null
    references = {
        Reference[name =
org.wso2.carbon.andes.authentication.service.AuthenticationService,
interface =
org.wso2.carbon.andes.authentication.service.AuthenticationService, policy
= dynamic, cardinality = 1..1, target = null, bind = setAccessKey, unbind =
unsetAccessKey]
        Reference[name =
org.wso2.andes.wso2.service.QpidNotificationService, interface =
org.wso2.andes.wso2.service.QpidNotificationService, policy = dynamic,
cardinality = 1..1, target = null, bind = setQpidNotificationService,
unbind = unsetQpidNotificationService]
        Reference[name = server.configuration, interface =
org.wso2.carbon.base.api.ServerConfigurationService, policy = dynamic,
cardinality = 1..1, target = null, bind = setServerConfiguration, unbind =
unsetServerConfiguration]
        Reference[name = event.broker, interface =
org.wso2.carbon.event.core.EventBundleNotificationService, policy =
dynamic, cardinality = 1..1, target = null, bind =
setEventBundleNotificationService, unbind =
unsetEventBundleNotificationService]
        Reference[name = cassandra.service, interface =
org.wso2.carbon.cassandra.server.service.CassandraServerService, policy =
dynamic, cardinality = 1..1, target = null, bind =
setCassandraServerService, unbind = unsetCassandraServerService]
        Reference[name = coordination.service, interface =
org.wso2.carbon.coordination.server.service.CoordinationServerService,
policy = dynamic, cardinality = 1..1, target = null, bind =
setCoordinationServerService, unbind = unsetCoordinationServerService]
    }
    located in bundle = org.wso2.carbon.andes_4.1.0 [182]
]
Dynamic information :
  The component is satisfied
  All component references are satisfied
  Component configurations :
    Configuration properties:
      service.pid = org.wso2.carbon.andes.internal.QpidServiceComponent
      component.name = org.wso2.carbon.andes.internal.QpidServiceComponent
      component.id = 29
    Instances:
    *No instances were created because: Can not activate instance of
component org.wso2.carbon.andes.internal.QpidServiceComponent. The
activation throws: java.lang.NoClassDefFoundError:
me/prettyprint/hector/api/ConsistencyLevelPolicy*


Only problem I can think of is that I upgraded guava library to solve
following dependency when I create the Cloud Controller product.

*jclouds Amazon EC2 provider 1.6.1.incubating (aws-ec2 1.6.1.incubating)
requires 'package com.google.common.base [14.0.0,15.0.0)'*

Hector client also depends on guava. So, I'm guessing guava library update
might be causing issues.

The hector component used in Cloud Controller just imports the
"com.google.common.base" package (without version).

Hector is a client for Cassandra and it's coming from MB features.

As I mentioned in another thread, I think we should remove MB features from
Cloud Controller. (As a quick solution to this issue)

Please share your suggestions.

Thanks!

-- 
Isuru Perera
about.me/chrishantha

Re: Upgrading jclouds version

Posted by Isuru Perera <is...@wso2.com>.
On Fri, Aug 9, 2013 at 8:25 PM, Pradeep Fernando <pr...@gmail.com>wrote:

> Since stratos is based on a released version of carbon, maintain your own
> launch.INI and replace it during product build time.
>
> In the next carbon releases we can add this to carbon itself.
>
Thanks Pradeep!

I will check on this.

>  --Pradeep
> sent from my phone
> On Aug 9, 2013 8:19 PM, "Isuru Perera" <is...@wso2.com> wrote:
>
>>
>> On Fri, Aug 9, 2013 at 8:09 PM, Pradeep Fernando <pr...@gmail.com>wrote:
>>
>>> Hi Isuru,
>>>
>>> In carbon, JVM provided classes are exposed in to the OSGi runtime in a
>>> controlled manner. We use launch.INI file located in conf/ etc to do that.
>>> You may need add above package name to that file..
>>>
>>
>> Thanks Pradeep!
>>
>> It works! Now jclouds bundles are in ACTIVE state!
>>
>> I just edited
>> apache-stratos-cc-3.0.0-SNAPSHOT/repository/conf/etc/launch.ini and added
>> the package javax.lang.model.type.
>>
>> Now the next question is, how do we add this package by default? :)
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> Twitter: http://twitter.com/chrishantha | LinkedIn:
>> http://lk.linkedin.com/in/chrishantha/
>>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

Twitter: http://twitter.com/chrishantha | LinkedIn:
http://lk.linkedin.com/in/chrishantha/

Re: Upgrading jclouds version

Posted by Pradeep Fernando <pr...@gmail.com>.
Since stratos is based on a released version of carbon, maintain your own
launch.INI and replace it during product build time.

In the next carbon releases we can add this to carbon itself.

--Pradeep
sent from my phone
On Aug 9, 2013 8:19 PM, "Isuru Perera" <is...@wso2.com> wrote:

>
> On Fri, Aug 9, 2013 at 8:09 PM, Pradeep Fernando <pr...@gmail.com>wrote:
>
>> Hi Isuru,
>>
>> In carbon, JVM provided classes are exposed in to the OSGi runtime in a
>> controlled manner. We use launch.INI file located in conf/ etc to do that.
>> You may need add above package name to that file..
>>
>
> Thanks Pradeep!
>
> It works! Now jclouds bundles are in ACTIVE state!
>
> I just edited
> apache-stratos-cc-3.0.0-SNAPSHOT/repository/conf/etc/launch.ini and added
> the package javax.lang.model.type.
>
> Now the next question is, how do we add this package by default? :)
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> Twitter: http://twitter.com/chrishantha | LinkedIn:
> http://lk.linkedin.com/in/chrishantha/
>

Re: Upgrading jclouds version

Posted by Isuru Perera <is...@wso2.com>.
On Fri, Aug 9, 2013 at 8:09 PM, Pradeep Fernando <pr...@gmail.com>wrote:

> Hi Isuru,
>
> In carbon, JVM provided classes are exposed in to the OSGi runtime in a
> controlled manner. We use launch.INI file located in conf/ etc to do that.
> You may need add above package name to that file..
>

Thanks Pradeep!

It works! Now jclouds bundles are in ACTIVE state!

I just edited
apache-stratos-cc-3.0.0-SNAPSHOT/repository/conf/etc/launch.ini and added
the package javax.lang.model.type.

Now the next question is, how do we add this package by default? :)

-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

Twitter: http://twitter.com/chrishantha | LinkedIn:
http://lk.linkedin.com/in/chrishantha/

Re: Upgrading jclouds version

Posted by Pradeep Fernando <pr...@gmail.com>.
Hi Isuru,

In carbon, JVM provided classes are exposed in to the OSGi runtime in a
controlled manner. We use launch.INI file located in conf/ etc to do that.
You may need add above package name to that file..

--Pradeep
sent from my phone
On Aug 9, 2013 8:02 PM, "Isuru Perera" <is...@wso2.com> wrote:

> Hi all,
>
> I'm working on this in a local branch.
>
> We are currently using jclouds version 1.5.0-beta.5. As the first step, I
> started upgrading jclouds version to 1.6.0 (version before latest Apache
> jclouds incubating release). I just wanted to see API changes.
>
> Since I have not worked with jclouds much, it was quite challenging to
> find out how things work. There are some considerable changes from jclouds
> 1.5.0 to jclouds 1.6.0 and their docs do not seem to be updated. I managed
> to figure out some changes required in the code. I plan to send a mail to
> jclouds user list, after I could test Stratos successfully with jclouds
> version upgrade.
>
> Now the current status is that I can build the Cloud Controller product
> with jclouds 1.6.0, but jclouds bundles are not in ACTIVE state.
>
> Following is the information I found from OSGi console. This post by
> Pradeep [1] helped me to find out the issue quickly.
>
> osgi> diag 75
> reference:file:plugins/jclouds-core_1.6.0.jar [75]
>   Direct constraints which are unresolved:
>     Missing imported package javax.lang.model.type_0.0.0.
>
> After doing a quick google search, I found [2]. It seems jclouds needs
> Java SE 6 to run.
>
> I'm running the product on Java SE 6 (1.6.0_45), but I think the execution
> environment coming from Carbon is Java SE 5.
>
> So, how do we change the execution environment in the product to Java SE
> 6? (I think this is the solution to the issue)
>
> Appreciate any help on this.
>
> Thanks!
>
> [1]
> http://pradeepfernando.blogspot.com/2011/10/debugging-your-osgi-application-using.html
> [2] http://www.eclipse.org/forums/index.php/t/158150/
>
>
>
> On Thu, Aug 8, 2013 at 12:19 PM, Isuru Perera <is...@wso2.com> wrote:
>
>> Hi all,
>>
>> We are planning upgrade jclouds version to 1.6.1-incubating in Apache
>> Stratos.
>>
>> I have started working on it now [1].
>>
>> I think it would be great to use jclouds incubating version in first ever
>> Apache Stratos incubating release! :)
>>
>> Best Regards,
>>
>> [1] https://issues.apache.org/jira/browse/STRATOS-41
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> Twitter: http://twitter.com/chrishantha | LinkedIn:
>> http://lk.linkedin.com/in/chrishantha/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> Twitter: http://twitter.com/chrishantha | LinkedIn:
> http://lk.linkedin.com/in/chrishantha/
>

Re: Upgrading jclouds version

Posted by Isuru Perera <is...@wso2.com>.
Hi all,

I'm working on this in a local branch.

We are currently using jclouds version 1.5.0-beta.5. As the first step, I
started upgrading jclouds version to 1.6.0 (version before latest Apache
jclouds incubating release). I just wanted to see API changes.

Since I have not worked with jclouds much, it was quite challenging to find
out how things work. There are some considerable changes from jclouds 1.5.0
to jclouds 1.6.0 and their docs do not seem to be updated. I managed to
figure out some changes required in the code. I plan to send a mail to
jclouds user list, after I could test Stratos successfully with jclouds
version upgrade.

Now the current status is that I can build the Cloud Controller product
with jclouds 1.6.0, but jclouds bundles are not in ACTIVE state.

Following is the information I found from OSGi console. This post by
Pradeep [1] helped me to find out the issue quickly.

osgi> diag 75
reference:file:plugins/jclouds-core_1.6.0.jar [75]
  Direct constraints which are unresolved:
    Missing imported package javax.lang.model.type_0.0.0.

After doing a quick google search, I found [2]. It seems jclouds needs Java
SE 6 to run.

I'm running the product on Java SE 6 (1.6.0_45), but I think the execution
environment coming from Carbon is Java SE 5.

So, how do we change the execution environment in the product to Java SE 6?
(I think this is the solution to the issue)

Appreciate any help on this.

Thanks!

[1]
http://pradeepfernando.blogspot.com/2011/10/debugging-your-osgi-application-using.html
[2] http://www.eclipse.org/forums/index.php/t/158150/



On Thu, Aug 8, 2013 at 12:19 PM, Isuru Perera <is...@wso2.com> wrote:

> Hi all,
>
> We are planning upgrade jclouds version to 1.6.1-incubating in Apache
> Stratos.
>
> I have started working on it now [1].
>
> I think it would be great to use jclouds incubating version in first ever
> Apache Stratos incubating release! :)
>
> Best Regards,
>
> [1] https://issues.apache.org/jira/browse/STRATOS-41
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> Twitter: http://twitter.com/chrishantha | LinkedIn:
> http://lk.linkedin.com/in/chrishantha/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

Twitter: http://twitter.com/chrishantha | LinkedIn:
http://lk.linkedin.com/in/chrishantha/