Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-10-10 Thread Ruwan Abeykoon
Hi All,

Created
https://github.com/wso2/carbon-kernel/tree/4.4.x_java10

I do not have permission to following repos. I added respective owners on
this tread.

maven-tools
carbon-metrics
carbon-apimgt
product-apim

Cheers,
Ruwan

On Thu, Oct 11, 2018 at 10:42 AM Tharindu Wijewardane 
wrote:

> Hi Ruwan,
>
> Will you be able to create following new branches. Once created I will
> send PRs to those new branches.
>
> WSO2 repo
>
> Base branch
>
> New branch
>
> maven-tools
>
> master
>
> master_java10
>
> carbon-kernel
>
> 4.4.x
>
> 4.4.x_java10
>
> carbon-metrics
>
> 1.x.x
>
> 1.x.x_java10
>
> carbon-apimgt
>
> 6.x
>
> 6.x_java10
>
> product-apim
>
> 2.x
>
> 2.x_java10
>
> Thanks
>
> On Mon, Oct 8, 2018 at 10:39 AM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> Carbon kernel can be now started on java 10 without any exceptions. The
>> management console is accessible through a web browser. Also all the tests
>> in maven build are passing (java 8).
>>
>> Moving onto the APIM,
>> As I mentioned in a previous email, I temporally commented out following
>> 3 feature groups in order to build the APIM.
>>
>> org.wso2.carbon.apimgt.keymanager.feature.group
>> org.wso2.carbon.apimgt.feature.group
>> org.wso2.carbon.apimgt.store.feature.group
>>
>> Those feature groups require upgrading OSGi in IS related libraries and
>> there are several of them.
>>
>> Moving forward without those for now, when the APIM product is started
>> there are some exceptions and errors. (Now that the logs are working those
>> errors are visible.)
>>
>>
>> *[2018-10-07 21:17:53,314] FATAL - ServiceBusInitializer Failed to
>> initialize ESB due to a fatal error*
>> *java.lang.NoClassDefFoundError: sun/misc/Service*
>> * at
>> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.registerExtensions(ConfigurationFactoryAndSerializerFinder.java:117)*
>> * at
>> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.loadConfigurationFatoriesAndSerializers(ConfigurationFactoryAndSerializerFinder.java:105)*
>> * at
>> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.getInstance(ConfigurationFactoryAndSerializerFinder.java:70)*
>> *...*
>> *Caused by: java.lang.ClassNotFoundException: sun.misc.Service cannot be
>> found by synapse-core_2.1.7.wso2v78*
>> * at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)*
>>
>> *[2018-10-07 21:17:53,881] ERROR - ApplicationRegistry
>> java.lang.ExceptionInInitializerError*
>> *[2018-10-07 21:17:53,882] ERROR - Main Exception during startup.
>> Triggering shutdown *
>> *org.wso2.andes.kernel.AndesException: Unable to initialise application
>> registry*
>> * at org.wso2.andes.server.Broker.startupImpl(Broker.java:307)*
>> * at org.wso2.andes.server.Broker.startup(Broker.java:110)*
>> *...*
>> *Caused by: java.lang.IllegalStateException: Metric Service is not
>> available!*
>> * at
>> org.wso2.carbon.metrics.manager.ServiceReferenceHolder.getMetricService(ServiceReferenceHolder.java:40)*
>>
>> Those seems to be related to Synapse and Andes.
>>
>> Thanks
>>
>> On Wed, Oct 3, 2018 at 6:29 PM Selvaratnam Uthaiyashankar <
>> shan...@wso2.com> wrote:
>>
>>> Great!. Thanks for the update.
>>>
>>> On Wed, Oct 3, 2018 at 11:22 AM Tharindu Wijewardane 
>>> wrote:
>>>
 Hi all,

 With the help of eclipse community I got to know that they have removed
 org.eclipse.osgi.service.resolver.PlatformAdmin service from the osgi
 framework in Luna version and adding the
 bundle: org.eclipse.osgi.compatibility.state to Carbon runtime feature
 fixed the missing service issue. Now All the bundles which are in active
 state with java 8 are in Active state with java 10 too.

 Also the issue with CarbonConsoleAppender (NoClassDefFoundError: Could
 not initialize class CarbonContextDataHolder) could be fixed by adding
 deprecated javax classes back to the classpath. It fixed some other similar
 issues which ware due to the missing javax.activation and javax.xml 
 classes.
 Now the logs are printed on the osgi terminal using the
 CarbonConsoleAppender itself.

 Now the only remaining issue with Carbon kernel (as it seems) is a set
 of tomcat exceptions. I am currently working on it.

 Thanks

 On Thu, Sep 27, 2018 at 3:01 PM Tharindu Wijewardane <
 tharin...@wso2.com> wrote:

> Hi all,
>
> The logs were not getting printed because following exception is
> thrown through CarbonConsoleAppender.
>
> "NoClassDefFoundError: Could not initialize class
> CarbonContextDataHolder"
>
> CarbonContextDataHolder has a set of javax.naming* imports and since
> java 10 has deprecated using them I added jndi jar which contains those
> classes in to a folder inside the pack and modifies the wso2server.sh to
> add those to the classpath. Also I added the jars in endorsed dir to the
> classpath since extension 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-10-10 Thread Tharindu Wijewardane
Hi Ruwan,

Will you be able to create following new branches. Once created I will send
PRs to those new branches.

WSO2 repo

Base branch

New branch

maven-tools

master

master_java10

carbon-kernel

4.4.x

4.4.x_java10

carbon-metrics

1.x.x

1.x.x_java10

carbon-apimgt

6.x

6.x_java10

product-apim

2.x

2.x_java10

Thanks

On Mon, Oct 8, 2018 at 10:39 AM Tharindu Wijewardane 
wrote:

> Hi all,
>
> Carbon kernel can be now started on java 10 without any exceptions. The
> management console is accessible through a web browser. Also all the tests
> in maven build are passing (java 8).
>
> Moving onto the APIM,
> As I mentioned in a previous email, I temporally commented out following 3
> feature groups in order to build the APIM.
>
> org.wso2.carbon.apimgt.keymanager.feature.group
> org.wso2.carbon.apimgt.feature.group
> org.wso2.carbon.apimgt.store.feature.group
>
> Those feature groups require upgrading OSGi in IS related libraries and
> there are several of them.
>
> Moving forward without those for now, when the APIM product is started
> there are some exceptions and errors. (Now that the logs are working those
> errors are visible.)
>
>
> *[2018-10-07 21:17:53,314] FATAL - ServiceBusInitializer Failed to
> initialize ESB due to a fatal error*
> *java.lang.NoClassDefFoundError: sun/misc/Service*
> * at
> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.registerExtensions(ConfigurationFactoryAndSerializerFinder.java:117)*
> * at
> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.loadConfigurationFatoriesAndSerializers(ConfigurationFactoryAndSerializerFinder.java:105)*
> * at
> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.getInstance(ConfigurationFactoryAndSerializerFinder.java:70)*
> *...*
> *Caused by: java.lang.ClassNotFoundException: sun.misc.Service cannot be
> found by synapse-core_2.1.7.wso2v78*
> * at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)*
>
> *[2018-10-07 21:17:53,881] ERROR - ApplicationRegistry
> java.lang.ExceptionInInitializerError*
> *[2018-10-07 21:17:53,882] ERROR - Main Exception during startup.
> Triggering shutdown *
> *org.wso2.andes.kernel.AndesException: Unable to initialise application
> registry*
> * at org.wso2.andes.server.Broker.startupImpl(Broker.java:307)*
> * at org.wso2.andes.server.Broker.startup(Broker.java:110)*
> *...*
> *Caused by: java.lang.IllegalStateException: Metric Service is not
> available!*
> * at
> org.wso2.carbon.metrics.manager.ServiceReferenceHolder.getMetricService(ServiceReferenceHolder.java:40)*
>
> Those seems to be related to Synapse and Andes.
>
> Thanks
>
> On Wed, Oct 3, 2018 at 6:29 PM Selvaratnam Uthaiyashankar <
> shan...@wso2.com> wrote:
>
>> Great!. Thanks for the update.
>>
>> On Wed, Oct 3, 2018 at 11:22 AM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> With the help of eclipse community I got to know that they have removed
>>> org.eclipse.osgi.service.resolver.PlatformAdmin service from the osgi
>>> framework in Luna version and adding the
>>> bundle: org.eclipse.osgi.compatibility.state to Carbon runtime feature
>>> fixed the missing service issue. Now All the bundles which are in active
>>> state with java 8 are in Active state with java 10 too.
>>>
>>> Also the issue with CarbonConsoleAppender (NoClassDefFoundError: Could
>>> not initialize class CarbonContextDataHolder) could be fixed by adding
>>> deprecated javax classes back to the classpath. It fixed some other similar
>>> issues which ware due to the missing javax.activation and javax.xml classes.
>>> Now the logs are printed on the osgi terminal using the
>>> CarbonConsoleAppender itself.
>>>
>>> Now the only remaining issue with Carbon kernel (as it seems) is a set
>>> of tomcat exceptions. I am currently working on it.
>>>
>>> Thanks
>>>
>>> On Thu, Sep 27, 2018 at 3:01 PM Tharindu Wijewardane 
>>> wrote:
>>>
 Hi all,

 The logs were not getting printed because following exception is thrown
 through CarbonConsoleAppender.

 "NoClassDefFoundError: Could not initialize class
 CarbonContextDataHolder"

 CarbonContextDataHolder has a set of javax.naming* imports and since
 java 10 has deprecated using them I added jndi jar which contains those
 classes in to a folder inside the pack and modifies the wso2server.sh to
 add those to the classpath. Also I added the jars in endorsed dir to the
 classpath since extension class loader is not present in jdk 10 and classes
 in endorsed dir location is not automatically loaded.
 Still I could not solve the above issue and decided to use the default
 log4j ConsoleAppender instead of CarbonConsoleAppender for now.

 When I compare the carbon kernel bundles in Active state in java 8 and
 java 10 environments I noticed following bundles are not activated in java
 10 env.

 org.wso2.carbon.base
 org.wso2.carbon.core
 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-10-07 Thread Tharindu Wijewardane
Hi all,

Carbon kernel can be now started on java 10 without any exceptions. The
management console is accessible through a web browser. Also all the tests
in maven build are passing (java 8).

Moving onto the APIM,
As I mentioned in a previous email, I temporally commented out following 3
feature groups in order to build the APIM.

org.wso2.carbon.apimgt.keymanager.feature.group
org.wso2.carbon.apimgt.feature.group
org.wso2.carbon.apimgt.store.feature.group

Those feature groups require upgrading OSGi in IS related libraries and
there are several of them.

Moving forward without those for now, when the APIM product is started
there are some exceptions and errors. (Now that the logs are working those
errors are visible.)


*[2018-10-07 21:17:53,314] FATAL - ServiceBusInitializer Failed to
initialize ESB due to a fatal error*
*java.lang.NoClassDefFoundError: sun/misc/Service*
* at
org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.registerExtensions(ConfigurationFactoryAndSerializerFinder.java:117)*
* at
org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.loadConfigurationFatoriesAndSerializers(ConfigurationFactoryAndSerializerFinder.java:105)*
* at
org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.getInstance(ConfigurationFactoryAndSerializerFinder.java:70)*
*...*
*Caused by: java.lang.ClassNotFoundException: sun.misc.Service cannot be
found by synapse-core_2.1.7.wso2v78*
* at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:448)*

*[2018-10-07 21:17:53,881] ERROR - ApplicationRegistry
java.lang.ExceptionInInitializerError*
*[2018-10-07 21:17:53,882] ERROR - Main Exception during startup.
Triggering shutdown *
*org.wso2.andes.kernel.AndesException: Unable to initialise application
registry*
* at org.wso2.andes.server.Broker.startupImpl(Broker.java:307)*
* at org.wso2.andes.server.Broker.startup(Broker.java:110)*
*...*
*Caused by: java.lang.IllegalStateException: Metric Service is not
available!*
* at
org.wso2.carbon.metrics.manager.ServiceReferenceHolder.getMetricService(ServiceReferenceHolder.java:40)*

Those seems to be related to Synapse and Andes.

Thanks

On Wed, Oct 3, 2018 at 6:29 PM Selvaratnam Uthaiyashankar 
wrote:

> Great!. Thanks for the update.
>
> On Wed, Oct 3, 2018 at 11:22 AM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> With the help of eclipse community I got to know that they have removed
>> org.eclipse.osgi.service.resolver.PlatformAdmin service from the osgi
>> framework in Luna version and adding the
>> bundle: org.eclipse.osgi.compatibility.state to Carbon runtime feature
>> fixed the missing service issue. Now All the bundles which are in active
>> state with java 8 are in Active state with java 10 too.
>>
>> Also the issue with CarbonConsoleAppender (NoClassDefFoundError: Could
>> not initialize class CarbonContextDataHolder) could be fixed by adding
>> deprecated javax classes back to the classpath. It fixed some other similar
>> issues which ware due to the missing javax.activation and javax.xml classes.
>> Now the logs are printed on the osgi terminal using the
>> CarbonConsoleAppender itself.
>>
>> Now the only remaining issue with Carbon kernel (as it seems) is a set of
>> tomcat exceptions. I am currently working on it.
>>
>> Thanks
>>
>> On Thu, Sep 27, 2018 at 3:01 PM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> The logs were not getting printed because following exception is thrown
>>> through CarbonConsoleAppender.
>>>
>>> "NoClassDefFoundError: Could not initialize class
>>> CarbonContextDataHolder"
>>>
>>> CarbonContextDataHolder has a set of javax.naming* imports and since
>>> java 10 has deprecated using them I added jndi jar which contains those
>>> classes in to a folder inside the pack and modifies the wso2server.sh to
>>> add those to the classpath. Also I added the jars in endorsed dir to the
>>> classpath since extension class loader is not present in jdk 10 and classes
>>> in endorsed dir location is not automatically loaded.
>>> Still I could not solve the above issue and decided to use the default
>>> log4j ConsoleAppender instead of CarbonConsoleAppender for now.
>>>
>>> When I compare the carbon kernel bundles in Active state in java 8 and
>>> java 10 environments I noticed following bundles are not activated in java
>>> 10 env.
>>>
>>> org.wso2.carbon.base
>>> org.wso2.carbon.core
>>> org.wso2.carbon.logging
>>> org.wso2.carbon.user.core
>>>
>>> When diagnosed following issue is printed for all of them.
>>>
>>> IllegalStateException: Missing service:
>>> org.eclipse.osgi.service.resolver.PlatformAdmin
>>>
>>> Currently I am trying to fix that issue. Not much information is
>>> available in the community on that and I have posted it in eclipse forums.
>>>
>>> Thanks
>>>
>>> On Fri, Sep 21, 2018 at 5:35 PM Tharindu Wijewardane 
>>> wrote:
>>>
 Hi all,

 I was able to fix the previous issue (some osgi services were not
 found) by 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-10-03 Thread Selvaratnam Uthaiyashankar
Great!. Thanks for the update.

On Wed, Oct 3, 2018 at 11:22 AM Tharindu Wijewardane 
wrote:

> Hi all,
>
> With the help of eclipse community I got to know that they have removed
> org.eclipse.osgi.service.resolver.PlatformAdmin service from the osgi
> framework in Luna version and adding the
> bundle: org.eclipse.osgi.compatibility.state to Carbon runtime feature
> fixed the missing service issue. Now All the bundles which are in active
> state with java 8 are in Active state with java 10 too.
>
> Also the issue with CarbonConsoleAppender (NoClassDefFoundError: Could not
> initialize class CarbonContextDataHolder) could be fixed by adding
> deprecated javax classes back to the classpath. It fixed some other similar
> issues which ware due to the missing javax.activation and javax.xml classes.
> Now the logs are printed on the osgi terminal using the
> CarbonConsoleAppender itself.
>
> Now the only remaining issue with Carbon kernel (as it seems) is a set of
> tomcat exceptions. I am currently working on it.
>
> Thanks
>
> On Thu, Sep 27, 2018 at 3:01 PM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> The logs were not getting printed because following exception is thrown
>> through CarbonConsoleAppender.
>>
>> "NoClassDefFoundError: Could not initialize class
>> CarbonContextDataHolder"
>>
>> CarbonContextDataHolder has a set of javax.naming* imports and since java
>> 10 has deprecated using them I added jndi jar which contains those classes
>> in to a folder inside the pack and modifies the wso2server.sh to add those
>> to the classpath. Also I added the jars in endorsed dir to the classpath
>> since extension class loader is not present in jdk 10 and classes in
>> endorsed dir location is not automatically loaded.
>> Still I could not solve the above issue and decided to use the default
>> log4j ConsoleAppender instead of CarbonConsoleAppender for now.
>>
>> When I compare the carbon kernel bundles in Active state in java 8 and
>> java 10 environments I noticed following bundles are not activated in java
>> 10 env.
>>
>> org.wso2.carbon.base
>> org.wso2.carbon.core
>> org.wso2.carbon.logging
>> org.wso2.carbon.user.core
>>
>> When diagnosed following issue is printed for all of them.
>>
>> IllegalStateException: Missing service:
>> org.eclipse.osgi.service.resolver.PlatformAdmin
>>
>> Currently I am trying to fix that issue. Not much information is
>> available in the community on that and I have posted it in eclipse forums.
>>
>> Thanks
>>
>> On Fri, Sep 21, 2018 at 5:35 PM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> I was able to fix the previous issue (some osgi services were not found)
>>> by changing tycho/sisu p2 dependency versions of carbon p2 plugin to the
>>> versions used in carbon feature plugin.
>>> Then there were issues installing features which includes bundles from
>>> identity server related dependencies
>>> (carbon-identity, carbon-identity-framework, ...). I have to upgrade the
>>> osgi platform of those as well but I commented out those features for now
>>> (only 3 feature groups) and went ahead trying to get the APIM server
>>> started first.
>>>
>>> I could start the APIM framework on java 10 without those features but
>>> the mgt console URL was not accessible possibly due to incompatibilities of
>>> tomcat7 with java 10. Also there wasn't any error logs printed. As Ruwan
>>> has previously mentioned in another mail thread, existing logging mechanism
>>> in C4 is not compatible with java 10. As his instructions I will try to get
>>> the logger working first.
>>>
>>> Thanks
>>>
>>> On Wed, Sep 12, 2018 at 12:44 PM Tharindu Wijewardane <
>>> tharin...@wso2.com> wrote:
>>>
 Hi all,

 I am trying to build APIM 2.x branch with modified versions of
 following dependencies (with upgraded osgi and some plugins)


 carbon-apimgt  version 6.4.27 (6.x branch)

 carbon-kernel version 4.4.35 (4.4.x branch)

 carbon-metrics version 1.2.4 (1.x.x branch)
 carbon p2 plugin version 1.6.1

 Originally APIM 2.x branch depended on carbon-apimgt 6.4.17 and 
 carbon-metrics
 1.2.3 and carbon p2 plugin 1.5.4.
 I chose the above branches because they had artifact versions closer to
 the existing versions and for avoiding build errors I got when trying out
 different branches.
 Please let me know if there is a better way to select the branches.

 Currently I am having issues building P2 profile generation module of
 APIM. Please see the following error.


 *Cannot complete the install because one or more required items could
 not be found. Software being installed: WSO2 Carbon - API Publisher Feature
 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1) Missing
 requirement: org.wso2.carbon.apimgt.hostobjects 6.4.27.1
 (org.wso2.carbon.apimgt.hostobjects 6.4.27.1) requires 'osgi.service;
 (objectClass=org.wso2.carbon.user.core.service.RealmService)' but 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-10-02 Thread Tharindu Wijewardane
Hi all,

With the help of eclipse community I got to know that they have removed
org.eclipse.osgi.service.resolver.PlatformAdmin service from the osgi
framework in Luna version and adding the
bundle: org.eclipse.osgi.compatibility.state to Carbon runtime feature
fixed the missing service issue. Now All the bundles which are in active
state with java 8 are in Active state with java 10 too.

Also the issue with CarbonConsoleAppender (NoClassDefFoundError: Could not
initialize class CarbonContextDataHolder) could be fixed by adding
deprecated javax classes back to the classpath. It fixed some other similar
issues which ware due to the missing javax.activation and javax.xml classes.
Now the logs are printed on the osgi terminal using the
CarbonConsoleAppender itself.

Now the only remaining issue with Carbon kernel (as it seems) is a set of
tomcat exceptions. I am currently working on it.

Thanks

On Thu, Sep 27, 2018 at 3:01 PM Tharindu Wijewardane 
wrote:

> Hi all,
>
> The logs were not getting printed because following exception is thrown
> through CarbonConsoleAppender.
>
> "NoClassDefFoundError: Could not initialize class CarbonContextDataHolder"
>
> CarbonContextDataHolder has a set of javax.naming* imports and since java
> 10 has deprecated using them I added jndi jar which contains those classes
> in to a folder inside the pack and modifies the wso2server.sh to add those
> to the classpath. Also I added the jars in endorsed dir to the classpath
> since extension class loader is not present in jdk 10 and classes in
> endorsed dir location is not automatically loaded.
> Still I could not solve the above issue and decided to use the default
> log4j ConsoleAppender instead of CarbonConsoleAppender for now.
>
> When I compare the carbon kernel bundles in Active state in java 8 and
> java 10 environments I noticed following bundles are not activated in java
> 10 env.
>
> org.wso2.carbon.base
> org.wso2.carbon.core
> org.wso2.carbon.logging
> org.wso2.carbon.user.core
>
> When diagnosed following issue is printed for all of them.
>
> IllegalStateException: Missing service:
> org.eclipse.osgi.service.resolver.PlatformAdmin
>
> Currently I am trying to fix that issue. Not much information is available
> in the community on that and I have posted it in eclipse forums.
>
> Thanks
>
> On Fri, Sep 21, 2018 at 5:35 PM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> I was able to fix the previous issue (some osgi services were not found)
>> by changing tycho/sisu p2 dependency versions of carbon p2 plugin to the
>> versions used in carbon feature plugin.
>> Then there were issues installing features which includes bundles from
>> identity server related dependencies
>> (carbon-identity, carbon-identity-framework, ...). I have to upgrade the
>> osgi platform of those as well but I commented out those features for now
>> (only 3 feature groups) and went ahead trying to get the APIM server
>> started first.
>>
>> I could start the APIM framework on java 10 without those features but
>> the mgt console URL was not accessible possibly due to incompatibilities of
>> tomcat7 with java 10. Also there wasn't any error logs printed. As Ruwan
>> has previously mentioned in another mail thread, existing logging mechanism
>> in C4 is not compatible with java 10. As his instructions I will try to get
>> the logger working first.
>>
>> Thanks
>>
>> On Wed, Sep 12, 2018 at 12:44 PM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> I am trying to build APIM 2.x branch with modified versions of following
>>> dependencies (with upgraded osgi and some plugins)
>>>
>>>
>>> carbon-apimgt  version 6.4.27 (6.x branch)
>>>
>>> carbon-kernel version 4.4.35 (4.4.x branch)
>>>
>>> carbon-metrics version 1.2.4 (1.x.x branch)
>>> carbon p2 plugin version 1.6.1
>>>
>>> Originally APIM 2.x branch depended on carbon-apimgt 6.4.17 and 
>>> carbon-metrics
>>> 1.2.3 and carbon p2 plugin 1.5.4.
>>> I chose the above branches because they had artifact versions closer to
>>> the existing versions and for avoiding build errors I got when trying out
>>> different branches.
>>> Please let me know if there is a better way to select the branches.
>>>
>>> Currently I am having issues building P2 profile generation module of
>>> APIM. Please see the following error.
>>>
>>>
>>> *Cannot complete the install because one or more required items could
>>> not be found. Software being installed: WSO2 Carbon - API Publisher Feature
>>> 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1) Missing
>>> requirement: org.wso2.carbon.apimgt.hostobjects 6.4.27.1
>>> (org.wso2.carbon.apimgt.hostobjects 6.4.27.1) requires 'osgi.service;
>>> (objectClass=org.wso2.carbon.user.core.service.RealmService)' but it could
>>> not be found Cannot satisfy dependency:  From: WSO2 Carbon - API Publisher
>>> Feature 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1)
>>> To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.hostobjects
>>> 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-27 Thread Tharindu Wijewardane
Hi all,

The logs were not getting printed because following exception is thrown
through CarbonConsoleAppender.

"NoClassDefFoundError: Could not initialize class CarbonContextDataHolder"

CarbonContextDataHolder has a set of javax.naming* imports and since java
10 has deprecated using them I added jndi jar which contains those classes
in to a folder inside the pack and modifies the wso2server.sh to add those
to the classpath. Also I added the jars in endorsed dir to the classpath
since extension class loader is not present in jdk 10 and classes in
endorsed dir location is not automatically loaded.
Still I could not solve the above issue and decided to use the default
log4j ConsoleAppender instead of CarbonConsoleAppender for now.

When I compare the carbon kernel bundles in Active state in java 8 and java
10 environments I noticed following bundles are not activated in java 10
env.

org.wso2.carbon.base
org.wso2.carbon.core
org.wso2.carbon.logging
org.wso2.carbon.user.core

When diagnosed following issue is printed for all of them.

IllegalStateException: Missing service:
org.eclipse.osgi.service.resolver.PlatformAdmin

Currently I am trying to fix that issue. Not much information is available
in the community on that and I have posted it in eclipse forums.

Thanks

On Fri, Sep 21, 2018 at 5:35 PM Tharindu Wijewardane 
wrote:

> Hi all,
>
> I was able to fix the previous issue (some osgi services were not found)
> by changing tycho/sisu p2 dependency versions of carbon p2 plugin to the
> versions used in carbon feature plugin.
> Then there were issues installing features which includes bundles from
> identity server related dependencies
> (carbon-identity, carbon-identity-framework, ...). I have to upgrade the
> osgi platform of those as well but I commented out those features for now
> (only 3 feature groups) and went ahead trying to get the APIM server
> started first.
>
> I could start the APIM framework on java 10 without those features but the
> mgt console URL was not accessible possibly due to incompatibilities of
> tomcat7 with java 10. Also there wasn't any error logs printed. As Ruwan
> has previously mentioned in another mail thread, existing logging mechanism
> in C4 is not compatible with java 10. As his instructions I will try to get
> the logger working first.
>
> Thanks
>
> On Wed, Sep 12, 2018 at 12:44 PM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> I am trying to build APIM 2.x branch with modified versions of following
>> dependencies (with upgraded osgi and some plugins)
>>
>>
>> carbon-apimgt  version 6.4.27 (6.x branch)
>>
>> carbon-kernel version 4.4.35 (4.4.x branch)
>>
>> carbon-metrics version 1.2.4 (1.x.x branch)
>> carbon p2 plugin version 1.6.1
>>
>> Originally APIM 2.x branch depended on carbon-apimgt 6.4.17 and 
>> carbon-metrics
>> 1.2.3 and carbon p2 plugin 1.5.4.
>> I chose the above branches because they had artifact versions closer to
>> the existing versions and for avoiding build errors I got when trying out
>> different branches.
>> Please let me know if there is a better way to select the branches.
>>
>> Currently I am having issues building P2 profile generation module of
>> APIM. Please see the following error.
>>
>>
>> *Cannot complete the install because one or more required items could not
>> be found. Software being installed: WSO2 Carbon - API Publisher Feature
>> 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1) Missing
>> requirement: org.wso2.carbon.apimgt.hostobjects 6.4.27.1
>> (org.wso2.carbon.apimgt.hostobjects 6.4.27.1) requires 'osgi.service;
>> (objectClass=org.wso2.carbon.user.core.service.RealmService)' but it could
>> not be found Cannot satisfy dependency:  From: WSO2 Carbon - API Publisher
>> Feature 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1)
>> To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.hostobjects
>> [6.4.27.1,6.4.27.1]*
>>
>>
>> Some features cannot be installed due to missing osgi services according
>> to the error. But those are available in the relevant dependent libraries
>> and also references can be found in osgi meta data.
>>
>> Any help is appreciated.
>>
>> Thanks
>>
>> On Mon, Sep 10, 2018 at 2:15 PM, Tharindu Wijewardane > > wrote:
>>
>>> clarification:
>>> I am trying to build APIM using java 8 (with the other upgraded
>>> dependencies built with java 8) and run on java 10 as Shankar instructed.
>>>
>>> On Mon, Sep 10, 2018 at 1:45 PM, Tharindu Wijewardane <
>>> tharin...@wso2.com> wrote:
>>>
 Hi,

 Finally I got the carbon kernel to build using java 10. It can be
 started on java 10 too. However,
 The last fix I did was to add "--add-modules=java.activation" jvm
 argument to maven ant run plugin for generating stub classes from wsdl
 files.
 Since Java 9, access to some javax* modules has been disabled.
 Therefore in order to use javax.activation* classes we have to manually add
 them.
 But with that change it will not compile 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-21 Thread Tharindu Wijewardane
Hi all,

I was able to fix the previous issue (some osgi services were not found) by
changing tycho/sisu p2 dependency versions of carbon p2 plugin to the
versions used in carbon feature plugin.
Then there were issues installing features which includes bundles from
identity server related dependencies
(carbon-identity, carbon-identity-framework, ...). I have to upgrade the
osgi platform of those as well but I commented out those features for now
(only 3 feature groups) and went ahead trying to get the APIM server
started first.

I could start the APIM framework on java 10 without those features but the
mgt console URL was not accessible possibly due to incompatibilities of
tomcat7 with java 10. Also there wasn't any error logs printed. As Ruwan
has previously mentioned in another mail thread, existing logging mechanism
in C4 is not compatible with java 10. As his instructions I will try to get
the logger working first.

Thanks

On Wed, Sep 12, 2018 at 12:44 PM Tharindu Wijewardane 
wrote:

> Hi all,
>
> I am trying to build APIM 2.x branch with modified versions of following
> dependencies (with upgraded osgi and some plugins)
>
>
> carbon-apimgt  version 6.4.27 (6.x branch)
>
> carbon-kernel version 4.4.35 (4.4.x branch)
>
> carbon-metrics version 1.2.4 (1.x.x branch)
> carbon p2 plugin version 1.6.1
>
> Originally APIM 2.x branch depended on carbon-apimgt 6.4.17 and carbon-metrics
> 1.2.3 and carbon p2 plugin 1.5.4.
> I chose the above branches because they had artifact versions closer to
> the existing versions and for avoiding build errors I got when trying out
> different branches.
> Please let me know if there is a better way to select the branches.
>
> Currently I am having issues building P2 profile generation module of
> APIM. Please see the following error.
>
>
> *Cannot complete the install because one or more required items could not
> be found. Software being installed: WSO2 Carbon - API Publisher Feature
> 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1) Missing
> requirement: org.wso2.carbon.apimgt.hostobjects 6.4.27.1
> (org.wso2.carbon.apimgt.hostobjects 6.4.27.1) requires 'osgi.service;
> (objectClass=org.wso2.carbon.user.core.service.RealmService)' but it could
> not be found Cannot satisfy dependency:  From: WSO2 Carbon - API Publisher
> Feature 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1)
> To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.hostobjects
> [6.4.27.1,6.4.27.1]*
>
>
> Some features cannot be installed due to missing osgi services according
> to the error. But those are available in the relevant dependent libraries
> and also references can be found in osgi meta data.
>
> Any help is appreciated.
>
> Thanks
>
> On Mon, Sep 10, 2018 at 2:15 PM, Tharindu Wijewardane 
> wrote:
>
>> clarification:
>> I am trying to build APIM using java 8 (with the other upgraded
>> dependencies built with java 8) and run on java 10 as Shankar instructed.
>>
>> On Mon, Sep 10, 2018 at 1:45 PM, Tharindu Wijewardane > > wrote:
>>
>>> Hi,
>>>
>>> Finally I got the carbon kernel to build using java 10. It can be
>>> started on java 10 too. However,
>>> The last fix I did was to add "--add-modules=java.activation" jvm
>>> argument to maven ant run plugin for generating stub classes from wsdl
>>> files.
>>> Since Java 9, access to some javax* modules has been disabled. Therefore
>>> in order to use javax.activation* classes we have to manually add them.
>>> But with that change it will not compile on java 8. Further, with java
>>> 11, those deprecated modules may be removed from jdk and we may have to
>>> find another solution.
>>>
>>> I modified APIM (2.x branch) to use the upgraded carbon kernel and osgi
>>> dependencies. Then the other dependencies of APIM (carbon metrics, carbon
>>> apimgt, ..) are being incompatible. I will have to upgrade those as well.
>>> Currently I am looking into it.
>>>
>>> Thanks
>>>
>>>
>>> On Thu, Sep 6, 2018 at 6:39 PM, Selvaratnam Uthaiyashankar <
>>> shan...@wso2.com> wrote:
>>>
 Then, can you get APIM to build using JDK8, but run on JDK 10 please?
 We'll see how to proceed after doing that.

 On Thu, Sep 6, 2018 at 2:29 PM Tharindu Wijewardane 
 wrote:

