How to rectify module deployment error while using GlassFish Server? - java

How to rectify module deployment error while using GlassFish Server?
While trying to run jsf web-application in Netbeans8 I am getting the following error:
ant -f C:\\Users\\admin\\Desktop\\WebTime -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=C:\\Users\\admin\\Desktop\\WebTime run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting GlassFish Server
GlassFish Server is running.
In-place deployment at C:\Users\admin\Desktop\WebTime\build\web
GlassFish Server, deploy, Connection refused: connect, false
C:\Users\admin\Desktop\WebTime\nbproject\build-impl.xml:1045: The module has not been deployed. See the server log for details.
Being new to programming, I need hint to rectify this error. Kindly help me to rectify it.

The line:
GlassFish Server, deploy, Connection refused: connect, false
... is a clue.
I had the same error, but I solved it. The steps:
1) Grant privileges to write on the glassfish server installation folder. If you use Windows the path is:
C:\Program Files\glassfish-xx
2) Run C:\Program Files\glassfish-xx\bin\asadmin.bat as Administrator. Then in the console type: start-domain
3) Clean and Build the project
4) Deploy
5) Run
PD: I recommend use JDK7

after a whole day solving this problem on my own, because nobody's answer was usefull for me on internet, I found following:
don't try to use different web server (I tried wildfly), it wont
help.
give glassfish folder permission to write (I mean the folder with
version in name)
restart pc to shut down all (or the) running server
after my restart, I got still the same error during developing build-impl.xml:1045: The module has not been deployed., but now there was different error in server log - java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}].
Then I realised that my problem was in web.xml file, where I tried to set different welcome page. All other projects with this file untouched were working (developing, running) properly
so this was my story of waisting whole day - check your web.xml file

Being new to programming, I need hint to rectify this error. Kindly
help me to rectify it.
If you look carefully, the hint is given in the output itself.
See the server log for details.
In NetBeans IDE output's sub-window, you should see another tab called "GlassFish Server", you can look there for logs from the server.
Alternatively , you can use GlassFish's Administration GUI to see some more detailed logs, it is accessible in a browser and by default from localhost:4848.
While trying to run jsf web-application in Netbeans8 I am getting the
following error:
Looking at what you have posted (project's deployment log), I can say your GlassFish instance is running fine , but your project contains errors, so it couldn't be deployed.
I doubt anyone here can concretely solve your problem because we need more details from GlassFish's logs.
Suggestion : Edit your question by appending GlassFish's logs.

Related

Tomcat in Eclipse is giving error 404:requested resource not found

I am making a project in Java which is a online web application. I am facing issues with Tomcat 8 and jsp, if I try to run my jsp files on server it gives an error that 404:requested resource now found.
I tried every way given on you channel but nothing helped. Now I'm at an stage I have configured the server 100 times and nothing helps. I created a new project on other workspace and copied everything there and then run those jsp files it executed well for once and then after that when I stopped the server it again started giving the same error.
Whenever I restart the server the server does not start and gives error Tomcat failed to start and then when I remove my project below the server name it starts. If I configure new server same happens.
I can't figure out where the problem lies as earlier I was able to run my project using same Eclipse Luna IDE.
Based on your question, it seems you need to configure eclipse to take control from Tomcat.
Maybe this can help as well: HTTP Status 404 - The requested resource (/) is not available

FAIL - Deployed application at context path /RxCircle but context failed to start

FAIL - Deployed application at context path /RxCircle but context failed to start
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:202)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
i am using tomcat 6
netbeans 7.0
java 6
i am getting this error when i am running my application in netbeans..
I suspect that either (1) Your web.xml is missing, (2) your applicationContext is malformed or (3) your versions are not playing nicely together.
Since you are using Netbeans you can view the Server Log by doing this:
Open the Services window (if it is not open go to: Window > Services)
Right-click on the Tomcat Server and select View Server Log.
Now you can see the actual exception that is causing Tomcat not to deploy your war.
This is a very generic error message and can be due to any reason like wrong servlet filter defined or malformed application context file.
To understand fully you need to get more logging details from tomcat.
So set the logging level to debug in tomcat and then start the tomcat.
Below url you may refer for further details
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
How to set level logging to DEBUG in Tomcat?
Hopefully you will get more details about the deployment error root cause.
Try stopping the Tomcat server so as to allow Netbeans to run it. If the server is already running when Netbeans tries to deploy an app Netbeans will display the delopy failed message.
I had the same issue. I was using Java 8, Tomcat 8, NetBeans 8.1.
What I did was, I manually replaced:
1. nbproject/build-impl.xml
2. web/WEB-INF/web.xml
with a previous version of the files. Please make sure to have backups.
I have faced same issue
I searched lot of solutions but not worked
If you are facing the same problem then the solution is
First you have backup your web.xml code file from your
project NetBeanss
Now delete web.xml from project
Now right click on web-inf file chose web after that chose deployment descriptor
After that
Now you can run your prj check your solution is solve as context will run on localhost server
Afte thaer will some error because we can't save our servlet file link so do it
Run it
Now you will see your problem solve
It's worked for.me

How to resolve exception "weblogic.application.ModuleException: Context path '' is already in use by the module: / application"?

