users@shoal.java.net

Re: Need help with SHOAL

From: Shreedhar Ganapathy <shreedhar.ganapathy_at_oracle.com>
Date: Mon, 06 Dec 2010 12:43:48 -0800

Hi Kushal
I have cc'd the user mailing list so that others in the community can
respond when I am not around or if they have better answers.
Please use "Reply All" in your response so that it will reach the
mailing list.

Yes, I had written that sample. For understanding Shoal concepts, look
into my blog entry :
http://blogs.sun.com/shreedhar/entry/shoal_clustering_101 if you have
not done so already. If you have, then please send us your questions and
we will be happy to help.

On the error you are seeing, Can you try executing your sample class as
follows from a terminal window (or a dos command window)? It is quite
possible your Netbeans environment may not have the right library
resolutions.

Assuming you are using Windows
java -cp .;<path-to>\shoal-gms.jar;<path-to>\jxta.jar SimpleShoalGMSSample
with the jars being from the 1.1_08182009 zip file.

I executed the above on my mac after compilation and did not see your
errors. Here's the detailed terminal window output on my mac (I had the
SimpleShoalGMSample.java file on the same directory as the unzipped
Shoal GMS directory :

dhcp-santaclara22-1fl-west-10-132-181-151:shoal-1.1_08182009 shreed$
javac -classpath .:./shoal-gms.jar:./jxta.jar SimpleShoalGMSSample.java
dhcp-santaclara22-1fl-west-10-132-181-151:shoal-1.1_08182009 shreed$
dhcp-santaclara22-1fl-west-10-132-181-151:shoal-1.1_08182009 shreed$
java -cp .:./shoal-gms.jar:./jxta.jar SimpleShoalGMSSample
Dec 6, 2010 12:35:26 PM SimpleShoalGMSSample runSimpleSample
INFO: Starting SimpleShoalGMSSample....
Dec 6, 2010 12:35:26 PM SimpleShoalGMSSample initializeGMS
INFO: Initializing Shoal for member: server1291667726948 group:Group1
Dec 6, 2010 12:35:27 PM SimpleShoalGMSSample registerForGroupEvents
INFO: Registering for group event notifications
Dec 6, 2010 12:35:27 PM SimpleShoalGMSSample joinGMSGroup
INFO: Joining Group Group1
Dec 6, 2010 12:35:28 PM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
getMemberTokens
INFO: GMS View Change Received for group Group1 : Members in view for
MASTER_CHANGE_EVENT(before change analysis) are :
1: MemberId: server1291667726948, MemberType: CORE, Address:
urn:jxta:uuid-59616261646162614A78746150325033E07FCD066B324A148CDDAD657898632F03

Dec 6, 2010 12:35:28 PM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
newViewObserved
INFO: Analyzing new membership snapshot received as part of event :
MASTER_CHANGE_EVENT for Member: server1291667726948 of Group: Group1
Dec 6, 2010 12:35:28 PM com.sun.enterprise.ee.cms.impl.jxta.ViewWindow
addGroupLeadershipNotificationSignal
INFO: adding GroupLeadershipNotification signal leaderMember:
server1291667726948 of group: Group1
Dec 6, 2010 12:35:28 PM SimpleShoalGMSSample sendMessages
INFO: wait 15 secs to send 10 messages
Dec 6, 2010 12:35:33 PM com.sun.enterprise.jxtamgmt.ClusterViewManager
addToView
WARNING: no changes from previous view, skipping notification of
listeners for cluster view event MASTER_CHANGE_EVENT from member:
server1291667726948 group: Group1
Dec 6, 2010 12:35:33 PM com.sun.enterprise.jxtamgmt.MasterNode
appointMasterNode
INFO: Assuming Master Node designation member:server1291667726948 for
group:Group1
Dec 6, 2010 12:35:38 PM SimpleShoalGMSSample sendMessages
INFO: Sending messages...
Dec 6, 2010 12:35:39 PM SimpleShoalGMSSample waitForShutdown
INFO: wait 20 secs to shutdown
Dec 6, 2010 12:35:59 PM SimpleShoalGMSSample leaveGroupAndShutdown
INFO: Shutting down instance server1291667726948
Dec 6, 2010 12:35:59 PM com.sun.enterprise.ee.cms.impl.jxta.GMSContext leave
INFO: Leaving GMS group Group1 with shutdown type set to InstanceShutdown
dhcp-santaclara22-1fl-west-10-132-181-151:shoal-1.1_08182009 shreed$




On 12/6/10 12:32 PM, C0mf0rtably Numb wrote:
> I believe that you have written this code.
>
> http://blogs.sun.com/shreedhar/resource/SimpleGMSSample.java
>
> This is the code I am trying to execute.
>
> I am grateful that you have cared to reply. However I find myself in
> trouble trying to execute and understand the code. Do you know of any
> resources where I can get a firm grasp of various SHOAL concepts?
>
> Thanks.
>
> On Tue, Dec 7, 2010 at 1:57 AM, C0mf0rtably Numb <08.kushal_at_gmail.com
> <mailto:08.kushal_at_gmail.com>> wrote:
>
> Can you please guide me to the user forum?
>
> I am using the following library "shoal-1.1_08182009".
>
> I am executing my code in Netbeans. The code compiles just fine.
> When I run it. I get the following in the console,
>
> *Dec 7, 2010 1:51:07 AM SimpleGMS runSimpleSample
> INFO: Starting SimpleGMSSample....
> Dec 7, 2010 1:51:07 AM SimpleGMS initializeGMS
> INFO: Initializing Shoal for member: server1291666867934 group:Group1
> Dec 7, 2010 1:51:07 AM SimpleGMS registerForGroupEvents
> INFO: Registering for group event notifications
> Dec 7, 2010 1:51:07 AM SimpleGMS joinGMSGroup
> INFO: Joining Group Group1
> Exception in thread "main" java.lang.NoSuchMethodError:
> net.jxta.platform.NetworkConfigurator.setMulticastPoolSize(I)V
> at
> com.sun.enterprise.jxtamgmt.NetworkManager.startDomain(NetworkManager.java:696)
> at
> com.sun.enterprise.jxtamgmt.NetworkManager.start(NetworkManager.java:404)
> at
> com.sun.enterprise.jxtamgmt.ClusterManager.<init>(ClusterManager.java:141)
> at
> com.sun.enterprise.ee.cms.impl.jxta.GroupCommunicationProviderImpl.initializeGroupCommunicationProvider(GroupCommunicationProviderImpl.java:154)
> at
> com.sun.enterprise.ee.cms.impl.jxta.GMSContext.join(GMSContext.java:145)
> at
> com.sun.enterprise.ee.cms.impl.common.GroupManagementServiceImpl.join(GroupManagementServiceImpl.java:367)
> at SimpleGMS.joinGMSGroup(SimpleGMS.java:75)
> at SimpleGMS.runSimpleSample(SimpleGMS.java:45)
> at SimpleGMS.main(SimpleGMS.java:24)*
>
> I would be really obliged if you can guide me. I have a
> presentation to make tomorrow and have to get this code to work.
> I'm sorry for the trouble that I might/am causing.
>
> Thanks
> Kushal
>
>
>
> On Tue, Dec 7, 2010 at 1:50 AM, Shreedhar Ganapathy
> <shreedhar.ganapathy_at_oracle.com
> <mailto:shreedhar.ganapathy_at_oracle.com>> wrote:
>
> Hi Kushal
> Which version of shoal are you using and where did you
> download it from?
> Also, please share the errors you are seeing, in the user
> forum cc'd.
>
> Thanks
> Shreedhar
>
>
> On 12/6/10 12:16 PM, C0mf0rtably Numb wrote:
>
> Hi,
>
> I am a newbie programmer in SHOAL. I am trying to run the
> sample code but I am getting errors executing it. I would
> be highly thankful if you can help me with it. Please I am
> in urgent need of it.
>
> Thanks
> Kushal.
>
>
>