I am trying to deploy Map Portlet which is a spring MVC frame work. I am getting error while deploying as follows.
13:57:25,966 ERROR [org.springframework.web.portlet.DispatcherPortlet] (ServerService Thread Pool -- 146) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mapViewController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.jasig.portlet.maps.mvc.portlet.MapViewController.setMapDao(org.jasig.portlet.maps.dao.IMapDao); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) [spring-context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.createPortletApplicationContext(FrameworkPortlet.java:356) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.initPortletApplicationContext(FrameworkPortlet.java:294) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.initPortletBean(FrameworkPortlet.java:268) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:120) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at javax.portlet.GenericPortlet.init(GenericPortlet.java:133) [portlet-api-2.0.jar:]
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:441) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:296) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:99) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:146) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:107) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletFilterLifeCycle.promoteDependents(PortletFilterLifeCycle.java:86) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:115) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletApplicationLifeCycle.promoteDependents(PortletApplicationLifeCycle.java:349) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:115) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:72) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployment.install(PortletApplicationDeployment.java:150) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployer.add(PortletApplicationDeployer.java:199) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.exoplatform.portal.pc.ExoKernelIntegration.onEvent(ExoKernelIntegration.java:207) [exo.portal.component.pc-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
at org.gatein.wci.ServletContainer.safeFireEvent(ServletContainer.java:319) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer.fireEvent(ServletContainer.java:338) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer.access$400(ServletContainer.java:56) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer$RegistrationImpl.registerWebApp(ServletContainer.java:462) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.jboss.JB7ServletContainerContext.start(JB7ServletContainerContext.java:369) [wci-jboss7-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.jboss.JB7ServletContainerContext.lifecycleEvent(JB7ServletContainerContext.java:223) [wci-jboss7-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3772) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.jasig.portlet.maps.mvc.portlet.MapViewController.setMapDao(org.jasig.portlet.maps.dao.IMapDao); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
... 45 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:924) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:793) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:551) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
... 47 more
13:57:25,968 ERROR [org.gatein.pc.portlet.impl.container.LifeCycle] (ServerService Thread Pool -- 146) Cannot promote object to STARTED: org.gatein.pc.portlet.container.PortletInitializationException: The portlet map threw a runtime exception during init
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:312) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:99) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:146) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:107) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletFilterLifeCycle.promoteDependents(PortletFilterLifeCycle.java:86) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:115) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.PortletApplicationLifeCycle.promoteDependents(PortletApplicationLifeCycle.java:349) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.promote(LifeCycle.java:115) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:72) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployment.install(PortletApplicationDeployment.java:150) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployer.add(PortletApplicationDeployer.java:199) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.exoplatform.portal.pc.ExoKernelIntegration.onEvent(ExoKernelIntegration.java:207) [exo.portal.component.pc-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
at org.gatein.wci.ServletContainer.safeFireEvent(ServletContainer.java:319) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer.fireEvent(ServletContainer.java:338) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer.access$400(ServletContainer.java:56) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.ServletContainer$RegistrationImpl.registerWebApp(ServletContainer.java:462) [wci-wci-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.jboss.JB7ServletContainerContext.start(JB7ServletContainerContext.java:369) [wci-jboss7-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.gatein.wci.jboss.JB7ServletContainerContext.lifecycleEvent(JB7ServletContainerContext.java:223) [wci-jboss7-2.3.1.Final-redhat-3.jar:2.3.1.Final-redhat-3]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3772) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mapViewController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.jasig.portlet.maps.mvc.portlet.MapViewController.setMapDao(org.jasig.portlet.maps.dao.IMapDao); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) [spring-context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.createPortletApplicationContext(FrameworkPortlet.java:356) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.initPortletApplicationContext(FrameworkPortlet.java:294) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.FrameworkPortlet.initPortletBean(FrameworkPortlet.java:268) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:120) [spring-webmvc-portlet-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at javax.portlet.GenericPortlet.init(GenericPortlet.java:133) [portlet-api-2.0.jar:]
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:441) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:296) [pc-portlet-2.4.2.Final-redhat-2.jar:2.4.2.Final-redhat-2]
... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.jasig.portlet.maps.mvc.portlet.MapViewController.setMapDao(org.jasig.portlet.maps.dao.IMapDao); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
... 45 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jasig.portlet.maps.dao.IMapDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:924) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:793) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:551) [spring-beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
... 47 more
Their is an @Autowired for RestfulJsonMapDaoImpl class which has a interface class IMapDao.
Controller Class
package org.jasig.portlet.maps.mvc.portlet;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.portlet.*;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.portlet.maps.dao.IMapDao;
import org.jasig.portlet.maps.model.xml.DefaultLocation;
import org.jasig.portlet.maps.model.xml.MapData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.portlet.ModelAndView;
import org.springframework.web.portlet.bind.annotation.ResourceMapping;
@Controller
@RequestMapping("VIEW")
public class MapViewController {
public static final String PREFERENCE_API_KEY = "apiKey";
final protected Log log = LogFactory.getLog(getClass());
private IMapDao dao;
@Autowired(required = true)
public void setMapDao(IMapDao dao) {
this.dao = dao;
}
RestfulJsonMapDaoImpl class
@Component()
public class RestfulJsonMapDaoImpl implements IMapDao {
final protected Log log = LogFactory.getLog(getClass());
private RestTemplate restTemplate;
@Autowired(required = true)
public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
IMapDao
public interface IMapDao {
public MapData getMap(String location);
}
application.xml file
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<property name="messageConverters">
<util:list>
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
</util:list>
</property>
</bean>
<bean class="org.jasig.portlet.maps.dao.RestfulJsonMapDaoImpl" p:restTemplate-ref="restTemplate"/>
I dont know where i am going wrong but the error is continuous and same. It helps me a lot if any one solve this Issue Thanks in advance.
I think you are missing below code snippet in your application.xml
<mvc:annotation-driven />
and the corresponding namespace in your servlet context.