JDK-7095555 : java.lang.NoSuchMethodException in java.beans.Statement.invokeInternal
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2011-09-27
  • Updated: 2012-03-20
  • Resolved: 2012-02-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment,
1.7.0-b147

ADDITIONAL OS VERSION INFORMATION :
Windows XP

A DESCRIPTION OF THE PROBLEM :
java.lang.NoSuchMethodException in java.beans.Statement.invokeInternal

java.lang.NoSuchMethodException: <unbound>=WebServiceData.getJaxWsDescriptor();
   at java.beans.Statement.invokeInternal(Statement.java:313)
   at java.beans.Statement.access$000(Statement.java:58)
   at java.beans.Statement$2.run(Statement.java:185)
   at java.security.AccessController.doPrivileged(AccessController.java:0)
   at java.beans.Statement.invoke(Statement.java:182)
   at java.beans.Expression.getValue(Expression.java:153)
   at java.beans.DefaultPersistenceDelegate.doProperty(DefaultPersistenceDelegate.java:192)
   at java.beans.DefaultPersistenceDelegate.initBean(DefaultPersistenceDelegate.java:253)
   at java.beans.DefaultPersistenceDelegate.initialize(DefaultPersistenceDelegate.java:400)
   at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:118)
   at org.netbeans.modules.websvc.manager.model.WebServiceDataPersistenceDelegate.writeObject(WebServiceDataPersistenceDelegate.java:70)

Please see details also in http://netbeans.org/bugzilla/show_bug.cgi?id=202501

REGRESSION.  Last worked in version 6u26

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See the source code .
The code works fine with JDK6.
It throws an exception with JDK 7.

The problem occurs on bean serializing attempt  via XML encoder.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
There should no be exception and object should be serialized.
ACTUAL -
An exception.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream( fileName )));
WebServiceData wsData = some initialized object instance
encoder.writeObject(wsData);

See  source code of WebServiceData class :
http://hg.netbeans.org/web-main/file/c5eaea25e4fc/websvc.manager/src/org/netbeans/modules/websvc/manager/model/WebServiceData.java

---------- END SOURCE ----------

Comments
EVALUATION Looks like a duplicate of 7092744.
17-10-2011