I have a Dynamic Web App in Eclipse deploying into a WebSphere Liberty pluging.
It was deploying fine until I create an Ant file to build an EAR file.
After that automatic Deploy Stuck on 80% of the publishing process
Stay with Msg:
Publishing : myEAR: Waiting for application status from the server.
I remove the ant file but anyway.
What can I do to make Eclipse work as before.
If stuck at about 80% eclipse is usually waiting for the server to print a message saying that the application was started. Do you see a message in the console view similar to the following?
[AUDIT ] CWWKZ0001I: Application Web2EAR started in 0.048 seconds.
If not is there anything in the console view or in the server logs to indicate what might have gone wrong with the application deployment?
I was able to fix this problem by double clicking on the server and unchecking the "run Applications Directly From Workspace" option.
My environment is slightly different. My project is both a Maven Project and a Dynamic Web Project. And I added the Maven dependencies to the Deployment Descriptor.
Related
I've written a Spring MVC app that is functional on an app server. I'm attempting to switch development of this app from Eclipse and to Intellij. I am very new to the IDE so I'm not sure where I have gone wrong here.
When I run this application on the server in Eclipse it goes to localhost just fine and works as expected. I created a run configuration in IntelliJ, the app compiles and the server log says it was deployed successfully.
However in the browser it gives the standard HTTP Status 404 - Resource Not Available.
I really don't think it's the servlet or web.xml because those are working just fine in Eclipse. I've also created a brand new app in Intellij to test it and it works fine. So it must be something specific to IntelliJ that I have misconfigured or not setup at all...any ideas? Let me know if you need to see specific screens or anything.
So after toying with this, making it worse a few times, and then getting it back to the original 404 I found the difference.
Eclipse has an internal tomcat server it runs projects on, Intellij runs its projects on the default tomcat server installed on your computer. Intellij exports the project you are running to the server in the web apps folder as the name of your project.
So after I found that, in my tomcat run configuration in Intellij I had to specifiy the application context. Edit Configurations -> Deployment tab -> Application context, and set it to /YourProjectName. My guess is that this tells tomcat where to find your project within the web apps folder.
I hope this can help anyone else who is a relative beginner to tomcat/java EE and intellij like I am.
There is a plugin in intellij called "Smart Tomcat", it allows running spring or web app with much fewer configurations.
Hi All IntelliJ IDEA experts,
I seek help (if possible please with screenshots) on how to configure IntelliJ IDEA 14 to just debug a Glassfish 3.1 EAR and WAR
App deployed externally. I mean mvn build and deploy via Glassfish
Admin console and only debug from IntelliJ .
I go to set a local debug config in Glassfish and it insists on deployment of artifacts (which I do not want to do via IntelliJ)
Reason for not deploying via IntelliJ is that 2 WAR files depend on the
EAR to be deployed before hand and currently I think IntelliJ (as of version 14) does not let you juggle / or manually sort the deployment order and sorts deployment artifacts by name-wise in the natural sort order (A limitation)
Please help with externally configured artifacts based debug configuration help!
Screenshots for local debug config attached herewith
Just setting local Glassfish debug configuration is enough. There is no difference if the wars/ears are deployed via IDEA or externally.
The message you refer to "No artifacts marked for deployment" is actually a warning, not an error (although the red color of the icon is confusing). ALthough it appears, it does not stops you from running the debug configuration (just hit OK when the message appears).
Delete password in admin configuration.
like this
I started my journey into web applications about three years ago and I'm happy to say that I've finally deployed a working website. My concern is that to deploy the website I use the Eclipse IDE and a Tomcat webserver. So basically I right click the project in Eclipse and then choose "Run As > Run on Server" and then select the Tomcat server I downloaded - from that point on the console spits out some startup messages and my website is online and ready for use. What are are some of the drawbacks of deploying a project this way. I've read just briefly about WAR files and adding them to Tomcats Webapps folder but I could neither get that working nor did I understand completely the process...so is it acceptable to just deploy the project the way I have been doing thus far by running it in Eclipse?
Generally Development machine and deployment server is different.
On Deployment server one may not have eclipse always.
WAR file is just a webarchive which includes all the necessary files. WAR makes your project portable.
Export WAR from eclipse place it in tomcat webapps in any machine and restart tomcat.
You should have your webapp successfully running on that machine.
That's a fine way for deploying a server when you're learning, or always have the server (the only server!) running on your development machine.
If you need to push to a remote machine, it won't work, and you'll need to learn other methods then, but for now, what you're doing is fine.
I'm trying to run a multi-module Maven web app in Eclipse (EE Helios SR 1). In NetBeans one have just to click the run button. But here it's probably a little more complicated.
I've added Tomcat 7.0.26 as a server for the war module of the project. When I try running the app, in the Servers part of the window I see Apache Tomcat v.7.0.26 at localhost [Started, Synchronized], but browser doesn't react. Does the system browser need to show the page when the app is running?
I tried to move to localhost:8080 and localhost:8080/welcome.html (the second one should be processed by the app) when the server was started, but I got 404 error both times. I also didn't see the new folder in the apache-tomcat-7.0.26/webapps/. Should Eclipse place the project there when running the application? I'd be really grateful if someone tells me what I'm missing here.
If not specified, tomcat integration with eclipse deploy by default war to a specific folder in .metadata, in my case somethings like: ~/workspace/<my_project_workspace_name>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/
Every war are then unzipped to a folder. If your maven pom.xml you'll find a
<build>
<finalName>myapp</finalName>
</build>
Then it'll deployed to tomcat as :
localhost:8080/myapp/welcome.html
I have had a lot of bad experience with running web servers in Eclipse. Most of the time, this was related to unreliable class/resource reloading.
My solution was to add Jetty to my app in a new module (see Embedding Jetty). This basically turns my web app into a Java application, avoiding most of the problems. It also allows me to specify a filter (written in Java) when the app should reload.
This solves all the problems with class reloading (classes and resources are never copied anywhere; they are loaded from Eclipse's bin folders), startup is much faster (we got the startup time from several minutes down to 15s) and reliable.
Maven Projects are different from the ones with Web Application Facets, You cannot directly run a Maven App as a web app because the folder structure is different. In order to run your application directly from eclipse, try to add Web Application nature to your maven project [A complex modification involving modification of .project and .classpath files along with addition of few other files]. I would recommend modifying your pom.xml file accordingly
I am trying to use tomcat with eclipse. I have installed it all and got the tomcat plugin installed. I have put a .war file in the webapps folder of tomcat and have made sure autodeploy is set to true. The problem I am having is that I can't get tomcat to run this .war file. The tomcat server is started and running as it tells me under the servers tab at the bottom of eclipse. It also shows the name of my .war file under it and says synchronized meaning it at least knows its there. But I can't get it to work at all. Even when I go to the local host page it shows the title of apache tomcat but does not show the file. I want it to show me the .war file. It has the correct xml files and everything in it. Any help is much appreciated.
You may try to check whether the application is deployed or not. You can directly go to the Tomcat directory to see this.
Another possible thing could be, you might be typing the incorrect url.
http://localhost:8080/[your_application]
where 8080 is the port you have specified for tomcat.
You need to let Eclipse publish your web project for you when using the Eclipse Tomcat plugin instead of trying to manually deploy it youself.
The Tomcat plugin for Eclipe supports hot deployment whereby you can change jsp's etc without having to manually redeploy your web application.
If you have a valid web project in eclipse then you can check that it is being deployed by looking at the Server View.
Window, Show View, Other, Server
This window should contain details of your Apache server. (If no server is listed then you'll need to right click on the list and set one up.)
To check that your application is being deployed right click on your server and select Add/Remove projects. Check that your web project is listed. If it is not listed under Configured Project then add it.
If your project does not appear in the list then it probably wasn't setup as a Dynamic Web Project. You can fix this by by right clicking on the project to bring up project properties and then clicking on facets and then enabling Dynamic Web Project.
It is also worth having the Console view visible when starting/stopping Tomcat so that you can see the server output.
Start tomcat from the command line (not eclipse) and see if your webapp shows up. It should if you have indeed created a valid war file. If it doesn't work, check the logs.
You shouldn't be manually deploying the war file if you are using eclipse to launch tomcat. Running tomcat from eclipse does not necessarily use the same default workspace as the standalone tomcat. Check the configurations for the 'server': it may be that the eclipse launched server's webapp folder is empty.
If for some reason your webapp failed to initialize properly (error in the descriptor, an uncaught exception in a context listener, ...) tomcat will unload it and you won't see anything at http://localhost:8080/yourwebapp.
Is it there in the list of applications in tomcat manager?
if you havent done this...then follow the steps...
Go to http://localhost:8080/
Go to Tomcat manager and check if your application is there in the list of deployed applications. Try redeploying or starting the application if running=false. It usually tells you what is wrong when you do that.