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

LTP: MetaData persistence delegates are throwing exceptions.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 5.0
    • client-libs
    • None

      Many of the MetaData persistence delegates are invalid because the private state of the these components have changed due to the refactoring as a result of 4864304.

      For example, the javax_swing_JComponent_PersistenceDelegate will throw an exception since JComponent no longer contains the private fields minumumSize, preferredSize, maximumSize.

      Should reexamine all invocations of MetaData.getPrivateField to see if the fields are still valid.

      java.lang.RuntimeException: java.lang.Exception: discarding statement XMLEncoder0.writeObject(JTextF
      ield0);
              at util.ErrorExceptionListener.exceptionThrown(ErrorExceptionListener.java:10)
              at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:339)
              at java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
              at util.Archiver.writeArchive(Archiver.java:64)
              at util.Archiver.writeArchive(Archiver.java:36)
              at tests.RegressionTests.test4488891(RegressionTests.java:60)
              at tests.RegressionTests.<init>(RegressionTests.java:32)
              at tests.RegressionTests.main(RegressionTests.java:190)
      Caused by: java.lang.Exception: discarding statement XMLEncoder0.writeObject(JTextField0);
              ... 7 more
      Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: minimumSize
              at util.ErrorExceptionListener.exceptionThrown(ErrorExceptionListener.java:10)
              at java.beans.MetaData.getPrivateField(MetaData.java:849)
              at java.beans.javax_swing_JComponent_PersistenceDelegate.initialize(MetaData.java:593)
              at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:191)
              at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:393)
              at java.beans.PersistenceDelegate.initialize(PersistenceDelegate.java:191)
              at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:393)
              at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:103)
              at java.beans.Encoder.writeObject(Encoder.java:55)
              at java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
              at java.beans.Encoder.writeExpression(Encoder.java:260)
              at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:363)
              at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:100)
              at java.beans.Encoder.writeObject(Encoder.java:55)
              at java.beans.XMLEncoder.writeObject(XMLEncoder.java:250)
              at java.beans.Encoder.writeObject1(Encoder.java:192)
              at java.beans.Encoder.cloneStatement(Encoder.java:205)
              at java.beans.Encoder.writeStatement(Encoder.java:236)
              at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:326)

      This bug will cause the java.beans Archiver Regression tests to fail:

      $file=/net/jano/export/disk09/swing/davidson/ws/tiger/test/java/beans/Archiver/RegressionTests.java
      $root=/net/jano/export/disk09/swing/davidson/ws/tiger/test
      author=Mark Davidson
      keywords=bug4488891 bug4504009 bug4503615 bug4489236 bug4488717 bug4533908
      run=ASSUMED_ACTION main RegressionTests\n
      source=RegressionTests.java
      title=Series of regression tests for the LTP

      #-----environment-----

      #-----testresult-----
      description=file:///net/jano/export/disk09/swing/davidson/ws/tiger/test/java/beans/Archiver/RegressionTests.java
      end=Thu Aug 07 15:24:32 PDT 2003
      environment=regtest
      execStatus=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: java.lang.Exception: discar
      ding statement XMLEncoder0.writeObject(JPanel0);
      javatestOS=SunOS 5.8 (sparc)
      javatestVersion=2.1.6
      script=com.sun.javatest.regtest.RegressionScript
      sections=script_messages build main
      start=Thu Aug 07 15:24:23 PDT 2003
      status=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: java.lang.Exception: discarding
       statement XMLEncoder0.writeObject(JPanel0);
      test=java/beans/Archiver/RegressionTests.java
      work=/tmp/java/beans/Archiver

      #section:script_messages
      ----------messages:(4/217)----------
      JDK under test: (/usr/local/java/jdk1.5.0/solaris-sparc)
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b14)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b14, mixed mode)

      #section:build
      ----------messages:(3/102)----------
      command: build RegressionTests
      reason: Named class compiled on demand
      elapsed time (seconds): 0.0050
      result: Passed. No need to compile: RegressionTests.java

      #section:main
      ----------messages:(3/129)----------
      command: main RegressionTests
      reason: Assumed action based on file name: run main RegressionTests
      elapsed time (seconds): 8.252
      ----------System.out:(0/0)----------
      ----------System.err:(158/10138)----------
      Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding
      Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
      Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
      Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
      Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding
      Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding
      Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding
      Warning: Cannot convert string "-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct
      java.lang.RuntimeException: java.lang.Exception: discarding statement XMLEncoder0.writeObject(JTextField0);
              at ErrorExceptionListener.exceptionThrown(ErrorExceptionListener.java:8)
              at java.beans.XMLEncoder.writeStatement(XMLEncoder.java:339)
              at java.beans.XMLEncoder.writeObject(XMLEncoder.java:253)
              at Archiver.writeArchive(Archiver.java:62)
              at Archiver.writeArchive(Archiver.java:34)
              at RegressionTests.test4488891(RegressionTests.java:39)
              at RegressionTests.main(RegressionTests.java:186)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:83)
              at java.lang.Thread.run(Thread.java:549)
      Caused by: java.lang.Exception: discarding statement XMLEncoder0.writeObject(JTextField0);
              ... 12 more
      Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: minimumSize

            mdavidsosunw Mark Davidson (Inactive)
            mdavidsosunw Mark Davidson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: