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

Beans.instantiate gives wrong error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.1.2
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description

       
      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: