Beans.instantiate gives wrong error

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1.2
    • Component/s: client-libs
    • None
    • sparc
    • solaris_2.5

       
      I had a bean with an object VJBca63a13729.VJTlc (i.e VJBca63a13729/VJTlc.ser)

      calling Beans.instantiate on that gave an incorrect error msg:

      java.lang.ClassNotFoundException: VJBca63a13729.VJTlc
              at sun.beanbox.SimpleClassLoader.loadClass(SimpleClassLoader.java:218)
      ...

      After investigating a bit I found out that deserialization had failed because
      of:

      java.io.InvalidClassException: connect.widgets.ImageListBox; Local class not compatible
              at java.io.ObjectStreamClass.setClass(ObjectStreamClass.java)
              at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java)
      ...
      ...

      However Beans.instantiate ingnored this exception and moved on to loading
      the class.


      ==============================================

      Another case is for handling BAD beans (one with no no-arg constructor)
      Beans.instantiate throws an Error which may be desirable.

      java.lang.NoSuchMethodError
      at java.beans.Beans.instantiate(Beans.java:128)

      pramod.jajoo@Eng 1997-08-15

            Assignee:
            Graham Hamilton (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: