Eclipse 3.7 (Indigo) + Tomcat7 — Cannot create a server using the selected type

This is a known issue.To resolve this error, try one or all of the following: Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server. Rename the org.eclipse.jst.server.tomcat.core.prefs to org.eclipse.jst.server.tomcat.core.prefs.bak (or you can delete this file). This file can be found at \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings Rename the org.eclipse.wst.server.core.prefs to org.eclipse.wst.server.core.prefs.bak (or delete the file). This … Read more

BeanNotOfRequiredTypeException due to autowired fields

Somewhere in your code you must be autowiring AdminServiceImpl like this: @Autowired private AdminServiceImpl adminService; Either depend barely on interface: @Autowired private AdminService adminService; or enabled CGLIB proxies. Similar problems Autowired spring bean is not a proxy Fixing BeanNotOfRequiredTypeException on Spring proxy cast on a non-singleton bean? Getting Spring Error “Bean named ‘x’ must be … Read more

How to prevent file locking when undeploying a Tomcat web app?

This is very common in Windows environment but there is a solution via the antiResourceLocking context property: Open context.xml from /tomcat/conf folder and modify the context to match this : <Context antiResourceLocking=”true”> Edit: Updated properties following @JanM comment. Previously it also contained ‘antiJARLocking’

jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

The servlet API .jar file must not be embedded inside the webapp since, obviously, the container already has these classes in its classpath: it implements the interfaces contained in this jar. The dependency should be in the provided scope, rather than the default compile scope, in your Maven pom: <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency>

How to set the context path of a web application in Tomcat 7.0

What you can do is the following; Add a file called ROOT.xml in <catalina_home>/conf/Catalina/localhost/ This ROOT.xml will override the default settings for the root context of the tomcat installation for that engine and host (Catalina and localhost). Enter the following to the ROOT.xml file; <Context docBase=”<yourApp>” path=”” reloadable=”true” /> Here, <yourApp> is the name of, … Read more

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

I had a similar problem when running a spring web application in an Eclipse managed tomcat. I solved this problem by adding maven dependencies in the project’s web deployment assembly. Open the project’s properties (e.g., right-click on the project’s name in the project explorer and select “Properties”). Select “Deployment Assembly”. Click the “Add…” button on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)