I need help on this. If I deploy the code manually application is reachable, endpoints working fine, but throws 404 when I deploy from eclipse. I changed property of tomcat from workspace metadata to /servers tomcat v8.0, changed the server location to "Use Tomcat Installation" on server overview. I even tried with copying ROOT folder from tomcat installation folder/webapps to wtpwebapps though it existed there.
Donno what else I can do. I can see server welcome page. I can access service endpoints when I manually deploy in same server but not after publish from tomcat. I seek some help on it.
Try this,
Project: Properties-> Java Build Path-> Add Library -> Select "Server Runtime" from the list-> Next->Select "Apache Tomcat"-> Finish
Related
I have Glassfish 4.1 and Eclipse Luna installed on Ubuntu. When I tried to run a simple web application (jsp + servlet + java bean) I`ve received the following error:
Publishing to Glassfish 4 at localhost[domain1].. has encountered a
problem.
cannot Deploy mvcprj1 deploy is failing=Application with
name [mvcprj1] is not deployed
Nothing is appearing neither in the glassfish server log or in the eclipse console.
I had same deployment issue (eclipse Lune/Glassfish 4.1) and it was resolved thanks to Marvin's feedback.
You can find the "Use JAR archives for deployment" by:
right click on glassfish from eclipse server tab. Then, select Monitoring >Properties > Glassfish in new windows > Use JAR archives for deployment.
Then, the miracle occurs...
Try the following steps:
right click on glassfish server
click on properties
then you will get 3 options(general,glassfish,monitoring) at the left side of that box.
click on glassfish
click that checkbox "Use JAR archives for depolyment". Previously it was unchecked. That's why I was getting issue.
I have deleted the Glassfish server instance in eclipse and recreated it to solve this problem.
I believe, that occurs, when one has not closed the "Browser Page" in Eclipse, after he had tried out the same application previous time. After closing all open "Browser Pages" of this application in Eclipse, the deployment is possible again.
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
I am trying to run a project which has been already developed on a friend's computer. Although I did every configuration correctly I am getting The requested resource is not available message from tomcat when I try to load it.
Tomcat is running correctly.
This is the way I tried to run the project.
Configured everything, started the server, Deployed the project.
this is my build.properties file.
# Ant properties for building the STBSPro
appserver.home=C:\apache-tomcat-6.0.41
# for Tomcat 5 use $appserver.home}/server/lib
# for Tomcat 6 use $appserver.home}/lib
appserver.lib=${appserver.home}/lib
#appserver.lib=C:\apache-tomcat-7.0.54\lib
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8090/manager/html
tomcat.manager.username=user
tomcat.manager.password=password
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/cashierdb
db.user=root
db.pw=root
I am running the server outside, server is not installed into Eclipse.(I use Spring Tool Suite)
in my server.xml file I changed the port to 8090.
in here, Is my tomcat.manager.url correct?
Do I have any other configurations to edit in order to run the project?
My server log does not give a single message in it.
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.
I know that tomcat is running because when I type http://localhost, the tomcat page dispay. My problem is I can't figure out why the wtpwebapps/myapp is empty, is like the eclipse doesn't publish it and when i type http://localhost/myapp, I get 404 error.
In the server overview :
Server Location is set to "Use Tomcat installation" | server path: the servers's folder | deploy path : wtpwebapps
Server Option : Publish module contexts to separate XML file
Publishing : Automatically publish when ressource change
I use eclipse Ganymede 3.4.2, tomcat 6.0, under Win7
Any help would be appreciated, thanks
your files must be somwhere, so start searching in:
<YOUR_WORKSPACE_DIR>\.metadata\.plugins\org.eclipse.wst.server.core\tmp<SOME_NUMBER>\wtpwebapps
I had a similar problem, when updating our project (.project and .classpath are checked in for convenience, but causes sometimes problems).
Console-Log in eclipse always says:
Error configuring application listener of class org.sth.ThisClass
java.lang.ClassNotFoundException: org.sth.ThisClass
The reason was that $WORKSPACE_DIR/.metadata/.plugins/org.eclipse.wst.server.core/tmp$NUMBER/wtpwebapps/$CONTEXT/WEB-INF/lib/classes was empty. The solution was to enter under Project Properties > Deployment Assembly an entry:
Source: /src
Deploy Path: WEB-INF/classes
If you use a Maven in your project, this is a solution for you:
Delete the project(s) in the Eclipse.
create project from Maven sources (select your workspace directory).
Check found pom.xml to import.
Restart the Tomcat.
Try to look into servers explorer and it will show you what state is your application at and if its deployed.
Since I had difficulty finding where this "server overview" is, I like to add that you just double click on a server under the "servers" view. I kept on right click and look at the "Properties" and was not getting to this information.