java - Spring treating servlet contextConfigLocation class as path despite correct contextClass -


we're using javaconfig, , i'm trying set separate application context around issues in jersey 1.7 (namely, way includes spring beans annotated @controller in paths).

i've set springservlet want use separate application context so:

<servlet>     <servlet-name>my servlet</servlet-name>     <servlet-class>com.sun.jersey.spi.spring.container.servlet.springservlet</servlet-class>     <init-param>          <param-name>com.sun.jersey.api.json.pojomappingfeature</param-name>          <param-value>true</param-value>     </init-param>     <init-param>         <param-name>com.sun.jersey.config.property.resourceconfigclass</param-name>         <param-value>com.sun.jersey.api.core.packagesresourceconfig</param-value>     </init-param>     <init-param>         <param-name>com.sun.jersey.config.property.packages</param-name>         <param-value>com.mycompany.admin</param-value>     </init-param>     <init-param>         <param-name>contextclass</param-name>         <param-value>org.springframework.web.context.support.annotationconfigwebapplicationcontext</param-value>     </init-param>     <init-param>         <param-name>contextconfiglocation</param-name>         <param-value>com.mycompany.adminwebconfig</param-value>     </init-param> </servlet> 

however, spring keeps giving me following error when try hit 1 of services; it's trying treat class name file path:

[2015-08-07 11:52:20,081] [error] [] [request=] [user=] [ip=] [org.apache.catalina.core.containerbase.[catalina].[localhost].[/my-app]. [my rest service]] [allocate exception servlet rest service] java.io.filenotfoundexception: not open servletcontext resource [/com.mycompany.adminwebconfig] 

any thoughts? thought setting contextclass org.springframework.web.context.support.annotationconfigwebapplicationcontext make recognize class name, doesn't seem doing that...

spring's dispatcherservlet has support annotationconfigwebapplicationcontext. you're not using dispatcherservlet, you're using jersey springservlet.

it explicitly creates xmlwebapplicationcontext.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -