Pages

Monday, October 21, 2013

Spring - Eclipse - Mavens - Issues and How to Resolve them

Issue - Spring Application not loading/starting in Eclipse Tomcat

Sometimes for strange reason, your Spring application won't be loaded by Tomcat. If you start the tomcat server, instead of loading the spring context file configured in the web.xml, the server just starts and you wont see anything specific to your application in the log file.

The issue is because of Maven configuration. Just select the web project, right click and then Select Maven. In Maven you will find the option to Update project. Just do that. Now the application should be starting like a charm in Eclipse. Select the project > Maven > Update Project


Issue - Where Eclipse keeps/explodes the Web application

It is very handy to know when you install the application on the Tomcat running in Eclipse, where exactly it
explodes the war file. Some times, you deployed the application but still the application not starting properly or you are facing some weird issues during the start-up like class not found exception when you know for sure the jar is there in the class path. Sometimes it is problem with exploding the application. You can go and see what is the problem in exploding the application.

Double click on the server where you installed the application and it should bring the overview screen of the server. There you can see the server path something like this .metadata\.plugins\org.eclipse.wst.server.core\tmp1. You should append your work space location. For example if your workspace is c:\1\workspace then the server explodes your application content in c:\1\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps. You can see your application folder in this location. You can go and see in your application lib directory you have the jar file you are looking for.

No comments:

Post a Comment

 
Blogger Templates