You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Martin Eppel (meppel)" <me...@cisco.com> on 2014/06/20 01:15:37 UTC

patching apache stratos on rc4 based branch

I used to be able to patch my stratos server by simply replacing jar files (every instance, - up to rc3) , however, since moving to code based on RC4 this procedure started to fail.

For example, to patch a change in the autoscaler I 
- stopped stratos, replace the jars and restarted stratos again.

e.g replaced the following 2 jars :
/opt/wso2/apache-stratos/repository/components/patches/patch0000/org.apache.stratos.autoscaler_4.0.0.jar;
/opt/wso2/apache-stratos/repository/components/plugins/org.apache.stratos.autoscaler_4.0.0.jar;

However, now, every time I replace a jar, even so the source hasn’t changed compared to the original binary,  the system fails to come up and hangs there :

ID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is delayed due to the following unsatisfied items: {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required OSGiAxis2Service: org.apache.stratos.manager-4.0.0 {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is delayed due to the following unsatisfied items: {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required OSGiAxis2Service: org.apache.stratos.manager-4.0.0 {org.wso2.carbon.core.init.CarbonServerManager}


As of now it seems my only choice is to rebuild the whole system  to test some changes ? Is there a recommended patch sequence to test code changes by just patching single jar files ? What about the REST API (stratos.war) ?

Any ideas to get my patch process back to work, otherwise, the option to rebuild all binaries + upload takes a long time and is very inefficient for development ?

Thanks

Martin


Re: patching apache stratos on rc4 based branch

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Martin,

Are you using the RC4 code? AFAIK we have changed the versions of Stratos,
after graduation.


On Fri, Jun 20, 2014 at 4:45 AM, Martin Eppel (meppel) <me...@cisco.com>
wrote:

>
> I used to be able to patch my stratos server by simply replacing jar files
> (every instance, - up to rc3) , however, since moving to code based on RC4
> this procedure started to fail.
>
> For example, to patch a change in the autoscaler I
> - stopped stratos, replace the jars and restarted stratos again.
>
> e.g replaced the following 2 jars :
>
> /opt/wso2/apache-stratos/repository/components/patches/patch0000/org.apache.stratos.autoscaler_4.0.0.jar;
>
> /opt/wso2/apache-stratos/repository/components/plugins/org.apache.stratos.autoscaler_4.0.0.jar;
>
> However, now, every time I replace a jar, even so the source hasn’t
> changed compared to the original binary,  the system fails to come up and
> hangs there :
>
> ID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
> delayed due to the following unsatisfied items:
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
> delayed due to the following unsatisfied items:
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
> {org.wso2.carbon.core.init.CarbonServerManager}
>
>
> As of now it seems my only choice is to rebuild the whole system  to test
> some changes ? Is there a recommended patch sequence to test code changes
> by just patching single jar files ? What about the REST API (stratos.war) ?
>
> Any ideas to get my patch process back to work, otherwise, the option to
> rebuild all binaries + upload takes a long time and is very inefficient for
> development ?
>
> Thanks
>
> Martin
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

RE: patching apache stratos on rc4 based branch

Posted by "Martin Eppel (meppel)" <me...@cisco.com>.
Thanks

From: isuruh@wso2.com [mailto:isuruh@wso2.com] On Behalf Of Isuru Haththotuwa
Sent: Thursday, June 19, 2014 10:03 PM
To: dev
Cc: dev@stratos.incubator.apache.org
Subject: Re: patching apache stratos on rc4 based branch


On Fri, Jun 20, 2014 at 7:23 AM, Udara Liyanage <ud...@wso2.com>> wrote:

Hi,

Please refer to [1]. Same applies for Apache Stratos.
You don't need to build the whole product, only related jar need to be patched.

[1] http://stackoverflow.com/questions/11306929/how-to-apply-patch-files-in-wso2-carbon
This is the correct approach. Another point is that if you directly replace the original jar file with your patched jar in patch0000 and plugins directories, the original jar that was in the product would be lost, if you explicitly did not take a backup. By following the proper patching process as explained in Udara's link, this issue won't be there. When you need to remove the patched jar, just remove the directory that includes your patched jar (ex. patch0200, etc.).
The patched stratos.war file should be replaced in repository/deployment/server/webapps directory. There will be an already existing stratos.war file and a stratos directory (exploded file from the war), delete them both and copy the patched stratos.war there.



Touched, not typed. Erroneous words are a feature, not a typo.
On Jun 20, 2014 4:46 AM, "Martin Eppel (meppel)" <me...@cisco.com>> wrote:

I used to be able to patch my stratos server by simply replacing jar files (every instance, - up to rc3) , however, since moving to code based on RC4 this procedure started to fail.

For example, to patch a change in the autoscaler I
- stopped stratos, replace the jars and restarted stratos again.

e.g replaced the following 2 jars :
/opt/wso2/apache-stratos/repository/components/patches/patch0000/org.apache.stratos.autoscaler_4.0.0.jar;
/opt/wso2/apache-stratos/repository/components/plugins/org.apache.stratos.autoscaler_4.0.0.jar;

However, now, every time I replace a jar, even so the source hasn’t changed compared to the original binary,  the system fails to come up and hangs there :

ID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is delayed due to the following unsatisfied items: {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required OSGiAxis2Service: org.apache.stratos.manager-4.0.0 {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is delayed due to the following unsatisfied items: {org.wso2.carbon.core.init.CarbonServerManager}
TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required OSGiAxis2Service: org.apache.stratos.manager-4.0.0 {org.wso2.carbon.core.init.CarbonServerManager}


As of now it seems my only choice is to rebuild the whole system  to test some changes ? Is there a recommended patch sequence to test code changes by just patching single jar files ? What about the REST API (stratos.war) ?

Any ideas to get my patch process back to work, otherwise, the option to rebuild all binaries + upload takes a long time and is very inefficient for development ?

Thanks

Martin


Re: patching apache stratos on rc4 based branch

Posted by Isuru Haththotuwa <is...@apache.org>.
On Fri, Jun 20, 2014 at 7:23 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> Please refer to [1]. Same applies for Apache Stratos.
> You don't need to build the whole product, only related jar need to be
> patched.
>
> [1]
> http://stackoverflow.com/questions/11306929/how-to-apply-patch-files-in-wso2-carbon
>
This is the correct approach. Another point is that if you directly replace
the original jar file with your patched jar in patch0000 and plugins
directories, the original jar that was in the product would be lost, if you
explicitly did not take a backup. By following the proper patching process
as explained in Udara's link, this issue won't be there. When you need to
remove the patched jar, just remove the directory that includes your
patched jar (ex. patch0200, etc.).

The patched stratos.war file should be replaced in
repository/deployment/server/webapps directory. There will be an already
existing stratos.war file and a stratos directory (exploded file from the
war), delete them both and copy the patched stratos.war there.

>
>
>
> Touched, not typed. Erroneous words are a feature, not a typo.
> On Jun 20, 2014 4:46 AM, "Martin Eppel (meppel)" <me...@cisco.com> wrote:
>
>>
>> I used to be able to patch my stratos server by simply replacing jar
>> files (every instance, - up to rc3) , however, since moving to code based
>> on RC4 this procedure started to fail.
>>
>> For example, to patch a change in the autoscaler I
>> - stopped stratos, replace the jars and restarted stratos again.
>>
>> e.g replaced the following 2 jars :
>>
>> /opt/wso2/apache-stratos/repository/components/patches/patch0000/org.apache.stratos.autoscaler_4.0.0.jar;
>>
>> /opt/wso2/apache-stratos/repository/components/plugins/org.apache.stratos.autoscaler_4.0.0.jar;
>>
>> However, now, every time I replace a jar, even so the source hasn’t
>> changed compared to the original binary,  the system fails to come up and
>> hangs there :
>>
>> ID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
>> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
>> delayed due to the following unsatisfied items:
>> {org.wso2.carbon.core.init.CarbonServerManager}
>> TID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
>> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
>> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
>> {org.wso2.carbon.core.init.CarbonServerManager}
>> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
>> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
>> delayed due to the following unsatisfied items:
>> {org.wso2.carbon.core.init.CarbonServerManager}
>> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
>> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
>> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
>> {org.wso2.carbon.core.init.CarbonServerManager}
>>
>>
>> As of now it seems my only choice is to rebuild the whole system  to test
>> some changes ? Is there a recommended patch sequence to test code changes
>> by just patching single jar files ? What about the REST API (stratos.war) ?
>>
>> Any ideas to get my patch process back to work, otherwise, the option to
>> rebuild all binaries + upload takes a long time and is very inefficient for
>> development ?
>>
>> Thanks
>>
>> Martin
>>
>>

Re: patching apache stratos on rc4 based branch

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Please refer to [1]. Same applies for Apache Stratos.
You don't need to build the whole product, only related jar need to be
patched.

[1]
http://stackoverflow.com/questions/11306929/how-to-apply-patch-files-in-wso2-carbon



Touched, not typed. Erroneous words are a feature, not a typo.
On Jun 20, 2014 4:46 AM, "Martin Eppel (meppel)" <me...@cisco.com> wrote:

>
> I used to be able to patch my stratos server by simply replacing jar files
> (every instance, - up to rc3) , however, since moving to code based on RC4
> this procedure started to fail.
>
> For example, to patch a change in the autoscaler I
> - stopped stratos, replace the jars and restarted stratos again.
>
> e.g replaced the following 2 jars :
>
> /opt/wso2/apache-stratos/repository/components/patches/patch0000/org.apache.stratos.autoscaler_4.0.0.jar;
>
> /opt/wso2/apache-stratos/repository/components/plugins/org.apache.stratos.autoscaler_4.0.0.jar;
>
> However, now, every time I replace a jar, even so the source hasn’t
> changed compared to the original binary,  the system fails to come up and
> hangs there :
>
> ID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
> delayed due to the following unsatisfied items:
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:37:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Carbon initialization is
> delayed due to the following unsatisfied items:
> {org.wso2.carbon.core.init.CarbonServerManager}
> TID: [0] [STRATOS] [2014-06-19 22:38:26,613]  WARN
> {org.wso2.carbon.core.init.CarbonServerManager} -  Waiting for required
> OSGiAxis2Service: org.apache.stratos.manager-4.0.0
> {org.wso2.carbon.core.init.CarbonServerManager}
>
>
> As of now it seems my only choice is to rebuild the whole system  to test
> some changes ? Is there a recommended patch sequence to test code changes
> by just patching single jar files ? What about the REST API (stratos.war) ?
>
> Any ideas to get my patch process back to work, otherwise, the option to
> rebuild all binaries + upload takes a long time and is very inefficient for
> development ?
>
> Thanks
>
> Martin
>
>