How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?

You should not have any server-specific libraries in the /WEB-INF/lib. Leave them in the appserver’s own library. It would only lead to collisions in the classpath. Get rid of all appserver-specific libraries in /WEB-INF/lib (and also in JRE/lib and JRE/lib/ext if you have placed any of them there). A common cause that the appserver-specific libraries are included in the webapp’s library is that starters … Read more

How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?

For the record, the spring.jpa.hibernate.ddl-auto property is Spring Data JPA specific and is their way to specify a value that will eventually be passed to Hibernate under the property it knows, hibernate.hbm2ddl.auto. The values create, create-drop, validate, and update basically influence how the schema tool management will manipulate the database schema at startup. For example, the update operation will query the JDBC driver’s API to … 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

@Autowired – No qualifying bean of type found for dependency

You should autowire interface AbstractManager instead of class MailManager. If you have different implemetations of AbstractManager you can write @Component(“mailService”) and then @Autowired @Qualifier(“mailService”) combination to autowire specific class. This is due to the fact that Spring creates and uses proxy objects based on the interfaces.

Use tag with a map

The <form:options> tag supports what you want right out of the box, using the items attribute. You can do something like this: And so on. Then in your form: That will be rendered to something like: