JDK-5066212 : Saving a Frame on BeanBuilder throws ClassNotFoundException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2004-06-21
  • Updated: 2005-10-24
Related Reports
Relates :  
Description
Comments from Srinivas Mandalika on the bug:

In the sanity test with BeanBuilder for bug 4927589 is throwing an exception while saving a Frame, which is different from what is documented in the BeanBuilder Docs.However the exception is occuring in the b51 also. So it is not a regression. 

4972589 Undocumented javax classes in dt.jar
Following are the steps to reproduce this 
Downloaded and install BeanBuilder, set JAVA_HOME to the PITBUILD binaries.
Invoke the BeanBuilder. Add some components to the Frame and click on save. Give a file name and clik  The following exceptions is thrown at the prompt.

java version "swing-jcg-win-01-2004-06-16-int.tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build swing-jcg-win-01-2004-06
-16-int.tiger)
Java HotSpot(TM) Client VM (build 1.5.0-beta3-b55, mixed mode)

Bean Builder Startup Time (ms): 11006
java.lang.ClassNotFoundException: javax.swing.SpringLayout$HeightSpring
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:236)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:303)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at beantest.util.SpringLayoutPersistenceDelegate.configure(Unknown Sourc
e)
        at beantest.BeanBuilder.handleSave(Unknown Source)
        at beantest.BeanBuilder.handleSaveAs(Unknown Source)
        at beantest.BeanBuilder.actionPerformed(Unknown Source)
        at com.sun.java.swing.action.ActionManager.doAction(Unknown Source)
        at com.sun.java.swing.action.ActionManager$1.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:234)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Comments
EVALUATION Name: sh120115 Date: 06/21/2004 ###@###.### - this was discovered during PIT, but is not new to the recent PIT build. Apparently it happens in b51 also. ###@###.### 2004-06-21 ====================================================================== Neither 1.4.2 nor 1.5 can properly encode SpringLayout. This is likely another symptom of 5015403. To get around this, BeanBuilder defines its own PersistenceDeligate for SpringLayout. The fix for 4749723 removed the WidthSpring and HeightSpring private inner classes from SpringLayout, which BeanBuilder's SpringLayoutPersistenceDelegate relied upon. (Unfortunately I cannot easily confirm this because RE has removed all builds previous to b18). I have confirmed that SpringLayout persistence is unchanged between 1.4.2 and 1.5b56. The solution to this bug is to repair the SpringLayoutPersistenceDelegate in the BeanBuilder tool. When 5015403 is fixed, hopefully SpringLayout can be persisted by the default persistence delegate, and it won't be necessary to have a customized SpringLayoutPersistenceDelegate at all. ###@###.### 2004-06-21
21-06-2004