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 82061 - Missing websvc node in webproject
Summary: Missing websvc node in webproject
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Radko Najman
URL:
Keywords: RANDOM
: 82121 (view as bug list)
Depends on:
Blocks: 82592
  Show dependency tree
 
Reported: 2006-08-07 13:22 UTC by Lukas Jungmann
Modified: 2006-09-18 13:11 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-08-07 13:22:22 UTC
-create new webproject with JAX-WS web service

=> websvc node project logical view is not created
Comment 1 Lukas Jungmann 2006-08-07 13:31:53 UTC
reproducible on jdk1.6.0-b93, but random on jdk1.5.0_07-b03
Comment 2 Milan Kuchtiak 2006-08-07 14:08:49 UTC
After investigation I found out that NNMDRListener doesn't fire events when Web
service is added to a web project. For ejb project it works.
At least in jdk1.6 this is 100% reproducible.
Comment 3 Lukas Jungmann 2006-08-07 17:31:03 UTC
This seems to me fixed now. Maybe by fix of issue 81944. Or at least I can see
websvc node in web project now after an update. Marku?
Comment 4 Marek Fukala 2006-08-08 09:06:03 UTC
The fix of 81944 might affect this issue though I think is not so much probable.
The fix consists of replacing the default RequestProcessor with throughput 50 by
a special one with throughtput 1. But this change mainly affects the NNListeners
initialization, not the events firing. Resolving this needs deeper investigation
so letting the decistion on Martin. You could easily verify by reverting the
change and trying to reproduce.
Comment 5 Milan Kuchtiak 2006-08-09 12:37:51 UTC
*** Issue 82121 has been marked as a duplicate of this issue. ***
Comment 6 Lukas Jungmann 2006-08-09 13:13:29 UTC
Happens to me again, so it is really not fixed yet.
Comment 7 Jaroslav Pospisil 2006-08-09 13:26:38 UTC
I'm able to reproduce this with 50% success if starting IDE with new userdir,add
glassfish,create new Web module and then add Web service.Web service is still
created,but not Web services node and when I try to Add Operation by right
clicking in editor(web service's java file is open there), I couldn't find this
option in context menu. Hovewer there is bigger problem,because at the same time
there's not jax-ws.xml file generated in nbproject folder and this could cause
real trouble,so I'm raising the priority to P1 in agreement with Lukas.
Comment 8 Marek Fukala 2006-08-11 09:31:03 UTC
I'll take a look at this one...
Comment 9 Marek Fukala 2006-08-11 12:37:48 UTC
There is what I found so far:
1) the issue is not reproducible for me on 1.5.0
2) the issue is 100% reproducible for me on 1.6.0, but just under these
circumstances:
   a. the IDE has to be run with a new userdir 
   b. new web project has to be created or an old one without any WS related
annotations opened.
   If I run the IDE with a new userdir and open a project already having at
least one webservice annotation in a javaclass then everyting works as usually 

As for the case #2 the NNMDRListener has correctly registered all NNListener
instancies with correct classpath-s. After the first NNListener is added
(WebNNListsner) the NNMDRListener register itself as a MDRChangeListener-s to
all classpath's roots. So far so good. The problem is that for a reason I was
unable to find the events firing behaves weird then. If a new class with
@WebService annotation is created (e.g. using the wizard) NO MDR EVENTS are
fired to the NNMDRListener though it is registered for listening to the correct
cp's roots. If I add another annotation e.g. @Entity, events are fired, but just
for the initial adding. Then when I remove the @Entity and add it back, no
events are fired (another bug not that clearly visible). 

So it seems to me that on 1.6.0, if the web project has some sources with
@WebService annotation, then when JaxWSNNListener is added, the MDR is asked to
find all occurances of supported annotations in opened project, so during this
the MDR somehow resolves the annotation class and events works then. But this is
just an idea though...

I do not want to spend entire day on this issue which might be easy to fix for
Martin or maybe Dan. So reassigning back and kindly asking Dan to express his
opinion on that.



Comment 10 Martin Adamek 2006-08-17 13:36:55 UTC
Problem in javacore is still not found, so it should be fixed probably in web
project. Reassigning. I think Andrei has also some comments...
Comment 11 Daniel Prusa 2006-08-17 13:58:34 UTC
The problem is caused by a bug in javacore. It does not respond on project's
"source level" property changes. During the web project creation, source level
is firstly set to the default value corresponding to the version of jdk the IDE
runs on. If a different source level is selected in the project wizard, it is
set to the project few moments later. Typically, it occurs when running on jdk
1.6, since there is 1.5 source level defaultly selected in the wizard in this
case. If 1.5 source level is used the following sequence of events can occure:

1) web project with source level 1.6 is created
2) NNMDRListener calls resolveJavaExtent, an extent corresponding to source
level 1.6 is returned, the listener is registered on it
3) source level 1.5 is set to the created web project
4) javacore classpath update is running, it checks class path root and assigns
it an extent, since the detected source level is 1.5 now, a different extent is
created - it causes that the listener will not receive any events, all 'active'
jmi data are stored in the 1.5 extent

When a source level is changed manually after the creation of the project, no
classpath update is performed by javacore, thus event notification in
NNMDRListener still works. Currently, there is no support in projects allowing
to listen on source level changes, this pevents to fix the bug in javacore. The
fix can be also classified as risky (at least for q-build).

However, the issue can be fixed if setting of source level is changed in web and
j2ee projects.

In addition, we have to investigate if the "manual" source level change can
cause some another problems...
Comment 12 Andrei Badea 2006-08-17 14:08:46 UTC
It can probably be fixed in the web project type by adding the platformName and
sourceLevel parameters from WebProjectUtilities.setPlatform() to all methods in
WPU which create a project.

I suggest the fix be done in all projects types. If this is not possible I
suggest it be done in the web project only and a comment added to this issue
that the fix can be reverted once javacore is removed and the issue be left open
as a P3 (or a new issue can be filed for that).
Comment 13 Andrei Badea 2006-08-17 14:26:28 UTC
Setting TM back to 5.5, the change to TBD was not intentional.
Comment 14 Radko Najman 2006-08-17 17:02:59 UTC
Andrei's proposal seems to be doable but it is an API change. Because there is
only one day till qbuild I think it is risky to do it so I propose not to fix it
for qbuild but solve it ASAP, before next qbuild.
Comment 15 Lukas Jungmann 2006-08-17 17:24:03 UTC
Removing RANDOM keyword because the reproducible case was found (see dprusa's
comment).

I agree with post-poning the fix to next q-build.
Comment 16 Radko Najman 2006-08-30 10:09:07 UTC
Fixed.

Checking in
web/project/src/org/netbeans/modules/web/project/ui/wizards/NewWebProjectWizardIterator.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/wizards/NewWebProjectWizardIterator.java,v
 <--  NewWebProjectWizardIterator.java
new revision: 1.18.2.2.2.2; previous revision: 1.18.2.2.2.1
done
Checking in
web/project/src/org/netbeans/modules/web/project/ui/wizards/ImportWebProjectWizardIterator.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/wizards/ImportWebProjectWizardIterator.java,v
 <--  ImportWebProjectWizardIterator.java
new revision: 1.44.2.1.2.2; previous revision: 1.44.2.1.2.1
done
Checking in
web/project/src/org/netbeans/modules/web/project/ui/wizards/PanelOptionsVisual.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ui/wizards/PanelOptionsVisual.java,v
 <--  PanelOptionsVisual.java
new revision: 1.24.2.6.2.13; previous revision: 1.24.2.6.2.12
done
RCS file:
/cvs/web/project/src/org/netbeans/modules/web/project/api/Attic/WebProjectCreateData.java,v
done
Checking in
web/project/src/org/netbeans/modules/web/project/api/WebProjectCreateData.java;
/cvs/web/project/src/org/netbeans/modules/web/project/api/Attic/WebProjectCreateData.java,v
 <--  WebProjectCreateData.java
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in
web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java;
/cvs/web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java,v
 <--  WebProjectUtilities.java
new revision: 1.2.2.5.2.17; previous revision: 1.2.2.5.2.16
done
Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/NewEarProjectWizardIterator.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/NewEarProjectWizardIterator.java,v
 <--  NewEarProjectWizardIterator.java
new revision: 1.14.2.2.2.15; previous revision: 1.14.2.2.2.14
done
Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/CompleteEarProjectWizardIterator.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ui/wizards/CompleteEarProjectWizardIterator.java,v
 <--  CompleteEarProjectWizardIterator.java
new revision: 1.11.22.8; previous revision: 1.11.22.7
done
Checking in
j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarProjectGenerator.java,v
 <--  EarProjectGenerator.java
new revision: 1.21.2.2.2.23; previous revision: 1.21.2.2.2.22
done
Checking in
j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/wizard/DeployableWizardIterator.java;
/cvs/j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/wizard/Attic/DeployableWizardIterator.java,v
 <--  DeployableWizardIterator.java
new revision: 1.1.2.20; previous revision: 1.1.2.19
done
Comment 17 Jaroslav Pospisil 2006-09-04 14:29:49 UTC
I just reproduced the issue in 200609040000,so reopening.
Lightbulb allows me to add operation by clicking on it in editor,but WS node is
still missing and when I right-click in editor,I can see only Web Service Client
Resources in menu.
Comment 18 Jaroslav Pospisil 2006-09-04 14:30:13 UTC
I just reproduced the issue in 200609040000,so reopening.
Lightbulb allows me to add operation by clicking on it in editor,but WS node is
still missing and when I right-click in editor,I can see only Web Service Client
Resources in menu.
Comment 19 Radko Najman 2006-09-04 16:01:19 UTC
Are you sure that you really used the latest build? I created 19 web project
with different configurations right now - different JDKs, Java EE versions,
source levels, target servers - in each of them I created a web service (new or
from WSDL) and WS node was always created and shown.
Comment 20 Jaroslav Pospisil 2006-09-04 16:15:38 UTC
I'm sure.This is q-build and I must have latest one.I'm setting the keyword
RANDOM again,since I was able to reproduce this only once and changing priority
to P3.
Comment 21 Daniel Prusa 2006-09-05 13:00:39 UTC
We have detected the cause of this issue and found a way how to reliably fix it
(set correct source level during project creation, not later). In my opinion, it
is inprobable that the problem still exists in some random form, with smaller
probability to occure. If you claim you managed to reproduce the issue only once
and it is not possible again, I would incline to belive that the reproduction
was done using an older build.
Comment 22 Radko Najman 2006-09-11 19:17:37 UTC
Additional commit - asserts for value which cannot be null. It does'n not change
previous fix.

Checking in WebProjectCreateData.java;
/cvs/web/project/src/org/netbeans/modules/web/project/api/Attic/WebProjectCreateData.java,v
 <--  WebProjectCreateData.java
new revision: 1.1.2.2; previous revision: 1.1.2.1
done
Checking in WebProjectUtilities.java;
/cvs/web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java,v
 <--  WebProjectUtilities.java
new revision: 1.2.2.5.2.18; previous revision: 1.2.2.5.2.17
done
Comment 23 Jaroslav Pospisil 2006-09-18 13:07:08 UTC
Cannot reproduce anymore,so closing again.
Comment 24 Jaroslav Pospisil 2006-09-18 13:11:10 UTC
VERIFIED