You must tell where's your spring context (applicationContext.xml). Try this:
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/applicationContext.xml</param-value> </context-param> Regards, Leandro. 2009/4/6 HHB <hubaghd...@yahoo.ca> > Hey, > I'm trying to integrate Spring 2.5 into our Wicket > application, I did the following: > > web.xml: > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value>classpath:applicationContext.xml</param-value> > </context-param> > <listener> > <listener-class>org.springframework.web. > context.ContextLoaderListener</listener-class> > </listener> > <filter> > <filter-name>OpenSessionInViewFilter</filter-name> > <filter-class>org.springframework.orm.hibernate3. > support.OpenSessionInViewFilter</filter-class> > </filter> > > <filter> > <filter-name>WicketFilter</filter-name> > <filter-class>org.apache.wicket. > protocol.http.WicketFilter</filter-class> > <init-param> > <param-name>applicationFactoryClassName</param-name> > <param-value>org.apache.wicket.spring. > SpringWebApplicationFactory</param-value> > </init-param> > </filter> > <filter> > <filter-name>WicketFilter</filter-name> > <filter-class>org.apache.wicket. > protocol.http.WicketFilter</filter-class> > <init-param> > <param-name>applicationFactoryClassName</param-name> > <param-value>org.apache.wicket.spring. > SpringWebApplicationFactory</param-value> > </init-param> > </filter> > > applicationContext.xml: > > <bean id="wicketApplication" class="domain.WicketApplication"/> > > > pom.xml: > > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring</artifactId> > <version>2.5.6</version> > </dependency> > > <dependency> > <groupId>org.apache.wicket</groupId> > <artifactId>wicket-spring</artifactId> > <version>1.3.5</version> > </dependency> > <dependency> > <groupId>org.apache.wicket</groupId> > <artifactId>wicket-spring-annot</artifactId> > <version>1.3.5</version> > </dependency> > > WicketApplication: > > @Override > protected void init() { > super.init(); > addComponentInstantiationListener > (new SpringComponentInjector(this)); > } > > But when trying: > mvn test > I got the following exception: > ------------------------------------ > ------------------------------------------- > Test set: TestSuite > ------------------------------------ > ------------------------------------------- > Tests run: 2, Failures: 1, Errors: 0, > Skipped: 1, Time elapsed: 0.498 sec <<< FAILURE! > init(domain.TestHomePage) Time elapsed: 0 sec <<< FAILURE! > java.lang.IllegalStateException: > No WebApplicationContext found: no ContextLoaderListener registered? > at org.springframework.web.context.support. > WebApplicationContextUtils. > getRequiredWebApplicationContext(WebApplicationContextUtils.java:70) > at org.apache.wicket.spring. > injection.annot.SpringComponentInjector. > <init>(SpringComponentInjector.java:74) > > Any ideas? > Thanks. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >