tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Autowired spring bean not working in tomcat 7.0.35 with jax-ws
Date Thu, 07 Feb 2013 08:11:28 GMT
2013/2/7 J- MAN <jmandawg@hotmail.com>:
>
> Hi,
> On tomcat 7.0.35 when i have 2 listeners (jax-ws and spring) in my web.xml my spring
beans do not get initialized.  It seems as though it initializes my the jax-ws webservice
class via sun-jaxws.xml before initializing my beans.  It works fine in Tomcat 6, any way
to get this to work in Tomcat 7?
> web.xml snippet is below.
> Any ideas?
>
> <?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>
>         <!-- The definition of the Root Spring Container shared by all Servlets  
              and Filters HD -->      <context-param>         <param-name>contextConfigLocation</param-name>
         <param-value>classpath:webservices_context.xml</param-value>    </context-param>
>         <!-- Creates the Spring Container shared by all Servlets and Filters HD -->
    <listener>              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 </listener>
>
> <listener>        <listener-class>                com.sun.xml.ws.transport.http.servlet.WSServletContextListener
       </listener-class>    </listener>
> <servlet>               <servlet-name>testService</servlet-name>  
                     <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
       <load-on-startup>1</load-on-startup>      </servlet>      <servlet-mapping>
              <servlet-name>testService</servlet-name>                <url-pattern>/ws/*</url-pattern>
                       </servlet-mapping>
>
> </web-app>


1. You suspect that your listeners are called in wrong order?
In what order do you expect them to be called?

2. Try "logEffectiveWebXml" option on Context

3. What are your evidences?

4. If you cannot get much from logging, maybe debugging would help
http://wiki.apache.org/tomcat/FAQ/Developing#Debugging

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message