I am trying to deploy a maven EAR application to a Glassfish 3 server through Netbeans using right click -> debug and it fails with: GlassFish Server, deploy, Error writing request body to server, false
The output is:
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 0.977 s
Finished at: 2017-10-02T21:00:19+03:00
Final Memory: 9M/393M
------------------------------------------------------------------------
Deploying on GlassFish Server
profile mode: false
debug mode: false
force redeploy: true
Distributing /path/to/ear.ear
GlassFish Server, deploy, Error writing request body to server, false
The Glassfish log contains no logging information.
The Netbeans IDE log contains the following:
INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd
INFO [null]: Last record repeated again.
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
INFO [org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy]: IO exception caught in handleSend() method:
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3518)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3501)
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:255)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:360)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:377)
[catch] at org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy.handleSend(RunnerHttpDeploy.java:267)
at org.netbeans.modules.glassfish.tooling.admin.Runner.handleHTTPConnection(Runner.java:828)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:939)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:73)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:259)
at org.netbeans.modules.maven.j2ee.execution.DeploymentHelper.perform(DeploymentHelper.java:208)
at org.netbeans.modules.maven.j2ee.execution.CoSAlternativeExecutorImpl.execute(CoSAlternativeExecutorImpl.java:90)
at org.netbeans.modules.maven.cos.CoSAlternativeExecutor.execute(CoSAlternativeExecutor.java:87)
at org.netbeans.modules.maven.cos.CosChecker.checkRunMainClass(CosChecker.java:209)
at org.netbeans.modules.maven.cos.CosChecker.checkRunConfig(CosChecker.java:163)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:225)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd
INFO [null]: Last record repeated again.
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
INFO [org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy]: IO exception caught in handleSend() method:
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3518)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3501)
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:255)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:360)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:377)
[catch] at org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy.handleSend(RunnerHttpDeploy.java:267)
at org.netbeans.modules.glassfish.tooling.admin.Runner.handleHTTPConnection(Runner.java:828)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:939)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:73)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:259)
at org.netbeans.modules.maven.j2ee.execution.DeploymentHelper.perform(DeploymentHelper.java:208)
at org.netbeans.modules.maven.j2ee.execution.ExecutionChecker.executionResult(ExecutionChecker.java:93)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:315)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Netbeans version: 8.2
Glassfish version: 3.1.2.2 (build 5)
Platform: reproducible on both Windows10 + Debian9
Maven version: 3.3.9
JDK: 1.7.0_80
Glassfish secure admin is enabled
The EAR produced can be normally deployed to Glassfish using the asadmin command. It is only when trying to deploy it through Netbeans that it fails so.
EDIT
It seems that when secure admin is disabled i am able to perform the deployment through Netbeans. I have come across some problems with the secure admin and ssl.
This is the best answer i could find that described the issue i am experiencing: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206913035-Glassfish-3-1-remote-deploy-not-working (even though it is for another IDE).
This is not an accepted solution though because the secure admin is a requirement for everyday dev work.
EDIT 2
After experimenting a bit more i have observed the following:
Since the Glassfish logs are empty, and the netbeans IDE log contains an error having to do with HttpUrlConnection i think that after netbeans finishes the build process it fails to write the EAR to the socket.
I have experimented with other EAR projects (generated a new maven EAR from netbeans) and it deploys OK to Glassfish.
I have come across an article that mentions a bug in Netbeans failing to write archives of a certain size. I have tried to generate a new maven project with a large final EAR size but it deploys OK. The bug is quite old and has since been fixed: https://netbeans.org/bugzilla/show_bug.cgi?id=206946
EDIT 3
After experimenting with the POM file and removing all dependencies and trying adding one by one back in it seems that this issue is triggered by the inclusion of an EJB dependency.
Including a depencency of type ejb and declaring it as an ejbModule in the maven ear plugin modules section seems to be triggering the issue.
<dependency>
<groupId>com.foo</groupId>
<artifactId>BAR</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
.
.
.
.
<ejbModule>
<groupId>com.foo</groupId>
<artifactId>BAR</artifactId>
<altDeploymentDescriptor>AltDD.xml</altDeploymentDescriptor>
</ejbModule>
I still don't know why this issue is triggered. I have read online that there might be an issue with file size but i have been unable to reproduce it.
This might be happening on Netbeans when stopped on a breakpoint, and then some deployments might tend to fail immediately.
The BUG-253630 mentions a reproducible scenario for such as use case:-
1. Run app with DoS off (DoS state MODULE_NOT_DEPLOYED)
2. Debug it
3. App stopped at breakpoint
4. Change source (DoS state SERVER_STATE_UNSUPPORTED)
5. Continue with the app (release breakpoint, detach JPDA)
6. Change source (DoS state MODULE_UPDATED)
Also, make sure that for remote administration you will have to set an admin password before performing the actual enabling:
asadmin change-admin-password --domain_name [DOMAIN_NAME]
asadmin enable-secure-admin --port [PORT_NAME]
..and apart from just that, you can even try setting the password as empty if that might help as well.
Related
I've been getting the following error page, when visiting my app:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
However, heroku logs --tail does not return anything. If I go to the dashboard through web (https://dashboard.heroku.com/apps/app-name/logs), the logs window keeps loading but nothing is shown.
I have nothing to go on, and Heroku won't accept a ticket of a free app. Does anyone know any more steps I can take to trace the error?
Additional info:
The build logs all look fine:
BUILD SUCCESSFUL in 49s
5 actionable tasks: 5 executed
Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
Compressing...
Done: 85.2M
Launching...
Released v3
https://app-name.herokuapp.com/ deployed to Heroku
I am creating a spring Java API, it works fine when I try to run it locally. If I try to run it through $heroku local I do get an error:
[FAIL] No Procfile and no package.json file found in Current Directory - See run --help
I had same issue. I just added system.properties to root folder of spring app and this file contained 1 line:
java.runtime.version=11
Heroku procfile documentation.
Spring documentation for Heroku deployment
Can anybody help me with this please?
Whenever I run my application, I get the following error :
Starting GlassFish Server
GlassFish Server is running.
In-place deployment at /root/Desktop/SEG3502/Lab3/build/web
GlassFish Server, deploy, null, false
/root/Desktop/SEG3502/Lab3/nbproject/build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 58 seconds)
First undeploy any previous version of your app, stop glassfish server, clean and build the current version and start/deploy again.
I create a simple java web service project in intellij idea and configured the glassfish 4.1 server. and just run the application. output window shows the following messages
C:\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
[2015-06-10 01:35:00,667] Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
server is running fine. but webservice is not deployed. can anyone help me.
I use java 8. intellij 14, glassfish 4.1 and windows 8.1
I followed following posts, but none of these are helps me.
post one , post two , post 03, post 04
I spend last two day to find an answer, please help me.
Check your Facets and your Artifacts are all right. Facets must have web deployment description and Web Resource description, the absolute path is all right.
Check the Artifact output directory, make directories:
WEB-INF/class/{your compile output},
the resource directory for example web app directory content.
I think the IntelliJ use ant as it's deployment tools, then you can image how it work, just denote the path the project need
Please help me to find out the reason of the following behaviour.
I have two applications running in Tomcat container: my application and Hudson (v2.2.0). Tomcat is started with -Dhttp.proxyHost=proxy -Dhttp.proxyPost=8080 options so that my application uses proxy to access external WebServices.
I have detected the following very strange behaviour of Hudson running a maven build: At some point of time (just before maven is launched), the http.proxyHost system property is set to null. Perhaps I am following the wrong trace, by my application (which is deployed to the same Tomcat) crashes as it cannot open the connection and I think this two are relative.
I have installed the custom ProxySelector to report when the proxy is reset. It looks like http.proxyHost is reset just before maven starts the dependency resolving:
15.12 10:13:35 DEBUG [org.CustomProxySelector] Using proxy DIRECT for URL http://repo.internal/nexus/content/groups/development/org/parent/1.0.0-SNAPSHOT/maven-metadata.xml.sha1. Proxy settings: http.proxyHost=null, ftp.proxyHost=proxy
java.lang.Exception
at org.CustomProxySelector.select(CustomProxySelector.java:42)
at org.CustomProxySelector.select(CustomProxySelector.java:38)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:906)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.verifyChecksum(WagonRepositoryConnector.java:708)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:625)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
15.12 10:13:35 INFO [hudson.maven.MavenModuleSetBuild] using maven 3 3.0.3
15.12 10:16:10 INFO [hudson.model.Run] common-ops #87 main build action completed: SUCCESS
I might be wrong in what is actually happening: Maven should run in separate JVM, but how CustomProxySelector which I install to JVM static variable in my project, is visible from Maven JVM? If "parent" JVM and "forked" JVM share the same root classloader then perhaps they share the system properties as well. That means, if Maven build (even temporary) sets http.proxyHost to null and my process opens URL as this time, it will fail.
My question is: If above behaviour is a bug in Hudson / Maven? What can be a workaround (except trivial running 2 Tomcat servers).
I have a web application running on tomcat. I want to deploy it on a weblogic server but i get some problems.
Error(s) found in module 'BatchMonitoring'. Publish was cancelled. See "Problems" view for details.
Target runtime SpringSource dm Server (Runtime) v1.0 is not defined. at BatchMonitoring
Java compiler level does not match the version of the installed Java project facet. at BatchMonitoring
java.lang.IllegalArgumentException: Cannot find state with id 'displayError' in flow 'admin_main' -- Known state ids are 'array<String>['queryAll', 'mainForm', 'register']'
at org.springframework.webflow.engine.Flow.getStateInstance(Flow.java:348)
at org.springframework.webflow.engine.support.DefaultTargetStateResolver.resolveTargetState(DefaultTargetStateResolver.java:60)
at org.springframework.webflow.engine.Transition.execute(Transition.java:217)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:391)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler.handle(TransitionExecutingFlowExecutionExceptionHandler.java:110)
at org.springframework.webflow.engine.FlowExecutionExceptionHandlerSet.handleException
Seems like you had problems with Java versions of what Tomcat is using(points to JAVA_HOME) at environmental variable and JDK of Weblogic. Also it would be good if you send some logs and exception messages.