Pastebin

Paste #229:

< previous paste - next paste>

Pasted by tdn

Download View as text

Denne kode:

	public void multicastMessage(MCMessage m) throws RemoteException, MalformedURLException, NotBoundException {
		logger.info("multicasting message: [" + m + "]");

		if (this.group == null) {
			initGroup();
		}
		
		// Send message and id to all the members of this multicast
		for (int i = 0; i < this.group.length; i++) {
			logger.debug("Multicasting message: " + m + 
					"to mcProcess-" + i);
			group[i].recvMsg(m);
		}

	}




Giver følgende fejl:


2006-10-01 23:43:29 [INFO][MCProcess] mcProcess-1 up; numProcs: 3
2006-10-01 23:43:29 [INFO][MCProcess] multicasting message: [msg: 'hest'; id: 1159739009131; seq: 0]
2006-10-01 23:43:29 [INFO][MCProcess] Initializing the process group
2006-10-01 23:43:29 [DEBUG][MCProcess] Trying to get RMI link to mcProcess-0
2006-10-01 23:43:29 [DEBUG][MCProcess] Trying to get RMI link to mcProcess-1
2006-10-01 23:43:30 [DEBUG][MCProcess] Trying to get RMI link to mcProcess-2
2006-10-01 23:43:30 [DEBUG][MCProcess] Multicasting message: msg: 'hest'; id: 1159739009131; seq: 0to mcProcess-0
java.rmi.MarshalException: error marshalling arguments; nested exception is: 
	java.io.NotSerializableException: dk.thomasdamgaard.diku.distsys.multicast.MCMessage
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
	at $Proxy1.recvMsg(Unknown Source)
	at dk.thomasdamgaard.diku.distsys.multicast.MCProcess.multicastMessage(MCProcess.java:106)
	at dk.thomasdamgaard.diku.distsys.multicast.MCProcess.<init>(MCProcess.java:77)
	at dk.thomasdamgaard.diku.distsys.multicast.MCProcess.main(MCProcess.java:59)
Caused by: java.io.NotSerializableException: dk.thomasdamgaard.diku.distsys.multicast.MCMessage
	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
	at java.io.ObjectOutputStream.writeObject(Unknown Source)
	at sun.rmi.server.UnicastRef.marshalValue(Unknown Source)
	... 7 more

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.