Bug 214198 - Unable to run EAR on Glassfish
Unable to run EAR on Glassfish
Product: serverplugins
Classification: Unclassified
Component: GlassFish
PC Windows 7
: P3 with 1 vote (vote)
Assigned To: Vince Kraemer
Depends on:
  Show dependency treegraph
Reported: 2012-06-14 11:49 UTC by mienamoo
Modified: 2012-09-04 04:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

netbeans messages.log file showing setup and zip exceptions (354.73 KB, text/x-log)
2012-08-24 02:21 UTC, theshowmecanuck
Screenshot NB72 FAIL Deploy (229.00 KB, image/png)
2012-08-24 02:55 UTC, theshowmecanuck
Netbeans 7.1 successfully deploys same code to the same server. (182.94 KB, image/png)
2012-08-24 03:05 UTC, theshowmecanuck

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-06-14 11:49:59 UTC
NetBeans build 201206140001
JDK 7u3 32-bit

I have an EAR project that I can run on Glassfish 3.1.1 without any trouble using build 201206100001. But using the same project and same IDE user directory with build 201206140001, I get the error below.

The server log contains nothing of interest. In fact, when invoking run on the EAR with Glassfish already running, nothing is added to the server log.

Error writing request body to server
The module has not been deployed.
See the server log for details.
	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
	at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Comment 1 mienamoo 2012-06-14 11:50:51 UTC
The IDE's messages.log contains the following additional info about the error writing request:

INFO [glassfish]: Error writing request body to server
java.io.IOException: Error writing request body to server
	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3098)
	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3081)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
	at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
	at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:238)
	at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:343)
	at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
	at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:360)
[catch] at org.netbeans.modules.glassfish.common.CommandRunner.handleSend(CommandRunner.java:808)
	at org.netbeans.modules.glassfish.common.CommandRunner.call(CommandRunner.java:648)
	at org.netbeans.modules.glassfish.common.CommandRunner.call(CommandRunner.java:106)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Comment 2 mienamoo 2012-06-18 07:33:31 UTC
I am still experiencing this with NetBeans IDE 7.2 RC1 (Build 201206141830). Specifically for Maven-based projects though. Ant-based ones run without problems.
Comment 3 Jiri Skrivanek 2012-07-12 12:07:41 UTC
Please, provide more details - steps to reproduce, sample project, server version, JDK version, operating system. I tried the following and it works for me:

- open new project wizard
- choose "Maven|Enterprise Application" and finish the wizard
- add session bean with business method to -ejb sub project
- build main project
- run -ear project. It opens browser at wrong address (bug 215454) but deployment is successful.

Product Version: NetBeans IDE 7.2 (Build 201207101812)
Java: 1.7.0_06-ea; Java HotSpot(TM) 64-Bit Server VM 23.2-b08
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
GlassFish Server Open Source Edition (build 4)
Comment 4 mienamoo 2012-07-13 06:16:52 UTC
I think I finally figured out why I am seeing this and nobody else. :) I followed the steps exactly as in comment 3, and it failed. But first, here is my configuration:

Product Version: NetBeans IDE 7.2 (Build 201206291011)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Windows 7 version 6.1 running on x86; Cp1252; en_ZA (nb)
GlassFish: 3.1.1

I set a password for the admin user of my local GlassFish domain a while ago, because I was testing remotely deploying from our build server and that requires a non-empty password. And initially I could still run the app as before (with NetBeans build 201206100001 and earlier). But from build 201206150001 onwards that never worked again. Until I just set my admin user's password back to an empty string!

So, to reproduce this issue, first set a password for the admin user in GlassFish, (re)start the IDE to make sure that the new credentials will be used, and then try again to deploy. :)
Comment 5 Jiri Skrivanek 2012-07-13 07:42:26 UTC
I tried it but I still can't reproduce. I did:

