This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 110218 - NPE and IllegalStateException after messing with WSDL port properties and reloading
Summary: NPE and IllegalStateException after messing with WSDL port properties and rel...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: Composite Application (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jun Qian
URL:
Keywords:
: 110060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-18 22:50 UTC by jlautz
Modified: 2008-04-09 16:25 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Reload dialog prompt. (112.50 KB, application/octet-stream)
2007-07-18 22:53 UTC, jlautz
Details
NullPointerException stack trace after rt-clicking on SOAP port. (5.74 KB, application/octet-stream)
2007-07-18 22:54 UTC, jlautz
Details
Screenshot showing SOAP port properties with error msg. (110.75 KB, application/octet-stream)
2007-07-18 22:55 UTC, jlautz
Details
IllegalStateException + NPE stack traces after 2nd attempt to access SOAP port properties (5.17 KB, application/octet-stream)
2007-07-18 22:56 UTC, jlautz
Details
Netbeans log file (76.05 KB, application/octet-stream)
2007-07-18 22:59 UTC, jlautz
Details
Compapp files after saving at end of scenario. (10.82 KB, application/octet-stream)
2007-07-18 22:59 UTC, jlautz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jlautz 2007-07-18 22:50:29 UTC
Seen in 

1. Create a new composite app project (New Project; SOA; Composite Application).
2. Open the composite app using CASA (Edit Application Configuration).
3. DnD a File BC, then a SOAP BC into the WSDL Ports area.
4. Open the Properties dialog for the SOAP BC (rt click Properties). 
5. Click the dropdown for Interface Name (only value is a blank line -- choose that). 
6. Click Close.

==> I get a reload dialog to reload the *.wsdl file (screenshot attached).

7. Click Yes.
8. Rt click on the SOAP port. (Don't even get to the point of choosing from the context menu.

=> I get a NullPointerException. Stack trace attached. 

9. Rt click on the SOAP port and choose Properties.

=> I get another NPE. The Properties dialog is displayed with red message in the Interface Name field: Referencing
component is not part of model. (Stack trace and screen shot attached.

NOTE: up to this point, I have done no saving nor project building.

Log file and project files (saved after step 9) also attached.

I could also choose the SOAP BC properties in step 4; doesn't seem to matter.

I have made this a P2, because I have logged similar bugs already, and think the pattern calls for the higher priority.
Comment 1 jlautz 2007-07-18 22:53:48 UTC
Created attachment 45346 [details]
Reload dialog prompt.
Comment 2 jlautz 2007-07-18 22:54:32 UTC
Created attachment 45347 [details]
NullPointerException stack trace after rt-clicking on SOAP port.
Comment 3 jlautz 2007-07-18 22:55:28 UTC
Created attachment 45348 [details]
Screenshot showing SOAP port properties with error msg.
Comment 4 jlautz 2007-07-18 22:56:06 UTC
Created attachment 45349 [details]
IllegalStateException + NPE stack traces after 2nd attempt to access SOAP port properties
Comment 5 jlautz 2007-07-18 22:59:04 UTC
Created attachment 45351 [details]
Netbeans log file
Comment 6 jlautz 2007-07-18 22:59:28 UTC
Created attachment 45352 [details]
Compapp files after saving at end of scenario.
Comment 7 jlautz 2007-07-18 23:00:52 UTC
Seen in: 
Product Version: NetBeans IDE Dev (Build 200707161200) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System:
Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\lautz\.netbeans\dev
Comment 8 Jun Qian 2007-07-19 02:19:26 UTC
Can't reproduce the reload dialog (which should not be happening) after step 6.

I will update the whole NB and try it again.
Comment 9 Jun Qian 2007-07-19 07:45:19 UTC
Still can't reproduce using the latest build from source code.

Product Version: NetBeans IDE Dev (Build 070718) 
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) 
Userdir: C:\Documents and Settings\jqian\.netbeans\dev

Before I close this as not reproducible. Tien and Ramesh, could you guys try reproducing this one? It looks like our old
friend is coming back haunting Jen again. :-)
Comment 10 jlautz 2007-07-19 13:44:49 UTC
Issue 110060 is also a reload *.wsdl => NPE situation after messing with properties. Is there something weird going on
in the synchronization code between the properties and the WSDL model? 
Comment 11 jlautz 2007-07-19 15:01:10 UTC
And if the speed of the machine makes a difference, my laptop is running Intel Pentium M 1.80 GHz with 1.79 GHz 1.00 GB
of RAM. 

My lab machine has Dual Core AMD Opteron Processor 180 2.41 GHz, 2.00 GB of RAM. I had not encountered these problems
very frequently on this faster machine.
Comment 12 Tientien Li 2007-07-19 18:25:41 UTC
Tried several times with the latest C/B build, #1899, but could not repoduce the error between step 6 and 7.

BTW, my laptop is an older Dell, Intel Pentium M 1.6 GHz with 2.0 GB of RAM
Comment 13 jlautz 2007-07-19 18:39:58 UTC
How do I turn detailed tracing on to get you more data on the failure?

Comment 14 Tientien Li 2007-07-19 19:03:31 UTC
OK, I was able to reproduce this after adding a few steps...

- create a new compapp project
- open the compapp in CASA
- add file and soap WSDL ports
- open the project wsdl (it shows the new binding and service elements)
- close wsdl and discard changes made in wsdl
- close casa but save it

Now casa and the project wsdl are out of sync!!!

- open casa again
- make some changes in casa, e.g., touch the propperty of WSDL ports

Errors like NPE and IllegalState exceptions show up.
Comment 15 Jun Qian 2007-07-19 20:29:46 UTC
Tien's sequence sounds more reasonable to get this kind of synchronization error, which I can probably fix. 

In Jen's sequence, I don't see why the WSDL file would get modified externally.

As to step 5 and 6, on a related (or maybe non-related note), there is some problem in the popup property editor. If you
change something in the popup property editor, then click the Cancel button to cancel your change, your change still get
through. Ramesh is aware of this problem and is fixing it.
Comment 16 jlautz 2007-07-19 20:41:09 UTC
I'll keep reporting the Reload dialogs as I encounter them. All I seem to need to do is run on my "low" RAM machine . .
. Is there any further information I can provide to help you determine why these are happening? 

Q: is the user supposed to choose Yes or No when they encounter the Reload dialogs? If "No", we should add that info to
the release notes. Choosing "Yes" leads to the sync problems. Or else tell the user to always build before touching
properties -- that seems to help also.
Comment 17 Jun Qian 2007-07-19 21:13:41 UTC
I would say, for a regular user, unless she goes out of her way to modify the WSDL file directly, she should never see
the reload dialog in the first place. 
Comment 18 Jun Qian 2007-07-19 21:19:17 UTC
Jen, if you put a delay between step 3 and 4, and/or between step 4 and 5, do you still get the reload dialog?
Comment 19 jlautz 2007-07-19 22:39:12 UTC
Attempt 1: I waited 15-20 seconds between steps 3 and 4, then got the reload dialog as soon as I moved my mouse.

Attempt 2: I started over from the beginning (new compapp, etc.), then waited 15-20 seconds between steps 3 and 4, then
between 4 and 5, and got the reload dialog as described after step 6.

Attempt 3: Started over with new compapp . . . waited 15+ seconds between steps 3 and 4, 15+ seconds between 4 and 5,
then 15+ seconds between 5 and 6. Immediately got the reload dialog.

Comment 20 Jun Qian 2007-07-23 22:36:25 UTC
Fixed.

IDE:-------------------------------------------------
IDE: [7/23/07 2:34 PM] Committing "CasaWrapperModel.java" started
Checking in CasaWrapperModel.java;
/cvs/enterprise/compapp/casaeditor/src/org/netbeans/modules/compapp/casaeditor/model/casa/CasaWrapperModel.java,v  <-- 
CasaWrapperModel.java
new revision: 1.57; previous revision: 1.56
done
IDE: [7/23/07 2:35 PM] Committing "CasaWrapperModel.java" finished
Comment 21 jlautz 2007-07-25 22:10:31 UTC
Retested with 
Product Version: NetBeans IDE Dev (Build 200707250000) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System:
Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\lautz\.netbeans\dev

I can still reproduce the reload dialog using this scenario.

However, I also noticed that I get a reload dialog when I create a new BPEL module, if that helps. I've logged issue 111020.
Comment 22 Jun Qian 2007-07-26 20:41:55 UTC
Is the reload dialog still for the <compapp>.wsdl file, or is it for the catalog.xml file as you logged in #111020?
Comment 23 jlautz 2007-07-26 20:46:45 UTC
BPEL gave me a reload for the catalog.xml, and CASA gives me a reload for the *.wsdl file. Sorry if that was confusing.
I was hoping it might help to point out that there might be a problem in some common code to check out and fix.
Comment 24 Jun Qian 2007-08-07 03:00:01 UTC
Jen, I still need to get access to your slower machine to reproduce.
Comment 25 Jun Qian 2007-08-21 01:13:06 UTC
Fix attempt.
Comment 26 jlautz 2007-08-22 17:50:01 UTC
*** Issue 110060 has been marked as a duplicate of this issue. ***
Comment 27 jlautz 2007-08-28 19:47:39 UTC
Can still easily reproduce with   Product Version: NetBeans IDE Dev (Build 200708270201) Java: 1.6.0_01; Java
HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir:
C:\Documents and Settings\lautz\.netbeans\dev .
Comment 28 Joseph Silber 2007-09-10 13:55:34 UTC
release note added beta 1
Comment 29 jlautz 2007-09-11 01:19:03 UTC
Just another data point: I also reproduced this problem with the 20070910 Beta 1 kit on Ubuntu Linux.
Comment 30 Jun Qian 2008-03-20 21:32:55 UTC
Some problem about "external modification" is fixed recently. Please retest.
Comment 31 jlautz 2008-04-09 16:25:33 UTC
Verified that I can no longer reproduce the NPE with the specified scenario.


Product Version: NetBeans IDE Dev (Build 200804040802) - Java CAPS Enabled
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: SunOS version 5.10 running on x86; ISO646-US; en (nb)
Userdir: /Users/lautz/sierrabuilds/JavaCAPS20080406/.netbeans/caps