Hi,

When we try to deploy the cluster with APIM 1.10.x with profiles, following
error [1] is observed in wso2carbon.log.
Full log for gateway manager also attached.

We have tried with default configurations as well as cluster
configurations. In both cases the error occurs when trying with profiles.

It would be great if you can guide us to overcome this issue.

Following is the diff between a APIM 1.10.0-SNAPSHOT build pack
wso2server.sh and our gateway node wso2server.sh file.

$ diff 110wso2server.sh gwwso2server.sh
303a304
>     -Dprofile=gateway-manager \

[1]
TID: [-1] [] [2015-11-11 09:05:40,614] ERROR
{org.apache.tomcat.util.digester.Digester} -  Begin event threw exception
{org.apache.tomcat.util.digester.Digester}
java.lang.ClassNotFoundException:
org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader cannot be found by
org.wso2.carbon.tomcat_4.4.2
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1288)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:649)
at
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:592)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:850)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:397)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
TID: [-1] [] [2015-11-11 09:05:40,616] ERROR
{org.apache.catalina.startup.ContextConfig} -  Parse error in context.xml
for / {org.apache.catalina.startup.ContextConfig}
org.xml.sax.SAXParseException; systemId: file:/mnt/
192.168.57.131/gateway/wso2am-1.10.0-SNAPSHOT/repository/conf/tomcat/context.xml;
lineNumber: 24; columnNumber: 86; Error at (24, 86) :
org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader cannot be found by
org.wso2.carbon.tomcat_4.4.2
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2711)
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2743)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1291)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:649)
at
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:592)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:850)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:397)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException:
org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader cannot be found by
org.wso2.carbon.tomcat_4.4.2
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1288)
... 26 more

Thanks,
Suhan


On Wed, Nov 11, 2015 at 11:00 AM, Suhan Dharmasuriya <[email protected]>
wrote:

> Hi Nuwan,
>
> We will go ahead with profiles and puppet scripts will remove the
> unnecessary webapps from relevant profiles.
>
> For the moment it occurred the issue [2] was resolved but it didn't. We
> were able to completely eliminate the issue
> by removing profiles (which is not a recommended approach).
>
> We will retest with profiles and get back to you.
>
> Thank you for the quick reply.
>
> Thanks,
> Suhan
>
>
> On Wed, Nov 11, 2015 at 10:50 AM, Nuwan Dias <[email protected]> wrote:
>
>> IMO its better to start with profiles. Removing the unnecessary webapps
>> from the relevant profiles would still have to be done since profiles do
>> not take care of their removal.
>>
>> When I went through the mail thread at [2] I got the impression that you
>> got it resolved. And I didn't see anything related to profiles in there.
>>
>> Thanks,
>> NuwanD.
>>
>> On Wed, Nov 11, 2015 at 10:33 AM, Suhan Dharmasuriya <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Currently we are running the APIM cluster without specifying any
>>> profiles [1].
>>> i.e. when templating wso2server.sh file, -Dprofile parameter values
>>> (gateway-worker, gateway-manager, api-key-manager, api-publisher,
>>> api-store) are not given.
>>>
>>> However the required store and publisher jaggeryapps are added/removed
>>> by puppet scripts when starting each profile instance.
>>> As for an example during the initialization of gateway instance, store
>>> and publisher apps are removed as follows.
>>>
>>>     exec { "removing_publisher_app_for_gateway":
>>>         path    =>
>>> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
>>>         command => "rm -rf
>>> $carbon_home/repository/deployment/server/jaggeryapps/publisher",
>>>         require => Apimanager::Deploy["${deployment_code}_${amtype}"],
>>>     }
>>>
>>>     exec { "removing_store_app_for_gateway":
>>>         path    =>
>>> "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
>>>         command => "rm -rf
>>> $carbon_home/repository/deployment/server/jaggeryapps/store",
>>>         require => Apimanager::Deploy["${deployment_code}_${amtype}"],
>>>     }
>>>
>>> This is performed accordingly in each profile instance of the cluster.
>>> i.e. in store instance publisher app is removed, in publisher instance
>>> store app is removed,
>>> in keymanager instance both apps are removed.
>>>
>>> WDYT about this approach?
>>>
>>> We had to go to this approach since we started to get some
>>> NoClassDefFoundError errors [2]
>>> when automating cluster based tests.
>>>
>>> [1] https://docs.wso2.com/display/AM191/Product+Profiles
>>> [2] [Dev] OpenIDConnect - Error while accessing UserInfo Endpoint
>>>
>>> Thanks,
>>> Suhan
>>>
>>>
>>>
>>> --
>>> Suhan Dharmasuriya
>>> Software Engineer - Test Automation
>>>
>>> *WSO2, Inc. *
>>>
>>> lean . enterprise . middleware
>>> Tel: +94 112 145345
>>> Mob: +94 779 869138
>>> Blog: http://suhan-opensource.blogspot.com/
>>>
>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : [email protected]
>> Phone : +94 777 775 729
>>
>
>
>
> --
> Suhan Dharmasuriya
> Software Engineer - Test Automation
>
> *WSO2, Inc. *
>
> lean . enterprise . middleware
> Tel: +94 112 145345
> Mob: +94 779 869138
> Blog: http://suhan-opensource.blogspot.com/
>



-- 
Suhan Dharmasuriya
Software Engineer - Test Automation

*WSO2, Inc. *

lean . enterprise . middleware
Tel: +94 112 145345
Mob: +94 779 869138
Blog: http://suhan-opensource.blogspot.com/

Attachment: wso2carbon.log
Description: Binary data

_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to