- changed admin password
- stopped GlassFish domain
- restarted IDE
- deployed EAR - IDE asked for username and password and then it was successfully deployed. I tried also GlassFish 3.1.1 (12) and it is the same.
Comment 6 mienamoo 2012-07-13 07:50:25 UTC
Interesting. Try running the IDE on a 32-bit JVM with the 32-bit launcher?

Something else that might be related, is if I start GlassFish from the IDE, restart the IDE and then start GlassFish again, I get this exception in the Java DB Database Process output window:

    Could not listen on port 1527 on host localhost:
    java.net.BindException: Address already in use: JVM_Bind

And that makes me think that it might have something to do with running a 32-bit IDE on an otherwise 64-bit system.
Comment 7 Jiri Skrivanek 2012-07-13 10:02:45 UTC
Still the same with 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02. BindException from Java DB doesn't seem to be related.
Comment 8 mienamoo 2012-07-13 10:05:00 UTC
Well then I give up... :)
Comment 9 theshowmecanuck 2012-08-24 02:21:54 UTC
Created attachment 123494 [details]
netbeans messages.log file showing setup and zip exceptions

Log file showing zip error when trying to deploy maven project to a glassfish 3.1.1 server. Will also attach screen shot of the error in NB 7.2. Will also show the same operation succeeding in NB 7.1.
Comment 10 theshowmecanuck 2012-08-24 02:55:12 UTC
Created attachment 123497 [details]
Screenshot NB72 FAIL Deploy

Screen shot showing what happens when trying to deploy EAR.
Comment 11 theshowmecanuck 2012-08-24 03:05:36 UTC
Created attachment 123498 [details]
Netbeans 7.1 successfully deploys same code to the same server.

Just to show it isn't the code causing an issue, I took a screen shot of NB 7.1 being able to successfully deploy the same code to the same server. So this is a Netbeans 7.2 issue.

The last two NB releases 7.1.2 and 7.2 seem to be falling down severely with Maven. Or maybe Maven with artifactory. But it works for me with 7.1 although NB is kludgey due to previously mentioned issues (known confirmed bug).
Comment 12 theshowmecanuck 2012-08-24 03:18:07 UTC
Looking at earlier comments I tried to redeploy after setting an empty password for the Glassfish appserver and it didn't help.
Comment 13 mienamoo 2012-08-24 05:18:39 UTC
The blank password appeared to work for a while and then stopped working again. Hopefully with a second person experiencing this we can gather enough information to really find the cause.

Please provide more information such as operating system and JDK version?
Comment 14 mienamoo 2012-08-24 11:25:18 UTC
With NetBeans development build 201208200933, I get this additional information from the server log. Whether it is the cause or another problem entirely I don't know.

SEVERE: Exception while deploying the app [file:_C:_Projects_CoreFreight_Backend_core-backend_core-backend-ear_] : Expected to find an expanded directory for submodule core-backend-web-3.0-SNAPSHOT.war but found a JAR.  If this is a directory deployment be sure to expand all submodules.

I don't see "Error writing request body to server" any more though.
Comment 15 mienamoo 2012-09-03 06:57:29 UTC
@theshowmecanuck: Can you try development build 201209020001? I just installed it, and I was able to run my application without problems.
Comment 16 theshowmecanuck 2012-09-03 09:59:19 UTC
I'm downloading it. I'll install later today. Under some serious time constraints right now, so can't try for too long, have to use what works. :) But I'll see if I can spare a couple minutes. After the last two failed upgrades (for me) I am leery of spending any time on it right now. Besides I did have a chance to look at how they moved the maven stuff around in this latest version and I don't like it at all. But like I said, I'll give it a go. Just not a long one. :)
Comment 17 theshowmecanuck 2012-09-04 00:42:46 UTC
Ok, installed 201209020001 on Kubuntu Linux 12.04. It runs the project. Nice improvement, good work whoever is responsible.

Unfortunately it has another bug that makes it unusable by me for now. I filed the bug from the IDE and added some additional information via the web.

This new bug is filed as Bug 217762 


Comment 18 mienamoo 2012-09-04 04:57:32 UTC
Verified with build 201209020001.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo