Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-688

Need to report root causes to end user as exception in code

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.6.2, 2.7
    • 2.6.1
    • None

      An example of what exception is received at the application level when an incorrect host has been specified in the protocol properties:

      org.jgroups.ChannelException: unable to setup the protocol stack
      at org.jgroups.JChannel.init(JChannel.java:1403)
      at org.jgroups.JChannel.<init>(JChannel.java:279)
      at org.jgroups.JChannelFactory.createChannel(JChannelFactory.java:308)
      at com.ubs.apm.control.service.nameservice.jgroup.JGroupNameService.init(JGroupNameService.java:82)
      at com.ubs.apm.control.service.nameservice.jgroup.JGroupTest.testPropertiesLoad(JGroupTest.java:17)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      Caused by: java.lang.IllegalArgumentException: the following properties in TCPPING are not recognized:

      {num_initial_members=1, timeout=3000}

      at org.jgroups.stack.Configurator$ProtocolConfiguration.createLayer(Configurator.java:700)
      at org.jgroups.stack.Configurator$ProtocolConfiguration.access$000(Configurator.java:595)
      at org.jgroups.stack.Configurator.createProtocols(Configurator.java:375)
      at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:58)
      at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:205)
      at org.jgroups.JChannel.init(JChannel.java:1400)
      ... 27 more

      either you have to look into the code or enable correct logging level to see real cause. What would be useful is to see the actual cause of exception at the application layer.

            rhn-engineering-bban Bela Ban
            kothardi Dipak Kothari (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: