Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322983

Summary: Clustering the Gemini.Web cannot be done because of the missing import packages
Product: [RT] Gemini.Web Reporter: Violeta Georgieva <milesg78>
Component: unknownAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington, zteve.powell
Version: unspecified   
Target Milestone: 1.1.0.M04-incubation   
Hardware: PC   
OS: Windows XP   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=315349
Whiteboard:
Attachments:
Description Flags
tomcat-server.xml with cluster configuration
none
tomcat-server.xml with cluster configuration none

Description Violeta Georgieva CLA 2010-08-18 03:43:02 EDT
Build Identifier: 

Hi,

I want to use in Gemini.Web the cluster functionality of the Tomcat.
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

I added the needed configuration in the tomcat-server.xml, but when I start the Gemini.Web I received the following exception:

java.lang.ClassNotFoundException: org.apache.catalina.ha.tcp.SimpleTcpCluster
        at org.eclipse.gemini.web.tomcat.internal.loading.ChainedClassLoader.doLoadClass(ChainedClassLoader.java:174)
        at org.eclipse.gemini.web.tomcat.internal.loading.ChainedClassLoader.loadClass(ChainedClassLoader.java:157)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)

I added several packages in the Import-Package header of the com.springsource.org.apache.catalina.springsource bundle and I succeeded to run the Tomcat cluster.

Is it possible to add the following meta data in the com.springsource.org.apache.catalina.springsource bundle

Import-Package header: 
 org.apache.catalina.ha,
 org.apache.catalina.ha.session,
 org.apache.catalina.ha.tcp,
 org.apache.catalina.tribes,
 org.apache.catalina.tribes.group,
 org.apache.catalina.tribes.group.interceptors,
 org.apache.catalina.tribes.membership,
 org.apache.catalina.tribes.transport,
 org.apache.catalina.tribes.transport.nio

Thanks in advance.
Regards
Violeta Georgieva

Reproducible: Always

Steps to Reproduce:
1.Get the attached tomcat-server.xml and use it for reproducing the use case.
2.Start the Gemini.Web
3.java.lang.ClassNotFoundException: org.apache.catalina.ha.tcp.SimpleTcpCluster exception will appear
Comment 1 Violeta Georgieva CLA 2010-08-18 03:47:38 EDT
Created attachment 176870 [details]
tomcat-server.xml with cluster configuration
Comment 2 Steve Powell CLA 2010-08-19 08:02:32 EDT
Violeta,

Gemini.web depends upon the tomcat and catalina bundles version 6.0.20.S2-r5956 which are all resolved from the Enterprise Bundle Repository.  To change the meta-data of these bundles is now not possible.

The versions of these bundles we use have been specially created for two reasons: one is that the meta-data required to be OSGi-deployable is not present in the originals (the raison-d'etre of the EBR) and two is that to embed tomcat in a project like Gemini.Web (and Virgo -- G.W's sister project) requires some adjustments to its base configuration.  This is the reason for the S2-r5956 qualifier.

We are in the process of upgrading the version of tomcat (and related bundles) which Gemini.Web depends on, and this involves putting newer bundles in the EBR. We therefore have some control over what appears in the meta-data for those new bundles.

When the team leader (Glyn Normington) is available (presently he is on holiday) I will be consulting him on the necessary steps to take.
Comment 3 Steve Powell CLA 2010-08-19 08:04:02 EDT
Ref to CQ on Virgo (https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4398) and CQ on Gemini.Web (https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4399.
Comment 4 Steve Powell CLA 2010-08-19 08:08:45 EDT
[Bug 315349] appears to be related to this issue.
Comment 5 Violeta Georgieva CLA 2010-08-20 04:33:04 EDT
Thanks Steve!

I played further with the cluster scenario and I have one more proposal.

We can think about making 
com.springsource.org.apache.catalina.ha.springsource 
and 
com.springsource.org.apache.catalina.tribes.springsource 

as fragment bundles to com.springsource.org.apache.catalina.springsource

I will look forward to your comments.

Regards
Violeta
Comment 6 Steve Powell CLA 2010-08-23 05:43:49 EDT
Part of the Tomcat 6.0.29 upgrade.
Comment 7 Glyn Normington CLA 2010-09-07 05:44:17 EDT
I am trying to reproduce the failure before investigating proposed solutions. Unfortunately, I cannot download the tomcat-server.xml attachment. Please could you attach a zip of it?

Also please could you spell out how you provide this file to Gemini Web to recreate the problem. Thanks.
Comment 8 Violeta Georgieva CLA 2010-09-07 07:53:03 EDT
Created attachment 178312 [details]
tomcat-server.xml with cluster configuration

Hi Glyn,

Here is the zipped tomcat-server.xml file.

On my Gemini.Web installation it is located:
<Gemini-Web-Home>/config/tomcat-server.xml

Regards
Violeta
Comment 9 Glyn Normington CLA 2010-09-07 09:50:40 EDT
Thanks Violeta. I can now recreate the problem.
Comment 10 Glyn Normington CLA 2010-09-07 12:29:33 EDT
I have tested the fragment approach and it seems to work very nicely. The next step is to cut a milestone of Gemini Web to include this level.
Comment 11 Glyn Normington CLA 2010-09-07 12:57:35 EDT
Milestone 4 is created and will be publicised tomorrow.
Comment 12 Glyn Normington CLA 2010-09-08 09:24:04 EDT
Milestone 4 is available from the Gemini Web download page.
Comment 13 Glyn Normington CLA 2010-09-09 06:09:48 EDT
Hi Violeta

Please would you close this bug if you are happy with the outcome.

Thanks,
Glyn
Comment 14 Violeta Georgieva CLA 2010-09-09 08:12:13 EDT
Thanks