|
From: Cecil N. <cec...@gm...> - 2008-05-02 20:57:29
|
If I turn of scanning or remove context-param, I get a 404 > Are the beans being instantiated by Spring ok, but the request isn't being > dispatched to the beans created by Spring? > So I think the later is the case. Here is console output. Notice that no JAX-RX resources are registered. The STDOUT lines show the bean actions at work. The DAO var isn't null at that point. Both variations are below. Thanks for your help. *Console output without the scan (results in 404):* 16:45:04,544 INFO [[/restdb3]] Initializing Spring root WebApplicationContext 16:45:04,544 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 16:45:04,575 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@ab6a53: display name [Root WebApplicat ionContext]; startup date [Fri May 02 16:45:04 EDT 2008]; root of context hierar chy 16:45:04,638 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 16:45:04,716 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@ab6a53]: or g.springframework.beans.factory.support.DefaultListableBeanFactory@11e4bcc 16:45:05,606 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11e4bcc: de fining beans [plmwh,geJdbcTemplate,dbquery3_dao,getpart]; root of factory hierar chy 16:45:05,700 INFO [STDOUT] == JDBC Template is set == 16:45:05,700 INFO [STDOUT] is not null! 16:45:05,700 INFO [STDOUT] ==> DAO set; is null? false 16:45:05,700 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 1156 ms *Console output when scan is on: * 16:51:21,511 INFO [TomcatDeployer] deploy, ctxPath=/restdb3, warUrl=.../tmp/dep loy/tmp9697restdb3-exp.war/ 16:51:22,745 INFO [STDOUT] FOUND JAX-RS resource: dbquery3 16:51:22,792 INFO [[/restdb3]] Initializing Spring root WebApplicationContext 16:51:22,792 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 16:51:22,823 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@1e27ea6: display name [Root WebApplica tionContext]; startup date [Fri May 02 16:51:22 EDT 2008]; root of context hiera rchy 16:51:22,901 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 16:51:22,964 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@1e27ea6]: o rg.springframework.beans.factory.support.DefaultListableBeanFactory@17455a9 16:51:22,995 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@17455a9: de fining beans [plmwh,geJdbcTemplate,dbquery3_dao,getpart]; root of factory hierar chy 16:51:23,073 INFO [STDOUT] == JDBC Template is set == 16:51:23,089 INFO [STDOUT] is not null! 16:51:23,089 INFO [STDOUT] ==> DAO set; is null? false 16:51:23,089 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 297 ms 16:51:53,166 INFO [STDOUT] DAO is null |