> Hi all,
>
> As KasunG suggested I tried to get the carbon kernel (built with java
> 8) to run on java 10 first. Followings are the things I tried/found out.
>
>
>- Existing carbon 4 cannot be run on java 10 as the equinox
>version Kepler is not compatible with java 9 or 10. There are known 
> issues
>they did not fix on Kepler.
>
>
>- Earlier I have upgraded the equinox version to Photon (latest)
>and I have been trying to build with java 10 and was able to fix some
>issues but still I came across some issues even when building with 
> java 8.
>
>
> *Cannot complete the install because one or more required items could
> not be found.*
>

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-12 Thread Tharindu Wijewardane
Hi all,

I am trying to build APIM 2.x branch with modified versions of following
dependencies (with upgraded osgi and some plugins)


carbon-apimgt  version 6.4.27 (6.x branch)

carbon-kernel version 4.4.35 (4.4.x branch)

carbon-metrics version 1.2.4 (1.x.x branch)
carbon p2 plugin version 1.6.1

Originally APIM 2.x branch depended on carbon-apimgt 6.4.17 and carbon-metrics
1.2.3 and carbon p2 plugin 1.5.4.
I chose the above branches because they had artifact versions closer to the
existing versions and for avoiding build errors I got when trying out
different branches.
Please let me know if there is a better way to select the branches.

Currently I am having issues building P2 profile generation module of APIM.
Please see the following error.


*Cannot complete the install because one or more required items could not
be found. Software being installed: WSO2 Carbon - API Publisher Feature
6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1) Missing
requirement: org.wso2.carbon.apimgt.hostobjects 6.4.27.1
(org.wso2.carbon.apimgt.hostobjects 6.4.27.1) requires 'osgi.service;
(objectClass=org.wso2.carbon.user.core.service.RealmService)' but it could
not be found Cannot satisfy dependency:  From: WSO2 Carbon - API Publisher
Feature 6.4.27.1 (org.wso2.carbon.apimgt.publisher.feature.group 6.4.27.1)
To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.hostobjects
[6.4.27.1,6.4.27.1]*


Some features cannot be installed due to missing osgi services according to
the error. But those are available in the relevant dependent libraries and
also references can be found in osgi meta data.

Any help is appreciated.

Thanks

On Mon, Sep 10, 2018 at 2:15 PM, Tharindu Wijewardane 
wrote:

> clarification:
> I am trying to build APIM using java 8 (with the other upgraded
> dependencies built with java 8) and run on java 10 as Shankar instructed.
>
> On Mon, Sep 10, 2018 at 1:45 PM, Tharindu Wijewardane 
> wrote:
>
>> Hi,
>>
>> Finally I got the carbon kernel to build using java 10. It can be started
>> on java 10 too. However,
>> The last fix I did was to add "--add-modules=java.activation" jvm
>> argument to maven ant run plugin for generating stub classes from wsdl
>> files.
>> Since Java 9, access to some javax* modules has been disabled. Therefore
>> in order to use javax.activation* classes we have to manually add them.
>> But with that change it will not compile on java 8. Further, with java
>> 11, those deprecated modules may be removed from jdk and we may have to
>> find another solution.
>>
>> I modified APIM (2.x branch) to use the upgraded carbon kernel and osgi
>> dependencies. Then the other dependencies of APIM (carbon metrics, carbon
>> apimgt, ..) are being incompatible. I will have to upgrade those as well.
>> Currently I am looking into it.
>>
>> Thanks
>>
>>
>> On Thu, Sep 6, 2018 at 6:39 PM, Selvaratnam Uthaiyashankar <
>> shan...@wso2.com> wrote:
>>
>>> Then, can you get APIM to build using JDK8, but run on JDK 10 please?
>>> We'll see how to proceed after doing that.
>>>
>>> On Thu, Sep 6, 2018 at 2:29 PM Tharindu Wijewardane 
>>> wrote:
>>>
 Hi all,

 As KasunG suggested I tried to get the carbon kernel (built with java
 8) to run on java 10 first. Followings are the things I tried/found out.


- Existing carbon 4 cannot be run on java 10 as the equinox version
Kepler is not compatible with java 9 or 10. There are known issues they 
 did
not fix on Kepler.


- Earlier I have upgraded the equinox version to Photon (latest)
and I have been trying to build with java 10 and was able to fix some
issues but still I came across some issues even when building with java 
 8.


 *Cannot complete the install because one or more required items could
 not be found.*

 * Software being installed: Carbon Product 4.4.34.SNAPSHOT
 (carbon.product.id  4.4.34.SNAPSHOT)*

 * Missing requirement: Equinox Provisioning Metadata Repository
 1.3.0.v20180302-1057 (org.eclipse.equinox.p2.metadata.repository
 1.3.0.v20180302-1057) requires 'osgi.bundle; org.tukaani.xz 1.3.0' but it
 could not be found*

 * Cannot satisfy dependency:*

 *  From: Carbon Product 4.4.34.SNAPSHOT (carbon.product.id
  4.4.34.SNAPSHOT)*

 *  To: org.eclipse.equinox.p2.iu;
 org.wso2.carbon.core.runtime.feature.group
 [4.4.34.SNAPSHOT,4.4.34.SNAPSHOT]*

 * Cannot satisfy dependency:*

 *  From: Equinox Provisioning Console 1.1.0.v20180130-1836
 (org.eclipse.equinox.p2.console 1.1.0.v20180130-1836)*

 *  To: java.package; org.eclipse.equinox.p2.engine [2.0.0,3.0.0)*

 * Cannot satisfy dependency:*

 *  From: Equinox Provisioning Engine 2.6.0.v20180409-1209
 (org.eclipse.equinox.p2.engine 2.6.0.v20180409-1209)*

 *  To: java.package;
 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-10 Thread Tharindu Wijewardane
clarification:
I am trying to build APIM using java 8 (with the other upgraded
dependencies built with java 8) and run on java 10 as Shankar instructed.

On Mon, Sep 10, 2018 at 1:45 PM, Tharindu Wijewardane 
wrote:

> Hi,
>
> Finally I got the carbon kernel to build using java 10. It can be started
> on java 10 too. However,
> The last fix I did was to add "--add-modules=java.activation" jvm
> argument to maven ant run plugin for generating stub classes from wsdl
> files.
> Since Java 9, access to some javax* modules has been disabled. Therefore
> in order to use javax.activation* classes we have to manually add them.
> But with that change it will not compile on java 8. Further, with java 11,
> those deprecated modules may be removed from jdk and we may have to find
> another solution.
>
> I modified APIM (2.x branch) to use the upgraded carbon kernel and osgi
> dependencies. Then the other dependencies of APIM (carbon metrics, carbon
> apimgt, ..) are being incompatible. I will have to upgrade those as well.
> Currently I am looking into it.
>
> Thanks
>
>
> On Thu, Sep 6, 2018 at 6:39 PM, Selvaratnam Uthaiyashankar <
> shan...@wso2.com> wrote:
>
>> Then, can you get APIM to build using JDK8, but run on JDK 10 please?
>> We'll see how to proceed after doing that.
>>
>> On Thu, Sep 6, 2018 at 2:29 PM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> As KasunG suggested I tried to get the carbon kernel (built with java 8)
>>> to run on java 10 first. Followings are the things I tried/found out.
>>>
>>>
>>>- Existing carbon 4 cannot be run on java 10 as the equinox version
>>>Kepler is not compatible with java 9 or 10. There are known issues they 
>>> did
>>>not fix on Kepler.
>>>
>>>
>>>- Earlier I have upgraded the equinox version to Photon (latest) and
>>>I have been trying to build with java 10 and was able to fix some issues
>>>but still I came across some issues even when building with java 8.
>>>
>>>
>>> *Cannot complete the install because one or more required items could
>>> not be found.*
>>>
>>> * Software being installed: Carbon Product 4.4.34.SNAPSHOT
>>> (carbon.product.id  4.4.34.SNAPSHOT)*
>>>
>>> * Missing requirement: Equinox Provisioning Metadata Repository
>>> 1.3.0.v20180302-1057 (org.eclipse.equinox.p2.metadata.repository
>>> 1.3.0.v20180302-1057) requires 'osgi.bundle; org.tukaani.xz 1.3.0' but it
>>> could not be found*
>>>
>>> * Cannot satisfy dependency:*
>>>
>>> *  From: Carbon Product 4.4.34.SNAPSHOT (carbon.product.id
>>>  4.4.34.SNAPSHOT)*
>>>
>>> *  To: org.eclipse.equinox.p2.iu;
>>> org.wso2.carbon.core.runtime.feature.group
>>> [4.4.34.SNAPSHOT,4.4.34.SNAPSHOT]*
>>>
>>> * Cannot satisfy dependency:*
>>>
>>> *  From: Equinox Provisioning Console 1.1.0.v20180130-1836
>>> (org.eclipse.equinox.p2.console 1.1.0.v20180130-1836)*
>>>
>>> *  To: java.package; org.eclipse.equinox.p2.engine [2.0.0,3.0.0)*
>>>
>>> * Cannot satisfy dependency:*
>>>
>>> *  From: Equinox Provisioning Engine 2.6.0.v20180409-1209
>>> (org.eclipse.equinox.p2.engine 2.6.0.v20180409-1209)*
>>>
>>> *  To: java.package;
>>> org.eclipse.equinox.internal.p2.metadata.repository.io
>>>  0.0.0*
>>>
>>> * Cannot satisfy dependency:*
>>>
>>> *  From: WSO2 Carbon - Carbon Runtime Feature 4.4.34.SNAPSHOT
>>> (org.wso2.carbon.core.runtime.feature.group 4.4.34.SNAPSHOT)*
>>>
>>> *  To: org.eclipse.equinox.p2.iu; org.eclipse.equinox.p2.console
>>> [1.1.0.v20180130-1836,1.1.0.v20180130-1836]*
>>>
>>>
>>> I found out there had been similar issues in previous equinox versions
>>> which have been fixed but seems to be resurfaced with Photon. I posted
>>> about that in eclipse forum.
>>>
>>>
>>>
>>>- Next I upgraded the equinox version to luna - which is an older
>>>version of equinox but newer than Kepler. It is the version used in C5
>>>hence I did not have to manually install the dependencies to local repo 
>>> as
>>>they were already available in wso2 nexus. I could get it to compile with
>>>java 8 and with some modifications to wso2server.sh run it on java 10
>>>successfully. (Earlier Praminda had done this)
>>>
>>> Now that I have get the carbon kernal to run on java 10 what should my
>>> next step be? To integrate the changes to C4 or keep trying to build it on
>>> java 10?
>>> I am currently facing issues getting to generate stub classes from wsdl
>>> when building with java 10.
>>>
>>> Thanks
>>>
>>>
>>> On Mon, Sep 3, 2018 at 2:54 PM, Tharindu Wijewardane >> > wrote:
>>>
 Hi Kasun,

 1.) The fix I did was in a very old version of felix.scr.generator
 which was released in 2011. I could not find the source on github so I
 downloaded the source jar from maven repo and modified and installed to my
 local m2 repo by changing the version. Since this issue does not exist in
 newer versions I am not sure how can i send the fix to 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-10 Thread Tharindu Wijewardane
Hi,

Finally I got the carbon kernel to build using java 10. It can be started
on java 10 too. However,
The last fix I did was to add "--add-modules=java.activation" jvm argument
to maven ant run plugin for generating stub classes from wsdl files.
Since Java 9, access to some javax* modules has been disabled. Therefore in
order to use javax.activation* classes we have to manually add them.
But with that change it will not compile on java 8. Further, with java 11,
those deprecated modules may be removed from jdk and we may have to find
another solution.

I modified APIM (2.x branch) to use the upgraded carbon kernel and osgi
dependencies. Then the other dependencies of APIM (carbon metrics, carbon
apimgt, ..) are being incompatible. I will have to upgrade those as well.
Currently I am looking into it.

Thanks


On Thu, Sep 6, 2018 at 6:39 PM, Selvaratnam Uthaiyashankar  wrote:

> Then, can you get APIM to build using JDK8, but run on JDK 10 please?
> We'll see how to proceed after doing that.
>
> On Thu, Sep 6, 2018 at 2:29 PM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> As KasunG suggested I tried to get the carbon kernel (built with java 8)
>> to run on java 10 first. Followings are the things I tried/found out.
>>
>>
>>- Existing carbon 4 cannot be run on java 10 as the equinox version
>>Kepler is not compatible with java 9 or 10. There are known issues they 
>> did
>>not fix on Kepler.
>>
>>
>>- Earlier I have upgraded the equinox version to Photon (latest) and
>>I have been trying to build with java 10 and was able to fix some issues
>>but still I came across some issues even when building with java 8.
>>
>>
>> *Cannot complete the install because one or more required items could not
>> be found.*
>>
>> * Software being installed: Carbon Product 4.4.34.SNAPSHOT
>> (carbon.product.id  4.4.34.SNAPSHOT)*
>>
>> * Missing requirement: Equinox Provisioning Metadata Repository
>> 1.3.0.v20180302-1057 (org.eclipse.equinox.p2.metadata.repository
>> 1.3.0.v20180302-1057) requires 'osgi.bundle; org.tukaani.xz 1.3.0' but it
>> could not be found*
>>
>> * Cannot satisfy dependency:*
>>
>> *  From: Carbon Product 4.4.34.SNAPSHOT (carbon.product.id
>>  4.4.34.SNAPSHOT)*
>>
>> *  To: org.eclipse.equinox.p2.iu;
>> org.wso2.carbon.core.runtime.feature.group
>> [4.4.34.SNAPSHOT,4.4.34.SNAPSHOT]*
>>
>> * Cannot satisfy dependency:*
>>
>> *  From: Equinox Provisioning Console 1.1.0.v20180130-1836
>> (org.eclipse.equinox.p2.console 1.1.0.v20180130-1836)*
>>
>> *  To: java.package; org.eclipse.equinox.p2.engine [2.0.0,3.0.0)*
>>
>> * Cannot satisfy dependency:*
>>
>> *  From: Equinox Provisioning Engine 2.6.0.v20180409-1209
>> (org.eclipse.equinox.p2.engine 2.6.0.v20180409-1209)*
>>
>> *  To: java.package;
>> org.eclipse.equinox.internal.p2.metadata.repository.io
>>  0.0.0*
>>
>> * Cannot satisfy dependency:*
>>
>> *  From: WSO2 Carbon - Carbon Runtime Feature 4.4.34.SNAPSHOT
>> (org.wso2.carbon.core.runtime.feature.group 4.4.34.SNAPSHOT)*
>>
>> *  To: org.eclipse.equinox.p2.iu; org.eclipse.equinox.p2.console
>> [1.1.0.v20180130-1836,1.1.0.v20180130-1836]*
>>
>>
>> I found out there had been similar issues in previous equinox versions
>> which have been fixed but seems to be resurfaced with Photon. I posted
>> about that in eclipse forum.
>>
>>
>>
>>- Next I upgraded the equinox version to luna - which is an older
>>version of equinox but newer than Kepler. It is the version used in C5
>>hence I did not have to manually install the dependencies to local repo as
>>they were already available in wso2 nexus. I could get it to compile with
>>java 8 and with some modifications to wso2server.sh run it on java 10
>>successfully. (Earlier Praminda had done this)
>>
>> Now that I have get the carbon kernal to run on java 10 what should my
>> next step be? To integrate the changes to C4 or keep trying to build it on
>> java 10?
>> I am currently facing issues getting to generate stub classes from wsdl
>> when building with java 10.
>>
>> Thanks
>>
>>
>> On Mon, Sep 3, 2018 at 2:54 PM, Tharindu Wijewardane 
>> wrote:
>>
>>> Hi Kasun,
>>>
>>> 1.) The fix I did was in a very old version of felix.scr.generator which
>>> was released in 2011. I could not find the source on github so I downloaded
>>> the source jar from maven repo and modified and installed to my local m2
>>> repo by changing the version. Since this issue does not exist in newer
>>> versions I am not sure how can i send the fix to Felix. (newer versions of 
>>> felix.scr.generator
>>> are not compatible with old scr plugin 1.7.4 which is the working version
>>> for scr annotations).
>>> What I thought of was to deploy the modified version in wso2 nexus repo
>>> but I am not aware of the procedure (or whether should it be done like
>>> that) please let me know.
>>>
>>> 2.) So far my focus was on building C4 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-06 Thread Selvaratnam Uthaiyashankar
Then, can you get APIM to build using JDK8, but run on JDK 10 please? We'll
see how to proceed after doing that.

On Thu, Sep 6, 2018 at 2:29 PM Tharindu Wijewardane 
wrote:

> Hi all,
>
> As KasunG suggested I tried to get the carbon kernel (built with java 8)
> to run on java 10 first. Followings are the things I tried/found out.
>
>
>- Existing carbon 4 cannot be run on java 10 as the equinox version
>Kepler is not compatible with java 9 or 10. There are known issues they did
>not fix on Kepler.
>
>
>- Earlier I have upgraded the equinox version to Photon (latest) and I
>have been trying to build with java 10 and was able to fix some issues but
>still I came across some issues even when building with java 8.
>
>
> *Cannot complete the install because one or more required items could not
> be found.*
>
> * Software being installed: Carbon Product 4.4.34.SNAPSHOT
> (carbon.product.id  4.4.34.SNAPSHOT)*
>
> * Missing requirement: Equinox Provisioning Metadata Repository
> 1.3.0.v20180302-1057 (org.eclipse.equinox.p2.metadata.repository
> 1.3.0.v20180302-1057) requires 'osgi.bundle; org.tukaani.xz 1.3.0' but it
> could not be found*
>
> * Cannot satisfy dependency:*
>
> *  From: Carbon Product 4.4.34.SNAPSHOT (carbon.product.id
>  4.4.34.SNAPSHOT)*
>
> *  To: org.eclipse.equinox.p2.iu;
> org.wso2.carbon.core.runtime.feature.group
> [4.4.34.SNAPSHOT,4.4.34.SNAPSHOT]*
>
> * Cannot satisfy dependency:*
>
> *  From: Equinox Provisioning Console 1.1.0.v20180130-1836
> (org.eclipse.equinox.p2.console 1.1.0.v20180130-1836)*
>
> *  To: java.package; org.eclipse.equinox.p2.engine [2.0.0,3.0.0)*
>
> * Cannot satisfy dependency:*
>
> *  From: Equinox Provisioning Engine 2.6.0.v20180409-1209
> (org.eclipse.equinox.p2.engine 2.6.0.v20180409-1209)*
>
> *  To: java.package;
> org.eclipse.equinox.internal.p2.metadata.repository.io
>  0.0.0*
>
> * Cannot satisfy dependency:*
>
> *  From: WSO2 Carbon - Carbon Runtime Feature 4.4.34.SNAPSHOT
> (org.wso2.carbon.core.runtime.feature.group 4.4.34.SNAPSHOT)*
>
> *  To: org.eclipse.equinox.p2.iu; org.eclipse.equinox.p2.console
> [1.1.0.v20180130-1836,1.1.0.v20180130-1836]*
>
>
> I found out there had been similar issues in previous equinox versions
> which have been fixed but seems to be resurfaced with Photon. I posted
> about that in eclipse forum.
>
>
>
>- Next I upgraded the equinox version to luna - which is an older
>version of equinox but newer than Kepler. It is the version used in C5
>hence I did not have to manually install the dependencies to local repo as
>they were already available in wso2 nexus. I could get it to compile with
>java 8 and with some modifications to wso2server.sh run it on java 10
>successfully. (Earlier Praminda had done this)
>
> Now that I have get the carbon kernal to run on java 10 what should my
> next step be? To integrate the changes to C4 or keep trying to build it on
> java 10?
> I am currently facing issues getting to generate stub classes from wsdl
> when building with java 10.
>
> Thanks
>
>
> On Mon, Sep 3, 2018 at 2:54 PM, Tharindu Wijewardane 
> wrote:
>
>> Hi Kasun,
>>
>> 1.) The fix I did was in a very old version of felix.scr.generator which
>> was released in 2011. I could not find the source on github so I downloaded
>> the source jar from maven repo and modified and installed to my local m2
>> repo by changing the version. Since this issue does not exist in newer
>> versions I am not sure how can i send the fix to Felix. (newer versions of 
>> felix.scr.generator
>> are not compatible with old scr plugin 1.7.4 which is the working version
>> for scr annotations).
>> What I thought of was to deploy the modified version in wso2 nexus repo
>> but I am not aware of the procedure (or whether should it be done like
>> that) please let me know.
>>
>> 2.) So far my focus was on building C4 with java 10. In that case I will
>> try to compile with java 8 and get it to run on java 10 first.
>>
>> Thanks
>>
>> On Mon, Sep 3, 2018 at 1:54 PM, KasunG Gajasinghe 
>> wrote:
>>
>>>
>>>
>>> On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane 
>>> wrote:
>>>
 Hi all,

 An update on the previous email.

 In order to automatically generate osgi metadata xmls during the maven
 build either of following annotation schemas can be used.


- Felix SCR annotations
- OSGi declarative services (DS) annotations

 Older versions of maven scr plugin has used felix scr annotations but
 later on its mentioned on the documentations that it has started to support
 both felix scr annotations and DS annotations from osgi which is the
 standard set of annotations for generating osgi meta data xmls. This is
 done by adding the relevant dependency to pom with the scr plugin. However
 newer versions of scr plugin do not seem to be 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-06 Thread Tharindu Wijewardane
Hi all,

As KasunG suggested I tried to get the carbon kernel (built with java 8) to
run on java 10 first. Followings are the things I tried/found out.


   - Existing carbon 4 cannot be run on java 10 as the equinox version
   Kepler is not compatible with java 9 or 10. There are known issues they did
   not fix on Kepler.


   - Earlier I have upgraded the equinox version to Photon (latest) and I
   have been trying to build with java 10 and was able to fix some issues but
   still I came across some issues even when building with java 8.


*Cannot complete the install because one or more required items could not
be found.*

* Software being installed: Carbon Product 4.4.34.SNAPSHOT
(carbon.product.id  4.4.34.SNAPSHOT)*

* Missing requirement: Equinox Provisioning Metadata Repository
1.3.0.v20180302-1057 (org.eclipse.equinox.p2.metadata.repository
1.3.0.v20180302-1057) requires 'osgi.bundle; org.tukaani.xz 1.3.0' but it
could not be found*

* Cannot satisfy dependency:*

*  From: Carbon Product 4.4.34.SNAPSHOT (carbon.product.id
 4.4.34.SNAPSHOT)*

*  To: org.eclipse.equinox.p2.iu;
org.wso2.carbon.core.runtime.feature.group
[4.4.34.SNAPSHOT,4.4.34.SNAPSHOT]*

* Cannot satisfy dependency:*

*  From: Equinox Provisioning Console 1.1.0.v20180130-1836
(org.eclipse.equinox.p2.console 1.1.0.v20180130-1836)*

*  To: java.package; org.eclipse.equinox.p2.engine [2.0.0,3.0.0)*

* Cannot satisfy dependency:*

*  From: Equinox Provisioning Engine 2.6.0.v20180409-1209
(org.eclipse.equinox.p2.engine 2.6.0.v20180409-1209)*

*  To: java.package; org.eclipse.equinox.internal.p2.metadata.repository.io
 0.0.0*

* Cannot satisfy dependency:*

*  From: WSO2 Carbon - Carbon Runtime Feature 4.4.34.SNAPSHOT
(org.wso2.carbon.core.runtime.feature.group 4.4.34.SNAPSHOT)*

*  To: org.eclipse.equinox.p2.iu; org.eclipse.equinox.p2.console
[1.1.0.v20180130-1836,1.1.0.v20180130-1836]*


I found out there had been similar issues in previous equinox versions
which have been fixed but seems to be resurfaced with Photon. I posted
about that in eclipse forum.



   - Next I upgraded the equinox version to luna - which is an older
   version of equinox but newer than Kepler. It is the version used in C5
   hence I did not have to manually install the dependencies to local repo as
   they were already available in wso2 nexus. I could get it to compile with
   java 8 and with some modifications to wso2server.sh run it on java 10
   successfully. (Earlier Praminda had done this)

Now that I have get the carbon kernal to run on java 10 what should my next
step be? To integrate the changes to C4 or keep trying to build it on java
10?
I am currently facing issues getting to generate stub classes from wsdl
when building with java 10.

Thanks


On Mon, Sep 3, 2018 at 2:54 PM, Tharindu Wijewardane 
wrote:

> Hi Kasun,
>
> 1.) The fix I did was in a very old version of felix.scr.generator which
> was released in 2011. I could not find the source on github so I downloaded
> the source jar from maven repo and modified and installed to my local m2
> repo by changing the version. Since this issue does not exist in newer
> versions I am not sure how can i send the fix to Felix. (newer versions of 
> felix.scr.generator
> are not compatible with old scr plugin 1.7.4 which is the working version
> for scr annotations).
> What I thought of was to deploy the modified version in wso2 nexus repo
> but I am not aware of the procedure (or whether should it be done like
> that) please let me know.
>
> 2.) So far my focus was on building C4 with java 10. In that case I will
> try to compile with java 8 and get it to run on java 10 first.
>
> Thanks
>
> On Mon, Sep 3, 2018 at 1:54 PM, KasunG Gajasinghe  wrote:
>
>>
>>
>> On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane 
>> wrote:
>>
>>> Hi all,
>>>
>>> An update on the previous email.
>>>
>>> In order to automatically generate osgi metadata xmls during the maven
>>> build either of following annotation schemas can be used.
>>>
>>>
>>>- Felix SCR annotations
>>>- OSGi declarative services (DS) annotations
>>>
>>> Older versions of maven scr plugin has used felix scr annotations but
>>> later on its mentioned on the documentations that it has started to support
>>> both felix scr annotations and DS annotations from osgi which is the
>>> standard set of annotations for generating osgi meta data xmls. This is
>>> done by adding the relevant dependency to pom with the scr plugin. However
>>> newer versions of scr plugin do not seem to be supporting felix scr
>>> annotations and what i found from the community is that the scr plugin is
>>> in maintenance mode and it is better to use maven bundle plugin (without
>>> the scr plugin) which only supports osgi ds annotations.
>>>
>>> Since felix scr annotations are used in C4 I had 2 options to proceed.
>>> Either to fix java 10 compatibility issues in 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-03 Thread Tharindu Wijewardane
Hi Kasun,

1.) The fix I did was in a very old version of felix.scr.generator which
was released in 2011. I could not find the source on github so I downloaded
the source jar from maven repo and modified and installed to my local m2
repo by changing the version. Since this issue does not exist in newer
versions I am not sure how can i send the fix to Felix. (newer
versions of felix.scr.generator
are not compatible with old scr plugin 1.7.4 which is the working version
for scr annotations).
What I thought of was to deploy the modified version in wso2 nexus repo but
I am not aware of the procedure (or whether should it be done like that)
please let me know.

2.) So far my focus was on building C4 with java 10. In that case I will
try to compile with java 8 and get it to run on java 10 first.

Thanks

On Mon, Sep 3, 2018 at 1:54 PM, KasunG Gajasinghe  wrote:

>
>
> On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> An update on the previous email.
>>
>> In order to automatically generate osgi metadata xmls during the maven
>> build either of following annotation schemas can be used.
>>
>>
>>- Felix SCR annotations
>>- OSGi declarative services (DS) annotations
>>
>> Older versions of maven scr plugin has used felix scr annotations but
>> later on its mentioned on the documentations that it has started to support
>> both felix scr annotations and DS annotations from osgi which is the
>> standard set of annotations for generating osgi meta data xmls. This is
>> done by adding the relevant dependency to pom with the scr plugin. However
>> newer versions of scr plugin do not seem to be supporting felix scr
>> annotations and what i found from the community is that the scr plugin is
>> in maintenance mode and it is better to use maven bundle plugin (without
>> the scr plugin) which only supports osgi ds annotations.
>>
>> Since felix scr annotations are used in C4 I had 2 options to proceed.
>> Either to fix java 10 compatibility issues in the older version (1.7.4) of
>> scr plugin or to convert existing scr annotations in C4 into osgi ds
>> annotations so that I can avoid using the scr plugin. I decided its better
>> to try and keep the existing annotation schema because changing it affects
>> those who use C4 with their own osgi bundles.
>> I could fix some compatibility issues in felix.scr.generator-1.1.4
>> library which is a dependency for scr plugin 1.7.4.
>> Now OSGI-INF folder structure is generated with the modified felix scr
>> generator and felix scr plugin.
>>
>
> This is great. Are you going to send this fix to upstream Felix folks?
> Where can we find the current fix?
>
>
>>
>> However there are other compatibility issues when building C4 with java
>> 10 which I am currently trying to fix.
>>
>>
> I think building C4 products with Java 10 is a secondary effort. I think
> the priority is to get the product runtime to work in Java 10. This is what
> we did with Java 7 -> 8 migration as well afair. So, can we run the
> products built with Java 8 on Java 10 now?
>
>
>> Thanks
>>
>>
>> On Wed, Aug 29, 2018 at 5:17 PM, Tharindu Wijewardane > > wrote:
>>
>>> Hi all,
>>>
>>> registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob)
>>> they were empty and has the comment: Dummy implementation for jdk6.
>>> I removed that module and went ahead.
>>>
>>> However I'm facing issues getting the maven-scr-plugin to generate the
>>> "scr-plugin-generated" folder which contains the serviceComponents.xml etc.
>>>
>>> Following error occurs if I use the existing scr plugin version with
>>> java 10.
>>>
>>> [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> (generate-scr-scrdescriptor) on project carbon-kernel: Execution
>>> generate-scr-scrdescriptor of goal 
>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>> failed: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider
>>> is not an ImageIO SPI class
>>>
>>>
>>> When I upgrade the maven scr plugin version to 1.26.0 (latest) it
>>> complains that "No annotation processors found in classpath"
>>> So I added org.apache.felix.scr.annotations as an dependency according
>>> to instructions in Apache Felix documentation.
>>>
>>> Now i am getting the following error because scr-plugin-generated
>>> folder structure is still not generated.
>>>
>>> [ERROR] Manifest 
>>> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT
>>> : Input file does not exist: target/scr-plugin-generated/
>>> OSGI-INF/serviceComponents.xml
>>>
>>> I have tried this with multiple scr plugin versions and with and without
>>> upgrading the equinox version.
>>>
>>> No information is available on this issue in the community. Nobody seems
>>> to be using java 10 for OSGI stuff.
>>> I have asked about this issue on stackoverflow and apache felix users'
>>> mailing list.
>>> I am posting this in this thread as an update.
>>>
>>> Any help is appreciated.
>>>
>>>
>>> On Mon, Aug 27, 2018 at 1:25 PM, 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-03 Thread KasunG Gajasinghe
On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane 
wrote:

> Hi all,
>
> An update on the previous email.
>
> In order to automatically generate osgi metadata xmls during the maven
> build either of following annotation schemas can be used.
>
>
>- Felix SCR annotations
>- OSGi declarative services (DS) annotations
>
> Older versions of maven scr plugin has used felix scr annotations but
> later on its mentioned on the documentations that it has started to support
> both felix scr annotations and DS annotations from osgi which is the
> standard set of annotations for generating osgi meta data xmls. This is
> done by adding the relevant dependency to pom with the scr plugin. However
> newer versions of scr plugin do not seem to be supporting felix scr
> annotations and what i found from the community is that the scr plugin is
> in maintenance mode and it is better to use maven bundle plugin (without
> the scr plugin) which only supports osgi ds annotations.
>
> Since felix scr annotations are used in C4 I had 2 options to proceed.
> Either to fix java 10 compatibility issues in the older version (1.7.4) of
> scr plugin or to convert existing scr annotations in C4 into osgi ds
> annotations so that I can avoid using the scr plugin. I decided its better
> to try and keep the existing annotation schema because changing it affects
> those who use C4 with their own osgi bundles.
> I could fix some compatibility issues in felix.scr.generator-1.1.4 library
> which is a dependency for scr plugin 1.7.4.
> Now OSGI-INF folder structure is generated with the modified felix scr
> generator and felix scr plugin.
>

This is great. Are you going to send this fix to upstream Felix folks?
Where can we find the current fix?


>
> However there are other compatibility issues when building C4 with java 10
> which I am currently trying to fix.
>
>
I think building C4 products with Java 10 is a secondary effort. I think
the priority is to get the product runtime to work in Java 10. This is what
we did with Java 7 -> 8 migration as well afair. So, can we run the
products built with Java 8 on Java 10 now?


> Thanks
>
>
> On Wed, Aug 29, 2018 at 5:17 PM, Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob)
>> they were empty and has the comment: Dummy implementation for jdk6.
>> I removed that module and went ahead.
>>
>> However I'm facing issues getting the maven-scr-plugin to generate the
>> "scr-plugin-generated" folder which contains the serviceComponents.xml etc.
>>
>> Following error occurs if I use the existing scr plugin version with java
>> 10.
>>
>> [ERROR] Failed to execute goal
>> org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-scrdescriptor) on
>> project carbon-kernel: Execution generate-scr-scrdescriptor of goal
>> org.apache.felix:maven-scr-plugin:1.7.4:scr failed:
>> org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider is not an
>> ImageIO SPI class
>>
>>
>> When I upgrade the maven scr plugin version to 1.26.0 (latest) it
>> complains that "No annotation processors found in classpath"
>> So I added org.apache.felix.scr.annotations as an dependency according to
>> instructions in Apache Felix documentation.
>>
>> Now i am getting the following error because scr-plugin-generated folder
>> structure is still not generated.
>>
>> [ERROR] Manifest
>> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT :
>> Input file does not exist:
>> target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
>>
>> I have tried this with multiple scr plugin versions and with and without
>> upgrading the equinox version.
>>
>> No information is available on this issue in the community. Nobody seems
>> to be using java 10 for OSGI stuff.
>> I have asked about this issue on stackoverflow and apache felix users'
>> mailing list.
>> I am posting this in this thread as an update.
>>
>> Any help is appreciated.
>>
>>
>> On Mon, Aug 27, 2018 at 1:25 PM, Praminda Jayawardana 
>> wrote:
>>
>>> Yes, even if we get passed this error now, this will be problematic
>>> later at the startup.
>>>
>>> On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe 
>>> wrote:
>>>

 Why a java.* package classes are added to our source tree?

 carbon-kernel/core/org.wso2.ca
 rbon.registry.xboot/src/main/java/java/sql/SQLXML.java


 On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane <
 tharin...@wso2.com> wrote:

>
> Thanks Praminda.
> I used sisu_ artifacts to build carbon p2 plugin.
>
> As for the equinox, since eclipse does not publish newer versions of
> the equinox through maven repository I downloaded the latest version
> (Photon) and manually installed all the jars in my local maven repo using
> "wso2" as a prefix for the group ids of the artifacts. Then I updated the
> poms in carbon kernal (C4) to use the new jars and fixed compilation 
> issues
> due to 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-03 Thread Tharindu Wijewardane
Hi all,

An update on the previous email.

In order to automatically generate osgi metadata xmls during the maven
build either of following annotation schemas can be used.


   - Felix SCR annotations
   - OSGi declarative services (DS) annotations

Older versions of maven scr plugin has used felix scr annotations but later
on its mentioned on the documentations that it has started to support both
felix scr annotations and DS annotations from osgi which is the standard
set of annotations for generating osgi meta data xmls. This is done by
adding the relevant dependency to pom with the scr plugin. However newer
versions of scr plugin do not seem to be supporting felix scr annotations
and what i found from the community is that the scr plugin is in
maintenance mode and it is better to use maven bundle plugin (without the
scr plugin) which only supports osgi ds annotations.

Since felix scr annotations are used in C4 I had 2 options to proceed.
Either to fix java 10 compatibility issues in the older version (1.7.4) of
scr plugin or to convert existing scr annotations in C4 into osgi ds
annotations so that I can avoid using the scr plugin. I decided its better
to try and keep the existing annotation schema because changing it affects
those who use C4 with their own osgi bundles.
I could fix some compatibility issues in felix.scr.generator-1.1.4 library
which is a dependency for scr plugin 1.7.4.
Now OSGI-INF folder structure is generated with the modified felix scr
generator and felix scr plugin.

However there are other compatibility issues when building C4 with java 10
which I am currently trying to fix.

Thanks


On Wed, Aug 29, 2018 at 5:17 PM, Tharindu Wijewardane 
wrote:

