Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread Manoj Kumara
By maintaining the shaded lib's under application server there is a
drawback as these libraries get released each time we are doing an AS
release. So better to came up with a common location where we can maintain
and release separately as our orbit mode.

On possible approach we can use is maintain '*shaded-libs*' directory in
our orbit repo as a separate project and release them independently.

What would be the appropriate place for maintain this ?

Regards,
Manoj

*Manoj Kumara*
WSO2 Inc. *| **lean. enterprise. middleware.*
*Mobile:* +94 713 448188

On Tue, May 10, 2016 at 5:42 PM, KasunG Gajasinghe  wrote:

>
>
> On Tue, May 10, 2016 at 5:15 PM, Chiranga Alwis  wrote:
>
>> +1
>>
>> But shouldn't the naming of the module be more generic? Using "shaded"
>> refers more towards the implementation where we have used the plugin
>> Maven-Shade-Plugin. We have effectively relocated the classes.
>>
>> /modules/*relocated-libs*
>>  |- slf4j
>>  |- libthrift
>>
>> Isn't this a better naming convention?
>>
>
> What we will do is relocating classes. In the end, we will have is a *shaded
> artifact*. This is the terminology used in the shade plugin
> documentation, in my opinion, so shaded-libs matches better.
>
>
>>
>> Plus, this module will have to be the first to be built among all
>> Application Server modules' sub-modules since all other modules require it.
>>
>
> +1.
>
>
>>
>> On Tue, May 10, 2016 at 4:14 PM, Manoj Kumara  wrote:
>>
>>> +1
>>>
>>> *Manoj Kumara*
>>> WSO2 Inc. *| **lean. enterprise. middleware.*
>>> *Mobile:* +94 713 448188
>>>
>>> On Tue, May 10, 2016 at 3:58 PM, KasunG Gajasinghe 
>>> wrote:
>>>

 Yes, we need to avoid having common logging frameworks such as SLF4J in
 the classpath since it has a good possibility to lead to classloading
 issues for webapp developers .

 Since slf4j could be used by multiple jars, it should be a separate
 shaded jar. I believe the *artifactId* should reflect that it is
 shaded. Otherwise, the jar name will be confusing. So, shall we use the
 name *slf4j-shaded*?


 On Tue, May 10, 2016 at 3:40 PM, Kishanthan Thangarajah <
 kishant...@wso2.com> wrote:

> +1, let's use the AS repo and at build time, which can get installed
> during build time and this will also become part of release which will be
> deployed onto nexus.
>
> Is the naming is correct? Shouldn't it be "shaded"?
>

 +1.

 Thanks,
 KasunG


>
> On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:
>
>> Hi Dev's,
>>
>> During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
>> library available on the webapp libs directory as /lib also
>> contain the same library to be used by libthrift library used during stat
>> publishing. After analyzing the issue  with the team realized that this
>> occurred as Tomcat has a flat class path and multiple package versions
>> cannot be used as in OSGI runtime.
>>
>> To resolve this as per the recommendation provided by KasunG we used 
>> '*Maven
>> Shade Plugin* [1]' to shade package name (rename package structure
>> and usages) as other open-source projects like Tomcat, Maven use similar
>> patterns when using commonly used packages.
>>
>> As these shaded libraries required for AS distribution these libs
>> need to be maintained inside product it self I suggest to maintain them 
>> as
>> below with '*org.wso2.shade*' prefix on groupID. Thoughts ?
>>
>> /modules/*shade-libs*
>>  |- slf4j
>>  |- libthrift
>>
>> [1] https://maven.apache.org/plugins/maven-shade-plugin/
>>
>>
>> Regards,
>> Manoj
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com
> *
> Twitter - *http://twitter.com/kishanthan
> *
>



 --

 *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
 email: kasung AT spamfree wso2.com
 linked-in: http://lk.linkedin.com/in/gajasinghe
 blog: http://kasunbg.org



>>>
>>>
>>
>>
>> --
>> Chiranga Alwis,
>> Software Engineering Intern,
>> +94 77 5930497
>> +94 77 6368208
>>
>
>
>
> --
>
> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread KasunG Gajasinghe
On Tue, May 10, 2016 at 5:15 PM, Chiranga Alwis  wrote:

> +1
>
> But shouldn't the naming of the module be more generic? Using "shaded"
> refers more towards the implementation where we have used the plugin
> Maven-Shade-Plugin. We have effectively relocated the classes.
>
> /modules/*relocated-libs*
>  |- slf4j
>  |- libthrift
>
> Isn't this a better naming convention?
>

What we will do is relocating classes. In the end, we will have is a *shaded
artifact*. This is the terminology used in the shade plugin documentation,
in my opinion, so shaded-libs matches better.


>
> Plus, this module will have to be the first to be built among all
> Application Server modules' sub-modules since all other modules require it.
>

+1.


>
> On Tue, May 10, 2016 at 4:14 PM, Manoj Kumara  wrote:
>
>> +1
>>
>> *Manoj Kumara*
>> WSO2 Inc. *| **lean. enterprise. middleware.*
>> *Mobile:* +94 713 448188
>>
>> On Tue, May 10, 2016 at 3:58 PM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>> Yes, we need to avoid having common logging frameworks such as SLF4J in
>>> the classpath since it has a good possibility to lead to classloading
>>> issues for webapp developers .
>>>
>>> Since slf4j could be used by multiple jars, it should be a separate
>>> shaded jar. I believe the *artifactId* should reflect that it is
>>> shaded. Otherwise, the jar name will be confusing. So, shall we use the
>>> name *slf4j-shaded*?
>>>
>>>
>>> On Tue, May 10, 2016 at 3:40 PM, Kishanthan Thangarajah <
>>> kishant...@wso2.com> wrote:
>>>
 +1, let's use the AS repo and at build time, which can get installed
 during build time and this will also become part of release which will be
 deployed onto nexus.

 Is the naming is correct? Shouldn't it be "shaded"?

>>>
>>> +1.
>>>
>>> Thanks,
>>> KasunG
>>>
>>>

 On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:

> Hi Dev's,
>
> During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
> library available on the webapp libs directory as /lib also
> contain the same library to be used by libthrift library used during stat
> publishing. After analyzing the issue  with the team realized that this
> occurred as Tomcat has a flat class path and multiple package versions
> cannot be used as in OSGI runtime.
>
> To resolve this as per the recommendation provided by KasunG we used 
> '*Maven
> Shade Plugin* [1]' to shade package name (rename package structure
> and usages) as other open-source projects like Tomcat, Maven use similar
> patterns when using commonly used packages.
>
> As these shaded libraries required for AS distribution these libs need
> to be maintained inside product it self I suggest to maintain them as 
> below
> with '*org.wso2.shade*' prefix on groupID. Thoughts ?
>
> /modules/*shade-libs*
>  |- slf4j
>  |- libthrift
>
> [1] https://maven.apache.org/plugins/maven-shade-plugin/
>
>
> Regards,
> Manoj
>



 --
 *Kishanthan Thangarajah*
 Associate Technical Lead,
 Platform Technologies Team,
 WSO2, Inc.
 lean.enterprise.middleware

 Mobile - +94773426635
 Blog - *http://kishanthan.wordpress.com
 *
 Twitter - *http://twitter.com/kishanthan
 *

>>>
>>>
>>>
>>> --
>>>
>>> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
>>> email: kasung AT spamfree wso2.com
>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>> blog: http://kasunbg.org
>>>
>>>
>>>
>>
>>
>
>
> --
> Chiranga Alwis,
> Software Engineering Intern,
> +94 77 5930497
> +94 77 6368208
>



-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread Chiranga Alwis
+1

But shouldn't the naming of the module be more generic? Using "shaded"
refers more towards the implementation where we have used the plugin
Maven-Shade-Plugin. We have effectively relocated the classes.

/modules/*relocated-libs*
 |- slf4j
 |- libthrift

Isn't this a better naming convention?

Plus, this module will have to be the first to be built among all
Application Server modules' sub-modules since all other modules require it.

On Tue, May 10, 2016 at 4:14 PM, Manoj Kumara  wrote:

> +1
>
> *Manoj Kumara*
> WSO2 Inc. *| **lean. enterprise. middleware.*
> *Mobile:* +94 713 448188
>
> On Tue, May 10, 2016 at 3:58 PM, KasunG Gajasinghe 
> wrote:
>
>>
>> Yes, we need to avoid having common logging frameworks such as SLF4J in
>> the classpath since it has a good possibility to lead to classloading
>> issues for webapp developers .
>>
>> Since slf4j could be used by multiple jars, it should be a separate
>> shaded jar. I believe the *artifactId* should reflect that it is shaded.
>> Otherwise, the jar name will be confusing. So, shall we use the name
>> *slf4j-shaded*?
>>
>>
>> On Tue, May 10, 2016 at 3:40 PM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> +1, let's use the AS repo and at build time, which can get installed
>>> during build time and this will also become part of release which will be
>>> deployed onto nexus.
>>>
>>> Is the naming is correct? Shouldn't it be "shaded"?
>>>
>>
>> +1.
>>
>> Thanks,
>> KasunG
>>
>>
>>>
>>> On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:
>>>
 Hi Dev's,

 During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
 library available on the webapp libs directory as /lib also
 contain the same library to be used by libthrift library used during stat
 publishing. After analyzing the issue  with the team realized that this
 occurred as Tomcat has a flat class path and multiple package versions
 cannot be used as in OSGI runtime.

 To resolve this as per the recommendation provided by KasunG we used 
 '*Maven
 Shade Plugin* [1]' to shade package name (rename package structure and
 usages) as other open-source projects like Tomcat, Maven use similar
 patterns when using commonly used packages.

 As these shaded libraries required for AS distribution these libs need
 to be maintained inside product it self I suggest to maintain them as below
 with '*org.wso2.shade*' prefix on groupID. Thoughts ?

 /modules/*shade-libs*
  |- slf4j
  |- libthrift

 [1] https://maven.apache.org/plugins/maven-shade-plugin/


 Regards,
 Manoj

>>>
>>>
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Associate Technical Lead,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com
>>> *
>>> Twitter - *http://twitter.com/kishanthan
>>> *
>>>
>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>>
>>
>>
>
>


-- 
Chiranga Alwis,
Software Engineering Intern,
+94 77 5930497
+94 77 6368208
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread Manoj Kumara
+1

*Manoj Kumara*
WSO2 Inc. *| **lean. enterprise. middleware.*
*Mobile:* +94 713 448188

On Tue, May 10, 2016 at 3:58 PM, KasunG Gajasinghe  wrote:

>
> Yes, we need to avoid having common logging frameworks such as SLF4J in
> the classpath since it has a good possibility to lead to classloading
> issues for webapp developers .
>
> Since slf4j could be used by multiple jars, it should be a separate shaded
> jar. I believe the *artifactId* should reflect that it is shaded.
> Otherwise, the jar name will be confusing. So, shall we use the name
> *slf4j-shaded*?
>
>
> On Tue, May 10, 2016 at 3:40 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> +1, let's use the AS repo and at build time, which can get installed
>> during build time and this will also become part of release which will be
>> deployed onto nexus.
>>
>> Is the naming is correct? Shouldn't it be "shaded"?
>>
>
> +1.
>
> Thanks,
> KasunG
>
>
>>
>> On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:
>>
>>> Hi Dev's,
>>>
>>> During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
>>> library available on the webapp libs directory as /lib also
>>> contain the same library to be used by libthrift library used during stat
>>> publishing. After analyzing the issue  with the team realized that this
>>> occurred as Tomcat has a flat class path and multiple package versions
>>> cannot be used as in OSGI runtime.
>>>
>>> To resolve this as per the recommendation provided by KasunG we used '*Maven
>>> Shade Plugin* [1]' to shade package name (rename package structure and
>>> usages) as other open-source projects like Tomcat, Maven use similar
>>> patterns when using commonly used packages.
>>>
>>> As these shaded libraries required for AS distribution these libs need
>>> to be maintained inside product it self I suggest to maintain them as below
>>> with '*org.wso2.shade*' prefix on groupID. Thoughts ?
>>>
>>> /modules/*shade-libs*
>>>  |- slf4j
>>>  |- libthrift
>>>
>>> [1] https://maven.apache.org/plugins/maven-shade-plugin/
>>>
>>>
>>> Regards,
>>> Manoj
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Associate Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
>
> *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread KasunG Gajasinghe
Yes, we need to avoid having common logging frameworks such as SLF4J in the
classpath since it has a good possibility to lead to classloading issues
for webapp developers .

Since slf4j could be used by multiple jars, it should be a separate shaded
jar. I believe the *artifactId* should reflect that it is shaded.
Otherwise, the jar name will be confusing. So, shall we use the name
*slf4j-shaded*?


On Tue, May 10, 2016 at 3:40 PM, Kishanthan Thangarajah  wrote:

> +1, let's use the AS repo and at build time, which can get installed
> during build time and this will also become part of release which will be
> deployed onto nexus.
>
> Is the naming is correct? Shouldn't it be "shaded"?
>

+1.

Thanks,
KasunG


>
> On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:
>
>> Hi Dev's,
>>
>> During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
>> library available on the webapp libs directory as /lib also
>> contain the same library to be used by libthrift library used during stat
>> publishing. After analyzing the issue  with the team realized that this
>> occurred as Tomcat has a flat class path and multiple package versions
>> cannot be used as in OSGI runtime.
>>
>> To resolve this as per the recommendation provided by KasunG we used '*Maven
>> Shade Plugin* [1]' to shade package name (rename package structure and
>> usages) as other open-source projects like Tomcat, Maven use similar
>> patterns when using commonly used packages.
>>
>> As these shaded libraries required for AS distribution these libs need to
>> be maintained inside product it self I suggest to maintain them as below
>> with '*org.wso2.shade*' prefix on groupID. Thoughts ?
>>
>> /modules/*shade-libs*
>>  |- slf4j
>>  |- libthrift
>>
>> [1] https://maven.apache.org/plugins/maven-shade-plugin/
>>
>>
>> Regards,
>> Manoj
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 

*Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread Kishanthan Thangarajah
+1, let's use the AS repo and at build time, which can get installed during
build time and this will also become part of release which will be deployed
onto nexus.

Is the naming is correct? Shouldn't it be "shaded"?

On Tue, May 10, 2016 at 3:00 PM, Manoj Kumara  wrote:

> Hi Dev's,
>
> During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j
> library available on the webapp libs directory as /lib also
> contain the same library to be used by libthrift library used during stat
> publishing. After analyzing the issue  with the team realized that this
> occurred as Tomcat has a flat class path and multiple package versions
> cannot be used as in OSGI runtime.
>
> To resolve this as per the recommendation provided by KasunG we used '*Maven
> Shade Plugin* [1]' to shade package name (rename package structure and
> usages) as other open-source projects like Tomcat, Maven use similar
> patterns when using commonly used packages.
>
> As these shaded libraries required for AS distribution these libs need to
> be maintained inside product it self I suggest to maintain them as below
> with '*org.wso2.shade*' prefix on groupID. Thoughts ?
>
> /modules/*shade-libs*
>  |- slf4j
>  |- libthrift
>
> [1] https://maven.apache.org/plugins/maven-shade-plugin/
>
>
> Regards,
> Manoj
>



-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Java LinkageError on AS 6.0.0 when webapp's contain libraries exist on server lib directory

2016-05-10 Thread Manoj Kumara
Hi Dev's,

During testing WSO2AS 6.0.0 we encounters $Subject error when SLF4j library
available on the webapp libs directory as /lib also contain the
same library to be used by libthrift library used during stat publishing.
After analyzing the issue  with the team realized that this occurred as
Tomcat has a flat class path and multiple package versions cannot be used
as in OSGI runtime.

To resolve this as per the recommendation provided by KasunG we used '*Maven
Shade Plugin* [1]' to shade package name (rename package structure and
usages) as other open-source projects like Tomcat, Maven use similar
patterns when using commonly used packages.

As these shaded libraries required for AS distribution these libs need to
be maintained inside product it self I suggest to maintain them as below
with '*org.wso2.shade*' prefix on groupID. Thoughts ?

/modules/*shade-libs*
 |- slf4j
 |- libthrift

[1] https://maven.apache.org/plugins/maven-shade-plugin/


Regards,
Manoj
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev