eclipse requested resource not available - eclipse

I have run a j2ee application in tomcat/eclipse for several months now, but suddenly (after working with changed in the css files), I get the server error:
The requested resource /appname/ is not available. I'm totally lost. I've gone through a number of posts. This one describes my problem: Eclipse is not detecting servlet libraries, but I've gone through everything in that post without finding any missing jars or servers or anything in my project.
I'm running Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1.
Project -> Properties -> Server shows Tomcat v6.0 Server at localhost
Project -> Build path, please see attached screen dump.
Project -> Project Facets: Dynamic Web Module 2.5 and Java 1.6 is checked.
I have tried to clean and rebuild the project.
I'm running over https so I'm connecting to https://localhost:8443/appname/Start. I'm not sure if that could be the problem, but it has worked ok until now.
Can anyone give me a hint what can be wrong?
Finally got it working again, but I honestly don't know exactly what fixed it.
I started with removing some servlets/servlet mappings from the web.xml file. After having done that change, when restarting the server, the Start servlet was found, but the jsp that the servlet was forwaring to was not (and the url to the jsp page looked strange). Also the logcat property file was not found. I read in another post that the Server might need to be cleaned so I did that and then cleaned the project once again. Then restarted the Server and now it's the application is running again.
Thanks for your help anyway, Andrei.

try cleaning your tomcat from eclipse:
right click in tomcat > clean.
then restart your server

Related

Eclipse STS connecting to Tomcat

In Spring Tool Suite IDE, have added Tomcat server and started it. Console output says : INFO: Server startup in 19182 ms
But on trying url http://localhost:8080/, gives HTTP error 404
STS version - 3.6.2.
If server is started outside Eclipse, Tomcat homepage is accessible as usual.
Try http://localhost:9087/ and see if that works. You may need to check your configurations for other port numbers, but 9087 should work.
Got it working!
Wile running tomcat in eclipse, not all files are copied in the new deployment location in the eclipse workspace. But after manually copying index.jsp and related images, the home page came.

Tomcat on Eclipse Juno and Luna. One works, the other one doesn't

I am working on JavaEE webprojects using maven for dependencies and so on. The testing environment is Tomcat 7 for eclipse.
Now, when I made the transition to the newer eclipse (Luna) and deploy the webapp on tomcat, the tomcat instance refuses to serve the project. It gives 404 and the request on localhost:8080 doesn't produce any unusual console or log entries except the normal startup output (the exact same as on Juno).
I compared the server access log files located in /.metadata/... and the startup scripts. They are equal. No error messages, and no other clues on why the Luna Tomcat does not work. Don't get me wrong, the server 'works', as it provides a 404 message, it just does not serve the webapp that is deployed.
Does somebody have an idea on how to debug this further, or what the reason for the different behaviour could be? Thanks for any hints or advice.
-a
EDIT:
Just a few things I already did:
- Check and set project root (set to / in both cases)
- One suggestion found via google was to fiddle with the Libraries and Order and Export in Project Settings Build Path. (just move them up and down to get rid of a bug -> did not work)
- In Project Properties, set the targeted runtime to Tomcat 7 (the server in question)
- Reinstall the server
- Copy all configuration from one server path to the other.
- Set the server base path of Luna to the exact same as the working Juno instance (yes, they are in different places)
EDIT2:
Updating Eclipse to the newest version (MARS) did the job. Sadly I will now never know what the cause of the problem was. Luckily everything works again and I can focus on actually doing something :D

Step through debugging of web app code in Eclipse maven app running on tomcat

I am trying to set up eclipse so that I can work on a maven web application which packages as a war file without building the war file and deploying to tomcat webapps manually.
This would also allow me to step through the code. I have installed tomcat 7 and my app deploys there ok and I have pointed eclipse at the installation of tomcat but it does not seem to deploy properly even though the manual deployment works fine.
The issue I get when deploying is that eclipse informs me that tomcat was not able to start.
To deploy my app I am going "servers >> add and remove" and then deploying my application from the available list by moving it into the configured list. After doing this and starting the tomcat server I get the error message.
Can anybody help me with running the app from within eclipse based on the compiled code and not on whats in the war file as ideally my end result would be to be able to step through code I am working on without building the war file first.
Thanks
I finally sorted this out after a few hours of messing around reading numerous posts, so hopefully this answer may help someone else who gets the error message:
"Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds"
Below are the steps I took:
1) Backed up my projects in my work space and then deleted the workspace
2) Recreated the workspace and imported my projects back into it
3) (this bit was crucial for me) - Added a connector to my server.xml on port 8080 as my app was set up to only run with SSL, it seems that eclipse tries to verify your app started by hitting the root of the web app and it couldnt do this due to the SSL connector.
I hope this helps someone out.

Run JHipster SpringApplication via eclipse

I'm trying to run the JHipster application via my Eclipse Juno, using jdk 1.7.
The app seems to be loading properly (no console errors), but when i'm trying to reach the server with the client side (or via Postman, by sending a request to the REST servlets in port 8080), it's not responding.
However, when i'm running "mvn spring-boot:run" in the command shell, the server is loaded successfully and is responding to the exact same requests. Also, I managed to run the same command via eclipse with some maven configuration but it seems to be running only the target files (jars) and not the source code. I still haven't been able to run the source code of this app using eclipse in order to properly debug it.
Any suggestions?
Thanks!
So the answer is quite trivial, but since I spent several hours to reach it, it might save some time for others-
Download & install STS IDE.
Import the project as existing Maven project.
Run/Debug the project.
I tried to run it via Eclipse the whole time (wasn't familiar with STS to be honest) and this probably needs some extra configuration (another comment with explanations on eclipse configuration will be much appreciated). Once you work with STS, it's easy.
You should not need STS, just Eclipse with the J2EE stuff.
I've imported the sample jhipster in Eclipse (without STS) as a Maven project and everything was OK, after installing the maven dependencies.
To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)
This app works for me: https://github.com/jhipster/jhipster-sample-app. It is stuck on Boot RC5 which probably means it's a bit old. Maybe Julien can comment on that (or update it)?

Tomcat 6.0.20 # STS 2.5.1==Error while app startup -No web.xml present

I am facing a problem while deploying my web app in STS 2.5.1 IDE. I am using Tomcat 6.As I am working in a development project, so rebuild and deployment of the project is very common.But sometimes while deploying my app , I receive NO WEB.XML present.
Although , I resolved this problem by removing app from tomcat, cleaned tomcat work directory, added app again, and start the server, then it worked.
My question - is this happening due to some cache being exhausted or there is some other cause.It seems that cleaning, removing and adding the prj work every time for me whenever this error is coming OR tomcat is not supposed to handle such a large project.It is very cumbersome procedure to remove, clean and restart again and again, after all you change your code a lot in development.
My technology stack is listed below:
SWF 2.3.0
Primefaces 2.2.1
JSF 2
Spring Security 3
Spring 3.1.0M1I
EhCache
Apache Tomcat 6.0
STS 2.5.1.
I think it's an eclipse issue. It seems that eclipse is not able to clear its server cache directory. There are times that you'd have to manually clear this cache, especially in large projects where eclipse can't update some of the project's dependencies.
You'll find the projects deployed in your eclipse integrated tomcat server at:
workspace.metadata.plugins\org.eclipse.wst.server.core\tmp\wtpwebapps