ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tuco.ramirez" <rahul.babb...@gmail.com>
Subject getting a basic error while running ignite
Date Thu, 04 May 2017 13:05:58 GMT
Hi, 

I am trying to run ignite server from the command line and client from the
java code(the way it would happen for us).

So, ignite server is started by 

bin/ignite.sh

The Java code for the client is 

package test.ignite;

import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCompute;
import org.apache.ignite.Ignition;
import org.apache.ignite.configuration.IgniteConfiguration;

public class BasicClient {
	public static void main(String[] args){
		Ignition.setClientMode(true);

		IgniteConfiguration conf = new IgniteConfiguration();
		//conf.setPeerClassLoadingEnabled(true);
		
		Ignite ignite = Ignition.start(conf);

		IgniteCompute async = ignite.compute();
		async.broadcast(new BasicTask());
	}
}



// Basic Task class is below.

package test.ignite;

import java.io.Serializable;

import org.apache.ignite.lang.IgniteRunnable;

public class BasicTask implements IgniteRunnable, Serializable {

	private static final long serialVersionUID = 1L;

	@Override
	public void run() {
		System.out.println("Hello");
	}

}

It works if setPeerClassLoading is set to true, but on commenting it(the way
it will be in prod), i am getting the following error.

May 04, 2017 6:33:12 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to obtain remote job result policy for result from
ComputeTask.result(..) method (will fail the whole task): GridJobResultImpl
[job=C4V2 [r=test.ignite.BasicTask@32a68f4f], sib=GridJobSiblingImpl
[sesId=3e49e83db51-39b9383d-8e16-484e-9549-ff0754a57192,
jobId=6e49e83db51-39b9383d-8e16-484e-9549-ff0754a57192,
nodeId=0e233007-058c-46e5-ab74-6d4388c6e118, isJobDone=false],
jobCtx=GridJobContextImpl
[jobId=6e49e83db51-39b9383d-8e16-484e-9549-ff0754a57192, timeoutObj=null,
attrs={}], node=TcpDiscoveryNode [id=0e233007-058c-46e5-ab74-6d4388c6e118,
addrs=[0:0:0:0:0:0:0:1, 10.150.186.57, 127.0.0.1],
sockAddrs=[tindfctmlxl0033.timesgroup.com/10.150.186.57:47501,
/0:0:0:0:0:0:0:1:47501, /127.0.0.1:47501], discPort=47501, order=2,
intOrder=2, lastExchangeTime=1493902991101, loc=false,
ver=1.9.0#20170302-sha1:a8169d0a, isClient=false], ex=class
o.a.i.IgniteException: test.ignite.BasicTask, hasRes=true,
isCancelled=false, isOccupied=true]
class org.apache.ignite.IgniteException: Remote job threw user exception
(override or implement ComputeTask.result(..) method if you would like to
have automatic failover for this exception).
	at
org.apache.ignite.compute.ComputeTaskAdapter.result(ComputeTaskAdapter.java:101)
	at
org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1031)
	at
org.apache.ignite.internal.processors.task.GridTaskWorker$5.apply(GridTaskWorker.java:1024)
	at
org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6650)
	at
org.apache.ignite.internal.processors.task.GridTaskWorker.result(GridTaskWorker.java:1024)
	at
org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:842)
	at
org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:996)
	at
org.apache.ignite.internal.processors.task.GridTaskProcessor$JobMessageListener.onMessage(GridTaskProcessor.java:1221)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1222)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:850)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.access$2100(GridIoManager.java:108)
	at
org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridIoManager.java:790)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: test.ignite.BasicTask
	at
org.apache.ignite.internal.processors.job.GridJobWorker.initialize(GridJobWorker.java:451)
	at
org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1108)
	at
org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1894)
	... 7 more
Caused by: class org.apache.ignite.IgniteCheckedException:
test.ignite.BasicTask
	at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:9826)
	at
org.apache.ignite.internal.processors.job.GridJobWorker.initialize(GridJobWorker.java:432)
	... 9 more
Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException:
test.ignite.BasicTask
	at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:692)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1491)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450)
	at
org.apache.ignite.internal.binary.BinaryUtils.doReadObject(BinaryUtils.java:1640)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.readObject(BinaryReaderExImpl.java:1124)
	at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C4V2.readBinary(GridClosureProcessor.java:2249)
	at
org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:823)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1498)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450)
	at
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:298)
	at
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:99)
	at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
	at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:9820)
	... 10 more
Caused by: java.lang.ClassNotFoundException: test.ignite.BasicTask
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at
org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8459)
	at
org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:185)
	at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:683)
	... 22 more

Exception in thread "main" class
org.apache.ignite.binary.BinaryInvalidTypeException: test.ignite.BasicTask
	at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:692)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1491)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450)
	at
org.apache.ignite.internal.binary.BinaryUtils.doReadObject(BinaryUtils.java:1640)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.readObject(BinaryReaderExImpl.java:1124)
	at
org.apache.ignite.internal.processors.closure.GridClosureProcessor$C4V2.readBinary(GridClosureProcessor.java:2249)
	at
org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:823)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1498)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1450)
	at
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:298)
	at
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:99)
	at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
	at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:9820)
	at
org.apache.ignite.internal.processors.job.GridJobWorker.initialize(GridJobWorker.java:432)
	at
org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1108)
	at
org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:1894)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1222)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:850)
	at
org.apache.ignite.internal.managers.communication.GridIoManager.access$2100(GridIoManager.java:108)
	at
org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridIoManager.java:790)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: test.ignite.BasicTask
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at
org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8459)
	at
org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:185)
	at
org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:683)
	... 22 more





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/getting-a-basic-error-while-running-ignite-tp12418.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message