Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-59979

Workbox / MyWork plugin throws an exception in JIRA Data Center

    XMLWordPrintable

Details

    Description

      Summary

      When connecting JIRA to Confluence, using JIRA Data Center, the MyWork plugin throws an exception. Plugins cannot put keys or values in replicated caches that come from classes not accessible from webapp classloader, such as from the plugin classloader. This is what MyWork is doing with one of its replicated caches.

      Environment

      JIRA Data Center
      Workbox plugin 3.0.4

      Steps to Reproduce

      1. Install 2 nodes of JDC.
      2. Start them up.
      3. Use the JIRA instance as normal.

      Expected Results

      This works without any problems.

      Actual Results

      The below exception is thrown whilst using the application, indicating cache replication is broken. The plugin does not function as expected.

      2015-11-05 12:22:13,877 myWorkHostChecker:thread-1 ERROR      [n.s.ehcache.distribution.RMISynchronousCacheReplicator] Exception on replication of putNotification. RemoteException occurred in server thread; nested exception is: 
          	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
          	java.lang.ClassNotFoundException: com.atlassian.mywork.client.service.HostServiceImpl$HostType (no security manager: RMI class loader disabled). Continuing...
      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
      	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
      	java.lang.ClassNotFoundException: com.atlassian.mywork.client.service.HostServiceImpl$HostType (no security manager: RMI class loader disabled)
      	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:354)
      	at sun.rmi.transport.Transport$1.run(Transport.java:200)
      	at sun.rmi.transport.Transport$1.run(Transport.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
      	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
      	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)
      	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
      	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
      	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
      	at net.sf.ehcache.distribution.RMICachePeer_Stub.put(Unknown Source)
      	at net.sf.ehcache.distribution.RMISynchronousCacheReplicator.replicatePutNotification(RMISynchronousCacheReplicator.java:149)
      	at com.atlassian.cache.ehcache.replication.rmi.RMISynchronousCacheReplicator.replicateViaCopy(RMISynchronousCacheReplicator.java:60)
      	at com.atlassian.cache.ehcache.replication.rmi.RMISynchronousCacheReplicator.notifyElementPut(RMISynchronousCacheReplicator.java:48)
      	at net.sf.ehcache.event.RegisteredEventListeners.internalNotifyElementPut(RegisteredEventListeners.java:180)
      	at net.sf.ehcache.event.RegisteredEventListeners.notifyElementPut(RegisteredEventListeners.java:158)
      	at net.sf.ehcache.Cache.notifyPutInternalListeners(Cache.java:1532)
      	at net.sf.ehcache.Cache.putInternal(Cache.java:1502)
      	at net.sf.ehcache.Cache.put(Cache.java:1427)
      	at net.sf.ehcache.Cache.put(Cache.java:1392)
      	at com.atlassian.cache.ehcache.DelegatingCache.put(DelegatingCache.java:81)
      	at com.atlassian.mywork.client.service.HostIdCache.setHost(HostIdCache.java:47)
      	at com.atlassian.mywork.client.service.HostServiceImpl.setActiveHost(HostServiceImpl.java:209)
      	at com.atlassian.mywork.client.service.HostServiceImpl.updateHostAvailability(HostServiceImpl.java:190)
      	at com.atlassian.mywork.client.service.HostServiceImpl.enable(HostServiceImpl.java:101)
      	at com.atlassian.mywork.client.service.ServiceSelectorImpl$2.run(ServiceSelectorImpl.java:193)
      	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.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
      	java.lang.ClassNotFoundException: com.atlassian.mywork.client.service.HostServiceImpl$HostType (no security manager: RMI class loader disabled)
      	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:314)
      	at sun.rmi.transport.Transport$1.run(Transport.java:200)
      	at sun.rmi.transport.Transport$1.run(Transport.java:197)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
      	... 3 more
      Caused by: java.lang.ClassNotFoundException: com.atlassian.mywork.client.service.HostServiceImpl$HostType (no security manager: RMI class loader disabled)
      	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:396)
      	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:186)
      	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
      	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
      	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:214)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
      	at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1726)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
      	at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:501)
      	at net.sf.ehcache.Element.readObject(Element.java:860)
      	... 3 filtered
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
      	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1900)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
      	at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:326)
      	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:308)
      	... 12 more
      

      Workaround

      Disable the Workbox plugin(s):

      • Workbox - Common Plugin
      • Workbox - JIRA Provider Plugin

      Notes

      It is also a spurious error that doesn't break cache replication, however does mean the plugin itself will not function as expected.

      Functionality

      Workbox (MyWork) plugin is required to show notifications from JIRA in Confluence.
      If you have enabled this functionality in Confluence, when you disable plugin in JIRA, Confluence users will not get notifications from JIRA anymore.
      See more details Including notifications from JIRA

      Attachments

        Issue Links

          Activity

            People

              tom@atlassian.com Tom Davies
              dcurrie@atlassian.com Dave C
              Votes:
              19 Vote for this issue
              Watchers:
              33 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: