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 186399 - Previously created web service clients won't build without manual tweaking
Summary: Previously created web service clients won't build without manual tweaking
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2010-05-19 17:36 UTC by chaase3
Modified: 2011-11-16 00:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Run Project Error (112.35 KB, image/png)
2010-05-21 12:33 UTC, Milan Kuchtiak
Details
build-impl.xml error (99.34 KB, image/png)
2010-05-21 12:34 UTC, Milan Kuchtiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chaase3 2010-05-19 17:36:11 UTC
Using 6.9 nightly netbeans-dev-201005132200
Using glassfish-3.0.1-b18-unix.sh

Following the instructions in http://netbeans.org/kb/docs/websvc/jax-ws.html, "Getting Started with JAX-WS Web Services"

Create and deploy web service, run Tester
Create and run web or java client against web service
Create and run servlet, following instructions

I then undeploy, clean, and close the projects, stop NetBeans, and go do some other things. I keep the glassfish server running.

Then I restart NetBeans, open the web service project, and deploy it. This goes fine.

Then I open a client client project. It opens with red marks indicating problems. It can't find the web service. The web service references are there, but not the generated files. This is expected.

But then I try to build, and it fails with an error in the build-impl.xml file. Then I go to the Web Service References node and actually open each node. After I do that, the red marks go away, and the application builds and runs. 

This seems like a pretty strange thing to have to tell people to do (in the Java EE 6 Tutorial, for which I'm re-creating some examples).
Comment 1 Milan Kuchtiak 2010-05-20 09:21:19 UTC
The main problem I see here is the error caused while execution build-impl.xml.
Nevertheless, I cannot reproduce that and I don't know what kind of error it was at your machine. Can you please attach the error message.

Otherwise, except of some error badges in editor that don't disappear quickly enough it's fine.
Comment 2 chaase3 2010-05-20 21:10:14 UTC
Yesterday I had problems with both clients. Today, the first time I tried, the appclient was fine but the web client gave me a Run Project error dialog. Here's what happened the first time:

Open helloservice
Deploy -- successful

Open appclient
No red marks
Deploys & runs fine

Open webclient
red marks
Pass over source file: "Error parsing file."
Deploy: Run Project dialog: "One or more projects were compiled with errors.
Application you are running may end unexpectedly."
I click Run Anyway.
Dialog appears twice more; I click Run Anyway both times.
Application deploys fine and the red marks go away.
Application runs fine.

But the second and third times I tried, both clients deployed and ran with no problems, so I can't reproduce this. The inconsistent behavior is a little unnerving. I couldn't see anything in the NetBeans log output to indicate what was wrong.
Comment 3 Milan Kuchtiak 2010-05-21 12:32:33 UTC
Yes, I was able to reproduce.
I suspect Deploy On Save feature causing this behaviour.

Note: 
there is a java source in build/generated-sources, used by other class in "normal" source root, e.g. by a servlet. 
This could be achieved by creating WS client from a wsdl file, and calling this client from a servlet.

I can confirm that the issue occurs very randomly - usually when the Project with WS Client is cleaned and IDE is restarted.

May be this is related also to issue 151845.

See also the attachments.
Comment 4 Milan Kuchtiak 2010-05-21 12:33:59 UTC
Created attachment 99313 [details]
Run Project Error
Comment 5 Milan Kuchtiak 2010-05-21 12:34:38 UTC
Created attachment 99314 [details]
build-impl.xml error
Comment 6 Milan Kuchtiak 2010-05-21 12:40:44 UTC
Reporter, please, can you confirm if unchecking the "Deploy On Save" (Project properties -> Run section) eliminates the run error. Thanks.
Comment 7 chaase3 2010-05-21 14:53:41 UTC
Since I can't seem to reproduce the run error any more, I can't confirm that any particular action makes a difference -- I'm sorry. 

This morning I noticed that when I opened the projects and passed the mouse over the appclient project node, the tooltip said "Deploy on save is disabled." And no errors appeared in the source files.

However, when I opened the webclient, it didn't say that -- Deploy on Save was enabled. But there was no error, either.

I'm going to download and install this week's build, so maybe a fresh NetBeans will show the error again ...
Comment 8 chaase3 2010-05-21 18:44:45 UTC
I downloaded and installed the latest builds of GlassFish and NetBeans, after uninstalling the previous versions and deleting the NetBeans-specific directories (.nbi, .netbeans, .netbeans-derby, .netbeans-registration), so there is no record of previous settings except within the project files (I forgot to delete the nbproject/private directories).

I'm running glassfish-3.0.1-b19-unix.sh and netbeans-dev-201005192201.

In NetBeans I started GlassFish, then opened and deployed the web service project with no problems. I then opened the appclient project. The project had red marks, although Deploy on Save was disabled. The project built, deployed, and ran correctly, although the red marks remained.

I then opened the webclient project. It too had red marks. Deploy on Save was NOT disabled, and when I tried to build and deploy I got the Run Project dialog that said one or more projects were compiled with errors, three times. The deployment appeared to succeed, but the servlet was not accessible -- I got an error 404.

I unchecked the Deploy on Save checkbox in the Run properties and undeployed the webclient. Then I did a Clean and Build, followed by Deploy. This time the servlet access succeeded.

The red marks were still there for both clients, though. And this time, opening the Web Service References nodes didn't help.

I then undeployed, cleaned, and closed the projects, and stopped NetBeans (thereby stopping GlassFish). I should probably mention that previously, at the time when I reported the bug, I normally started GlassFish from the command line and then attached to it from NetBeans. That didn't seem to work with this build of NetBeans: when I started the server, used Add Server to add it from NetBeans, and then tried to deploy the web service, I got an error saying that the server was not a GlassFish v3 Server -- so I started it from NetBeans and that worked fine. Maybe the nbproject/private settings were the problem?

This time I deleted the nbproject/private directory from each project, started GlassFish, then started NB. When I opened the web service and tried to deploy it, this time I got the build-impl.xml error from the same line as you, though maybe not for the same reason exactly:

In-place deployment at /export/home/chaase/tut-ws/javaeetutorial/examples/jaxws/helloservice/build/web
deploy?path=/export/home/chaase/tut-ws/javaeetutorial/examples/jaxws/helloservice/build/web&name=helloservice&force=true failed. Instance is not GlassFish Server 3.
/export/home/chaase/tut-ws/javaeetutorial/examples/jaxws/helloservice/nbproject/build-impl.xml:684: The module has not been deployed.
BUILD FAILED (total time: 3 seconds)

So I stopped NB, deleted the nbproject/private directory from the web service project, restarted NB, and started the server from within NB.

The web service deployed fine. The appclient opened, deployed, and ran fine (still with red marks). Likewise the webclient.

Deploy on Save was disabled for both clients (as previously set, though I had deleted nbproject/private -- maybe it is set elsewhere).

This time when I exited NB (and GF) after undeploying, cleaning, and closing the projects, I did not remove the nbproject/private directories. 

When I restarted NB, I opened helloservice before I remembered to restart GF. I was surprised to see no red marks. The deployment succeeded.

The appclient and webclient both opened, deployed, and ran fine (again with red marks continuing).

Next time, after I undeployed, cleaned, and closed the projects, I didn't stop NB and GF, but reopened the projects immediately. The behavior was the same.

The next time, I did everything the same as before, but after I reopened the appclient project I also opened the HelloAppClient.java source file in NB. This time, when I deployed the project, the red marks went away. With the web client, I didn't open the servlet source file, and the red marks stayed after I deployed and ran. However, after that I did open the servlet source file, and the red marks went away.

And the NEXT time, after I undeployed, cleaned, and closed the projects, then reopened and redeployed the web service -- when I opened the clients, no red marks.

Again, I'm a little concerned about what we have to tell first-time users of the examples -- make sure they actually open and examine the source files in NB before they build?
Comment 9 David Konecny 2010-05-23 19:10:40 UTC
Does not look like DoS related - passing to PetrH anyway.
Comment 10 Petr Hejl 2010-05-25 08:51:17 UTC
So far I don't see anything that would point to the problem with deployment infrastructure. It even looks like there are multiple bugs - does anybody investigated the red marks in the editor? Or the problem with Glassfish?

Passing to Vince.
Comment 11 Vince Kraemer 2011-02-24 19:37:10 UTC
I am going to try to track down the 'instance is not' problem... which is a minor slice of the issue being reported.
Comment 12 Vince Kraemer 2011-11-16 00:15:13 UTC
using 
Product Version: NetBeans IDE Dev (Build 20111115-a2fef2105832)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383
System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb)
User directory: /Users/vkraemer/nb71ud/nov15a
Cache directory: /Users/vkraemer/nb71ud/nov15a/var/cache

with GF 3.1.1

I could not reproduce the error described in the first comment or the 'Instance is not...' message described in comment 8 (http://netbeans.org/bugzilla/show_bug.cgi?id=186399#c8)

Closing as worksforme.

Please reopen more info if this is still a problem in recent dev builds.