I have gone through the Question:
[weblogic.application.ModuleException: Context path '' is already in use by the module: / application:
and followed as answer of the question says; but still getting the same exception:
**> Deployment failed. The message was:
weblogic.application.ModuleException: Context path
'/socketss-war' is already in use by the module:
/Socketss-war application: Socketss
D:\NetBeansProjects\Socketss\Socketss-war\nbproject\build-impl.xml:1056:
The module has not been deployed. See the server log for details.**
Any guidance or suggestion would be highly appreciable.
Thank you!
ModualException come due to inproper Bulid.
Go through step by step.
Update project
Restart your eclipse
Remove project from server
clean server and redeploy your project
Now publish it i hope now it will work
Yup. Try to deploy from Netbeans.
The Weblogic eclipse plugin is, in my experience, the worst deployment plugin I've ever seen. If you are using a patched weblogic - such as 12.1.2 with Patch Set Update 6 - your deployment from eclipse might miraculously not work with such an error.
If you are able to deploy the WAR file without IDE by going to the deploy view, I recommend that you try using Netbeans to deploy and see how it goes.
Notice as well that the outcome of trying to deploy from eclipse as exploded war or as virtual application is not the same. Typically both do not work with different exceptions, depending on the patches you are using.
In my case, I have two local installations of weblogic 12.1.2. One with the patch set update and another one without. From eclipse, It is only possible to deploy to the one without. From Netbeans, deployment works regardless of the instance.

Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

Setup
I'm using Netbeans 7.4 on Mac OSX Mavericks and Glassfish 4.0 (build 89) on my dedicated server and JDK 1.7. To use the server locally I setup and ssh-tunnel. The following way:
ssh -L 4848:127.0.0.1:4848 -p 6122 glassfish#XXXXXXXXXX
This is working perfectly fine, I can access the server via localhost without any problems. To use this server I added a server in Netbeans, see prinscreen:
Problem
Now I'd like to deploy the project to the server (Right-Click Project -> Deploy) but I get following Error:
Building jar: /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war
Distributing /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war to [glassfish.ivo]
glassfish.ivo, deploy, null, false
/Users/tzhware7/NetBeansProjects/SkyLogicAddon/nbproject/build-impl.xml:1050: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 second)
Now I'd checked the line where the Error-Show's up, which is following (1049-1051). For me everything looks normal:
<target if="netbeans.home" name="-run-deploy-nb">
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
</target>
In advance I checked the serverlogs, which are empty - no error is shown. What am I doing wrong? Can someone advice me what to change? Thank you in advance!
Edit 1 - 08.01.2014
Allright, I didn't found a solution for solving the problem above, but following way worked at least to deploy the app manually.
Netbeans -> Right-Click on Project -> Clean/Build (now check your outputlog where it save's the project.
Now go to that path, you'll shoud find a .war file
Log into your glassfish-server -> Click Application's -> Click deploy -> upload the .war file -> Click again deploy
Now glassfish deploys the project for you. :)
Edit 2 - 17.01.2014
I could fix the problem, following was wrong. In netbeans I configured that the Target should be domain1, if you do this, it won't work. Let the target be empty, and everything works fine.
Thank you Tim B for your help!
If NetBeans can't talk to the server when you add it to the list then it silently fails. The server appears in the list but you can't click on the + and expand it out to see what it contains.
Check in your server list that NetBeans can actually see the server. Also keep in mind that NetBeans needs access to the admin port (usually 4848) not the normal web one, although it looks like your tunnel is correct for that.
You also need to turn on remote administration and set up the username and password etc. Try pointing a web browser to your localhost 6122 and check you can log in to the admin panel using the same username and password that netbeans is using.
To turn on remote administration:
https://blogs.oracle.com/quinn/entry/securing_adminstration_in_glassfish_server1
asadmin enable-secure-admin
You will also need to add an administrator username and password.

Glassfish 4 deployment error

I added some libraries to my JavaEE project and then deploy the application works. I modified something and I got this error message in Eclipse:
Cannot Deploy ProjectName
deploy is failing=Error occurred during deployment: Keys cannot be duplicate.
Old value of this key property, nullwill be retained.
Please see server.log for more details.
java.lang.LinkageError: loader (instance of
org/glassfish/web/loader/WebappClassLoader):
attempted duplicate class definition for name:
"org/glassfish/web/loader/JdbcLeakPrevention"
loader (instance of org/glassfish/web/loader/WebappClassLoader): attempted duplicate
class definition for name: "org/glassfish/web/loader/JdbcLeakPrevention"
I made some research and I found out that it is not an Eclipse bug. I'm working with Kepler but I tested with Juno too. Got the same error message.
I downloaded Glassfish 3.1.2.2 and the message gone.
Why am I getting this message?
I Had the same error. I stopped the GLassfish server and then I cleaned the project (Project -> Clean... ). Started the server and worked
I also had this issue, and I was also using the SVNKit library plus its dependencies so it looks like there is some kind of conflict there. I can get around it by cleaning out the osgi-cache folder & restarting glassfish, but I have to do this every time I want to deploy, so not a great solution.
Try to remove all the files under osgi-cache and generated directories. It worked for me.
In my Glassfish log file it says:
Application with name ws is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name
Following my logs instructions I deployed the app with --force option:
asadmin deploy --force=true ws.war
and it worked. More info on deploy --force=true
Try to clean autodeploy directory, restart the server.
Also clean the project deployment directory.
following steps worked for me.
stop the glassfish server(if running)
kill all the java process (using terminal or activity monitor)
now try redeploy.
Was somehow related to a single #Singleton bean. Converted it to #Stateless and everything worked fine. Not quite sure why this happened...

Categories

Resources