ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bearrito <barr...@bnrobotics.com>
Subject Calling serviceDescriptiors after service deployment throws exception
Date Sun, 26 Jun 2016 18:09:58 GMT
I am using 1.6.0 obtained from maven repository

I have the following  simplified JUNIT test

@Test
public void canDeployServiceAndGetDescription(){


        svcs.serviceDescriptors();
        svcs.deployNodeSingleton("s1",  new
CacheGarbageCollectorImpl(ignite, cfg1));
        CacheGarbageCollectorImpl gc =  svcs.service("s1");
        svcs.serviceDescriptors();

    }

The test throws an exception on the last line with

class org.apache.ignite.binary.BinaryObjectException: Failed to unmarshal
object with optimized marshaller

	at
org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1575)
	at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1663)
	at
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:298)
	at
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal(BinaryMarshaller.java:109)
	at
org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessorImpl.unmarshal(IgniteCacheObjectProcessorImpl.java:106)
	at
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.unmarshal(CacheObjectBinaryProcessorImpl.java:765)
	at
org.apache.ignite.internal.processors.cache.CacheObjectImpl.value(CacheObjectImpl.java:76)
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:257)
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:148)
	at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:135)
	at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$LazyValueEntry.getValue(GridCacheMapEntry.java:4473)
	at
org.apache.ignite.internal.processors.service.GridServiceProcessor.serviceDescriptors(GridServiceProcessor.java:618)
	at
org.apache.ignite.internal.IgniteServicesImpl.serviceDescriptors(IgniteServicesImpl.java:203)
	at
com.bossanova.services.TestServices.canDeployMultipleServicesAnd(TestServices.java:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
deserialize object with given class loader:
sun.misc.Launcher$AppClassLoader@14dad5dc
	at
org.apache.ignite.marshaller.optimized.OptimizedMarshaller.unmarshal(OptimizedMarshaller.java:221)
	at
org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1572)
	... 38 more
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:532)
	at
org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:836)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readFields(OptimizedObjectInputStream.java:491)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:579)
	at
org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:841)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readFields(OptimizedObjectInputStream.java:491)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:579)
	at
org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:841)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readFields(OptimizedObjectInputStream.java:491)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:579)
	at
org.apache.ignite.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:841)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:324)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
	at
org.apache.ignite.marshaller.optimized.OptimizedMarshaller.unmarshal(OptimizedMarshaller.java:218)
	... 39 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:527)
	... 58 more
Caused by: java.lang.IllegalArgumentException: This method should be
accessed under org.apache.ignite.thread.IgniteThread
	at org.apache.ignite.internal.IgnitionEx.localIgnite(IgnitionEx.java:1291)
	at
org.apache.ignite.internal.IgniteKernal.readResolve(IgniteKernal.java:3324)
	... 63 more





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Calling-serviceDescriptiors-after-service-deployment-throws-exception-tp5903.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message