You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (Jira)" <ji...@apache.org> on 2019/10/11 15:04:00 UTC

[jira] [Created] (IGNITE-12284) When service class not found on any server nodes, service not deployed without any error

Ilya Kasnacheev created IGNITE-12284:
----------------------------------------

             Summary: When service class not found on any server nodes, service not deployed without any error
                 Key: IGNITE-12284
                 URL: https://issues.apache.org/jira/browse/IGNITE-12284
             Project: Ignite
          Issue Type: Bug
          Components: managed services
            Reporter: Ilya Kasnacheev


When service class presents on client node but not on server node, the following is printed on server:

{code}
[17:57:43,398][SEVERE][srvc-deploy-#44][GridServiceProcessor] Failed to initialize service (service will not be deployed): FService
class org.apache.ignite.IgniteCheckedException: com.gridgain.datetest.MyService
        at org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10174)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor.copyAndInject(GridServiceProcessor.java:1440)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor.redeploy(GridServiceProcessor.java:1361)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor.processAssignment(GridServiceProcessor.java:1988)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor.onSystemCacheUpdated(GridServiceProcessor.java:1615)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor.access$300(GridServiceProcessor.java:126)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor$ServiceEntriesListener$1.run0(GridServiceProcessor.java:1597)
        at org.apache.ignite.internal.processors.service.GridServiceProcessor$DepRunnable.run(GridServiceProcessor.java:2064)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException: com.gridgain.datetest.MyService
        at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:707)
        at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1758)
        at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1717)
        at org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:313)
        at org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:102)
        at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
        at org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10168)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: com.gridgain.datetest.MyService
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        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:8775)
        at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:349)
        at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:698)
        ... 16 more
{code}

but on client, ServiceDeploymentException is not thrown. Instead, deploy returns normally.

Code to reproduce:
{code}
public class ServiceStarterMain {

    public static void main(String[] args) {
        Ignition.setClientMode(true);
        Ignite ignite = Ignition.start();
        ServiceConfiguration serviceConfiguration = new ServiceConfiguration();
        serviceConfiguration.setName("FService");
        serviceConfiguration.setMaxPerNodeCount(4);
        serviceConfiguration.setTotalCount(10);
        serviceConfiguration.setService(new MyService());
        ignite.services().deploy(serviceConfiguration); // Exception expected, but does not happen
    }
}
{code}

against a blank Ignite node started from bin distro.

This affects Java and .Net.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)