> Hi all,
>
> registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob) they
> were empty and has the comment: Dummy implementation for jdk6.
> I removed that module and went ahead.
>
> However I'm facing issues getting the maven-scr-plugin to generate the
> "scr-plugin-generated" folder which contains the serviceComponents.xml etc.
>
> Following error occurs if I use the existing scr plugin version with java
> 10.
>
> [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
> (generate-scr-scrdescriptor) on project carbon-kernel: Execution
> generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.7.4:scr
> failed: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider
> is not an ImageIO SPI class
>
>
> When I upgrade the maven scr plugin version to 1.26.0 (latest) it
> complains that "No annotation processors found in classpath"
> So I added org.apache.felix.scr.annotations as an dependency according to
> instructions in Apache Felix documentation.
>
> Now i am getting the following error because scr-plugin-generated folder
> structure is still not generated.
>
> [ERROR] Manifest 
> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT
> : Input file does not exist: target/scr-plugin-generated/
> OSGI-INF/serviceComponents.xml
>
> I have tried this with multiple scr plugin versions and with and without
> upgrading the equinox version.
>
> No information is available on this issue in the community. Nobody seems
> to be using java 10 for OSGI stuff.
> I have asked about this issue on stackoverflow and apache felix users'
> mailing list.
> I am posting this in this thread as an update.
>
> Any help is appreciated.
>
>
> On Mon, Aug 27, 2018 at 1:25 PM, Praminda Jayawardana 
> wrote:
>
>> Yes, even if we get passed this error now, this will be problematic later
>> at the startup.
>>
>> On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe 
>> wrote:
>>
>>>
>>> Why a java.* package classes are added to our source tree?
>>>
>>> carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/j
>>> ava/java/sql/SQLXML.java
>>>
>>>
>>> On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane 
>>> wrote:
>>>

 Thanks Praminda.
 I used sisu_ artifacts to build carbon p2 plugin.

 As for the equinox, since eclipse does not publish newer versions of
 the equinox through maven repository I downloaded the latest version
 (Photon) and manually installed all the jars in my local maven repo using
 "wso2" as a prefix for the group ids of the artifacts. Then I updated the
 poms in carbon kernal (C4) to use the new jars and fixed compilation issues
 due to class movements.

 However I could not solve the following issue yet.

 [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.26.0:scr
 (generate-scr-scrdescriptor) on project org.wso2.carbon.registry.xboot:
 /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.car
 bon.registry.xboot/src/main/java/java/sql/SQLXML.java : Unable to scan
 class files: java.sql.SQLXML (Class file format probably not supported by
 ASM ?): IllegalArgumentException

 I used the latest version of maven-scr-plugin.


 On Thu, Aug 23, 2018 at 4:37 PM, Praminda 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-08-29 Thread Tharindu Wijewardane
Hi all,

registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob) they
were empty and has the comment: Dummy implementation for jdk6.
I removed that module and went ahead.

However I'm facing issues getting the maven-scr-plugin to generate the
"scr-plugin-generated" folder which contains the serviceComponents.xml etc.

Following error occurs if I use the existing scr plugin version with java
10.

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
(generate-scr-scrdescriptor) on project carbon-kernel: Execution
generate-scr-scrdescriptor of goal
org.apache.felix:maven-scr-plugin:1.7.4:scr failed:
org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider is not an
ImageIO SPI class


When I upgrade the maven scr plugin version to 1.26.0 (latest) it complains
that "No annotation processors found in classpath"
So I added org.apache.felix.scr.annotations as an dependency according to
instructions in Apache Felix documentation.

Now i am getting the following error because scr-plugin-generated folder
structure is still not generated.

[ERROR] Manifest
org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT :
Input file does not exist:
target/scr-plugin-generated/OSGI-INF/serviceComponents.xml

I have tried this with multiple scr plugin versions and with and without
upgrading the equinox version.

No information is available on this issue in the community. Nobody seems to
be using java 10 for OSGI stuff.
I have asked about this issue on stackoverflow and apache felix users'
mailing list.
I am posting this in this thread as an update.

Any help is appreciated.

On Mon, Aug 27, 2018 at 1:25 PM, Praminda Jayawardana 
wrote:

> Yes, even if we get passed this error now, this will be problematic later
> at the startup.
>
> On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe  wrote:
>
>>
>> Why a java.* package classes are added to our source tree?
>>
>> carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/j
>> ava/java/sql/SQLXML.java
>>
>>
>> On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane 
>> wrote:
>>
>>>
>>> Thanks Praminda.
>>> I used sisu_ artifacts to build carbon p2 plugin.
>>>
>>> As for the equinox, since eclipse does not publish newer versions of the
>>> equinox through maven repository I downloaded the latest version (Photon)
>>> and manually installed all the jars in my local maven repo using "wso2" as
>>> a prefix for the group ids of the artifacts. Then I updated the poms in
>>> carbon kernal (C4) to use the new jars and fixed compilation issues due to
>>> class movements.
>>>
>>> However I could not solve the following issue yet.
>>>
>>> [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.26.0:scr
>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.registry.xboot:
>>> /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.car
>>> bon.registry.xboot/src/main/java/java/sql/SQLXML.java : Unable to scan
>>> class files: java.sql.SQLXML (Class file format probably not supported by
>>> ASM ?): IllegalArgumentException
>>>
>>> I used the latest version of maven-scr-plugin.
>>>
>>>
>>> On Thu, Aug 23, 2018 at 4:37 PM, Praminda Jayawardana >> > wrote:
>>>
 import for P2applicationlauncher should be changed from *import
 org.eclipse.tycho.p2.facade.in
 ternal.P2ApplicationLauncher *to
 *import
 org.eclipse.sisu.equinox.launching.internal.P2ApplicationLauncher*
 aswell.

 On Thu, Aug 23, 2018 at 4:20 PM Praminda Jayawardana 
 wrote:

> Hi Tharindu,
>
> Tycho plugin we are using at the moment is not compatible with Java 10
> as I know.
> Using following dependencies,
>
> 
> org.eclipse.tycho
> sisu-equinox-embedder
> 1.2.0
> 
> 
> org.eclipse.tycho
> sisu-equinox-launching
> 1.2.0
> 
> 
> org.eclipse.tycho
> tycho-p2-facade
> 1.2.0
> 
>
> in place of below old tycho dependencies should work. These changes
> are to be made in maven-tools/carbon-p2-plugin/pom.xml
>
> 
> org.eclipse.tycho
> tycho-equinox
> ${tycho.version}
> 
> 
> org.eclipse.tycho
> tycho-equinox-launching
> ${tycho.version}
> 
> 
> org.eclipse.tycho
> tycho-p2-facade
> ${tycho.version}
> 
>
> Thanks,
> Praminda
>
> On Thu, Aug 23, 2018 at 3:26 PM Afkham Azeez  wrote:
>
>> May be the latest plugin after the upgrade requires additional
>> configuration. Please check why the NPE is thrown and we can figure out
>> what is missing from there.
>>
>> On Thu, Aug 23, 2018 at 9:03 AM Tharindu Wijewardane <
>> tharin...@wso2.com> wrote:
>>
>>> Hi all,
>>>
>>> Following is what I have done so far. I have sent an email to
>>> dev@wso2.org earlier but its still being held with the reason "Post

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-08-27 Thread Praminda Jayawardana
Yes, even if we get passed this error now, this will be problematic later
at the startup.

On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe  wrote:

>
> Why a java.* package classes are added to our source tree?
>
>
> carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
>
>
> On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane 
> wrote:
>
>>
>> Thanks Praminda.
>> I used sisu_ artifacts to build carbon p2 plugin.
>>
>> As for the equinox, since eclipse does not publish newer versions of the
>> equinox through maven repository I downloaded the latest version (Photon)
>> and manually installed all the jars in my local maven repo using "wso2" as
>> a prefix for the group ids of the artifacts. Then I updated the poms in
>> carbon kernal (C4) to use the new jars and fixed compilation issues due to
>> class movements.
>>
>> However I could not solve the following issue yet.
>>
>> [ERROR] Failed to execute goal
>> org.apache.felix:maven-scr-plugin:1.26.0:scr (generate-scr-scrdescriptor)
>> on project org.wso2.carbon.registry.xboot:
>> /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
>> : Unable to scan class files: java.sql.SQLXML (Class file format probably
>> not supported by ASM ?): IllegalArgumentException
>>
>> I used the latest version of maven-scr-plugin.
>>
>>
>> On Thu, Aug 23, 2018 at 4:37 PM, Praminda Jayawardana 
>> wrote:
>>
>>> import for P2applicationlauncher should be changed from *import
>>> org.eclipse.tycho.p2.facade.in
>>> ternal.P2ApplicationLauncher *to 
>>> *import
>>> org.eclipse.sisu.equinox.launching.internal.P2ApplicationLauncher*
>>> aswell.
>>>
>>> On Thu, Aug 23, 2018 at 4:20 PM Praminda Jayawardana 
>>> wrote:
>>>
 Hi Tharindu,

 Tycho plugin we are using at the moment is not compatible with Java 10
 as I know.
 Using following dependencies,

 
 org.eclipse.tycho
 sisu-equinox-embedder
 1.2.0
 
 
 org.eclipse.tycho
 sisu-equinox-launching
 1.2.0
 
 
 org.eclipse.tycho
 tycho-p2-facade
 1.2.0
 

 in place of below old tycho dependencies should work. These changes are
 to be made in maven-tools/carbon-p2-plugin/pom.xml

 
 org.eclipse.tycho
 tycho-equinox
 ${tycho.version}
 
 
 org.eclipse.tycho
 tycho-equinox-launching
 ${tycho.version}
 
 
 org.eclipse.tycho
 tycho-p2-facade
 ${tycho.version}
 

 Thanks,
 Praminda

 On Thu, Aug 23, 2018 at 3:26 PM Afkham Azeez  wrote:

> May be the latest plugin after the upgrade requires additional
> configuration. Please check why the NPE is thrown and we can figure out
> what is missing from there.
>
> On Thu, Aug 23, 2018 at 9:03 AM Tharindu Wijewardane <
> tharin...@wso2.com> wrote:
>
>> Hi all,
>>
>> Following is what I have done so far. I have sent an email to
>> dev@wso2.org earlier but its still being held with the reason "Post
>> by non-member to a members-only list".
>>
>> First I tried to build the 2.5.0 release of product-apim as it is
>> with java 10 and the build of p2-profile module failed with the following
>> jar
>>
>>
>>
>> .m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
>>
>> Since it is included through carbon-p2-plugin module of the
>> maven-tools project I built the module using java 10 and use it to build
>> product-apim. Then the issue with the jar resolved but I got the 
>> following
>> issue when building p2-profile module.
>>
>> [ERROR] java.lang.NullPointerException
>> java.lang.RuntimeException: java.lang.NullPointerException
>> at org.eclipse.tycho.p2.facade.internal.P2ApplicationLauncher.execute
>> (P2ApplicationLauncher.java:132)
>> at org.wso2.maven.p2.RepositoryGenMojo.generateRepository
>> (RepositoryGenMojo.java:253)
>> at org.wso2.maven.p2.RepositoryGenMojo.createRepo
>> (RepositoryGenMojo.java:204)
>> at org.wso2.maven.p2.RepositoryGenMojo.execute
>> (RepositoryGenMojo.java:191)
>> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
>> (DefaultBuildPluginManager.java:137)
>>
>> Furthermore, I was able to build tycho-equinox, tycho-p2-facade and
>> tycho-equinox-launching packages individually with jdk 10 but with the
>> maven compiler plugin release config as 8.
>>
>> 
>>
>> org.apache.maven.plugins
>>
>> maven-compiler-plugin
>>
>>  3.7.0
>>
>>  
>>
>>   8
>>
>>  
>>
>>  
>>
>>
>> I have tried building carbon-kernel with java 10 and failed due to
>> the following 

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-08-27 Thread KasunG Gajasinghe
Why a java.* package classes are added to our source tree?

carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java


On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane 
wrote:

>
> Thanks Praminda.
> I used sisu_ artifacts to build carbon p2 plugin.
>
> As for the equinox, since eclipse does not publish newer versions of the
> equinox through maven repository I downloaded the latest version (Photon)
> and manually installed all the jars in my local maven repo using "wso2" as
> a prefix for the group ids of the artifacts. Then I updated the poms in
> carbon kernal (C4) to use the new jars and fixed compilation issues due to
> class movements.
>
> However I could not solve the following issue yet.
>
> [ERROR] Failed to execute goal
> org.apache.felix:maven-scr-plugin:1.26.0:scr (generate-scr-scrdescriptor)
> on project org.wso2.carbon.registry.xboot:
> /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
> : Unable to scan class files: java.sql.SQLXML (Class file format probably
> not supported by ASM ?): IllegalArgumentException
>
> I used the latest version of maven-scr-plugin.
>
>
> On Thu, Aug 23, 2018 at 4:37 PM, Praminda Jayawardana 
> wrote:
>
>> import for P2applicationlauncher should be changed from *import
>> org.eclipse.tycho.p2.facade.in
>> ternal.P2ApplicationLauncher *to 
>> *import
>> org.eclipse.sisu.equinox.launching.internal.P2ApplicationLauncher*
>> aswell.
>>
>> On Thu, Aug 23, 2018 at 4:20 PM Praminda Jayawardana 
>> wrote:
>>
>>> Hi Tharindu,
>>>
>>> Tycho plugin we are using at the moment is not compatible with Java 10
>>> as I know.
>>> Using following dependencies,
>>>
>>> 
>>> org.eclipse.tycho
>>> sisu-equinox-embedder
>>> 1.2.0
>>> 
>>> 
>>> org.eclipse.tycho
>>> sisu-equinox-launching
>>> 1.2.0
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-p2-facade
>>> 1.2.0
>>> 
>>>
>>> in place of below old tycho dependencies should work. These changes are
>>> to be made in maven-tools/carbon-p2-plugin/pom.xml
>>>
>>> 
>>> org.eclipse.tycho
>>> tycho-equinox
>>> ${tycho.version}
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-equinox-launching
>>> ${tycho.version}
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-p2-facade
>>> ${tycho.version}
>>> 
>>>
>>> Thanks,
>>> Praminda
>>>
>>> On Thu, Aug 23, 2018 at 3:26 PM Afkham Azeez  wrote:
>>>
 May be the latest plugin after the upgrade requires additional
 configuration. Please check why the NPE is thrown and we can figure out
 what is missing from there.

 On Thu, Aug 23, 2018 at 9:03 AM Tharindu Wijewardane <
 tharin...@wso2.com> wrote:

> Hi all,
>
> Following is what I have done so far. I have sent an email to
> dev@wso2.org earlier but its still being held with the reason "Post
> by non-member to a members-only list".
>
> First I tried to build the 2.5.0 release of product-apim as it is with
> java 10 and the build of p2-profile module failed with the following jar
>
>
>
> .m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
>
> Since it is included through carbon-p2-plugin module of the
> maven-tools project I built the module using java 10 and use it to build
> product-apim. Then the issue with the jar resolved but I got the following
> issue when building p2-profile module.
>
> [ERROR] java.lang.NullPointerException
> java.lang.RuntimeException: java.lang.NullPointerException
> at org.eclipse.tycho.p2.facade.internal.P2ApplicationLauncher.execute
> (P2ApplicationLauncher.java:132)
> at org.wso2.maven.p2.RepositoryGenMojo.generateRepository
> (RepositoryGenMojo.java:253)
> at org.wso2.maven.p2.RepositoryGenMojo.createRepo
> (RepositoryGenMojo.java:204)
> at org.wso2.maven.p2.RepositoryGenMojo.execute
> (RepositoryGenMojo.java:191)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
>
> Furthermore, I was able to build tycho-equinox, tycho-p2-facade and
> tycho-equinox-launching packages individually with jdk 10 but with the
> maven compiler plugin release config as 8.
>
> 
>
> org.apache.maven.plugins
>
> maven-compiler-plugin
>
>  3.7.0
>
>  
>
>   8
>
>  
>
>  
>
>
> I have tried building carbon-kernel with java 10 and failed due to the
> following error.
>
> [ERROR] Failed to execute goal
> org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-scrdescriptor) 
> on
> project carbon-kernel: Execution generate-scr-scrdescriptor of goal
> org.apache.felix:maven-scr-plugin:1.7.4:scr failed:
>