Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4445431

Misleading exception stack for LocalObject

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.4.0
    • other-libs
    • None
    • beta2
    • sparc
    • solaris_8
    • Not verified

        When invoking _orb() or other methods of LocalObject that throw NO_IMPLEMENT, the stack trace is quite misleading. This is due to the fact that the NO_IMPLEMENT exception is constructed in the initializer instead of the individual methods.

        While this seems like an optimization, it only leads to confusion and misinformation. It is best practice to construct an exception as close to the origin as possible.

        For example, calling _orb() on a LocalObject results in:

        org.omg.CORBA.NO_IMPLEMENT: This is a locally constrained object. minor code: 0 completed: No
                at org.omg.CORBA.LocalObject.<init>(LocalObject.java:26)
                at com.sun.corba.ee.internal.Interceptors.PICurrent.<init>(PICurrent.java:55)
                at com.sun.corba.ee.internal.Interceptors.PIORB.<init>(PIORB.java:206)
                at java.lang.Class.newInstance0(Native Method)
                at java.lang.Class.newInstance(Class.java:237)
                at org.omg.CORBA.ORB.create_impl(ORB.java:284)
                at org.omg.CORBA.ORB.init(ORB.java:328)
                at com.sun.corba.ee.internal.Activation.ORBD.createORB(ORBD.java:94)
                at com.sun.corba.ee.internal.Activation.ORBD.run(ORBD.java:104)
                at com.sun.corba.ee.internal.Activation.ORBD.main(ORBD.java:288)

              hcarr Harold Carr
              mrothsunw Mark Roth (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: