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 133860 - "Add Operation" on web services NOT WORKING
Summary: "Add Operation" on web services NOT WORKING
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on: 138135
Blocks:
  Show dependency tree
 
Reported: 2008-04-24 19:05 UTC by haroldcarr
Modified: 2008-11-19 14:49 UTC (History)
4 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 haroldcarr 2008-04-24 19:05:46 UTC
1 File / New Project / Web / Web Application / Next

2. Project Name: X / Next / 
   configured to GlassFish v2ur1-b09d / JavaEE 5
   Finish

3. Projects / X/rightclick / New /  Web Service
   Web Service Name: X
   Package: foo
   Finish

4. X.java


FIRST BUG:

Sometimes the "Design" pane says:

	"The design view can not be rendered.  Please switch to tsource view."

Switch to Source

5. Inside the X class
   right click

SECOND BUG:

There should be an option for Web Service to Add Operation.
It's not there.

Attempted workaround:

6 Projects / X / Web Services / X/rightclick / Add Operation ...

THIRD BUG:

Nothing happens when I select "Add Operation"

Note: sometimes the above works.  But mostly it hasn't for me.
And Ashutosh said he had the same problem.
Comment 1 haroldcarr 2008-04-24 19:06:29 UTC
Meant to submit as P1 - this is critical
Comment 2 Petr Blaha 2008-04-24 20:08:26 UTC
As you mentioned sometimes this works hence the bug isn't release stopper.
Comment 3 haroldcarr 2008-04-24 20:14:33 UTC
This has only worked for me 2 out of 5 tries.
The only way I have figured out how to workaround it is to completely DELETE the project and start over.
That is a MAJOR issue for web services support.
I think this is a showstopper.
Comment 4 Martin Matula 2008-04-24 21:06:28 UTC
Reassigning to the component owner.
Comment 5 Martin Matula 2008-04-24 22:29:36 UTC
I can reproduce this issue when I create the project, delete it and then create a new project of the same name in one
NetBeans session.
When I restart NetBeans the issue goes away. Also the issue does not appear with new projects of unique name.
Comment 6 Lukas Jungmann 2008-04-24 22:36:29 UTC
if this is the only reproducible case then this should P3 (I would wonder if you would not get any exception sooner or
later when re-creating a project with the same name at the same location - is this the case? - in the same IDE session
see ie. issue 130683)
Comment 7 Martin Matula 2008-04-24 22:47:55 UTC
Above is the only case I could reproduce it with.
Sometimes (not always) there are the following exceptions:

- when deleting the project:
org.openide.filesystems.FileStateInvalidException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:478)
Caused: org.openide.loaders.DataObjectNotFoundException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:498)
	at org.netbeans.modules.gsf.api.CompilationInfo.getDocument(CompilationInfo.java:103)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.gsfFoldScan(GsfFoldManager.java:308)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:287)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:246)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1242)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[catch] at java.lang.Thread.run(Thread.java:613)


- when creating a new project of the same name:

org.openide.filesystems.FileStateInvalidException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:478)
Caused: org.openide.loaders.DataObjectNotFoundException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:498)
	at org.netbeans.modules.gsf.api.CompilationInfo.getDocument(CompilationInfo.java:103)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.gsfFoldScan(GsfFoldManager.java:308)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:287)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:246)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1242)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[catch] at java.lang.Thread.run(Thread.java:613)

-- followed by --

org.openide.filesystems.FileStateInvalidException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:478)
Caused: org.openide.loaders.DataObjectNotFoundException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:498)
	at org.netbeans.modules.gsf.api.CompilationInfo.getDocument(CompilationInfo.java:103)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.gsfFoldScan(GsfFoldManager.java:308)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:287)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:246)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1242)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[catch] at java.lang.Thread.run(Thread.java:613)

-- followed by --

java.lang.IllegalArgumentException: /Users/martin/NetBeansProjects/X/web / /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.netbeans.modules.web.jspparser.ContextUtil.findRelativePath(ContextUtil.java:103)
	at org.netbeans.modules.web.jspparser.ContextUtil.findRelativeContextPath(ContextUtil.java:121)
	at org.netbeans.modules.web.jspparser_ext.WebAppParseSupport.getJSPUri(WebAppParseSupport.java:401)
	at org.netbeans.modules.web.jspparser_ext.WebAppParseSupport.createCompilationContext(WebAppParseSupport.java:373)
	at org.netbeans.modules.web.jspparser_ext.WebAppParseSupport.analyzePage(WebAppParseSupport.java:408)
	at org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.java:158)
	at org.netbeans.modules.web.core.jsploader.TagLibParseSupport$ParsingRunnable.run(TagLibParseSupport.java:363)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

-- followed by --

org.openide.filesystems.FileStateInvalidException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:478)
Caused: org.openide.loaders.DataObjectNotFoundException: /Users/martin/NetBeansProjects/X/web/index.jsp
	at org.openide.loaders.DataObject.find(DataObject.java:498)
	at org.netbeans.modules.gsf.api.CompilationInfo.getDocument(CompilationInfo.java:103)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.gsfFoldScan(GsfFoldManager.java:308)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:287)
	at org.netbeans.modules.gsfret.editor.fold.GsfFoldManager$JavaElementFoldTask.run(GsfFoldManager.java:246)
	at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1242)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
[catch] at java.lang.Thread.run(Thread.java:613)
Comment 8 Lukas Jungmann 2008-04-24 23:09:25 UTC
yes, this is exactly what I've been talking about and what looks to me like a possible cause of this issue - the newly
recreated web/ejb project seem to be in an somehow inconsistent state but not being a developer I'm only guessing here...

David, do you have any idea?
Comment 9 David Konecny 2008-04-27 23:16:33 UTC
haroldcarr, you mentioned that this problem happens to you "2 out of 5 tries". In your scenario are you deleting project
and recreating it under the same name? Or do you just create five new projects and out of these two are broken?

Deleting and recreating project with the same name may or may not work. There used to be issues with closed/deleted
project not being properly garbage collected. I'm not sure whether these issues were completely resolved - tmysik may
know more. It is something what should be resolved but it is P3/P4.
Comment 10 Tomas Mysik 2008-04-28 04:58:05 UTC
> Deleting and recreating project with the same name may or may not work. There used to be issues with closed/deleted
> project not being properly garbage collected. I'm not sure whether these issues were completely resolved - tmysik
> may know more.

Yes, recreating project with the same name is problematic - see issue #130683 for more information.
Comment 11 Milan Kuchtiak 2008-04-28 09:31:27 UTC
Thanks guys for the hints to reproduce the issue.
Yes, the Web Service data object is caching its state somehow in memory.
Comment 12 Milan Kuchtiak 2008-06-17 14:06:25 UTC
The issue is reproducible.
- create web service in some project
- delete the project
- create new project with the same name
- create WS with the same name
- problems start now: Add WS Operation doesn't work, Design View doesn't work
Comment 13 Milan Kuchtiak 2008-06-17 14:07:56 UTC
Sorry Ajit, I just wanted to put you to CC list
Comment 14 Milan Kuchtiak 2008-06-25 10:18:20 UTC
This issue depends on issue 138135.
I described in detail what's happening there. 
Basically FileOwnerQuery.getProject(fileObject) returns different project instances what causes problems described here.    
Comment 15 Milan Kuchtiak 2008-06-26 08:58:28 UTC
Lowering priority to P3.
See the issue 138135.
I think it's  still better to track this issue separately rather than set is a duplicate to 138135. 
Comment 16 Milan Kuchtiak 2008-11-19 14:49:36 UTC
The issue cannot be reproduced any more since the issue 138135 was fixed.