I have been banging my head against an exception occurring during deployment:

15:46:43,092 ERROR [STDERR] Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=javax.servlet.ServletContext, name='default'] in public void org.apache.struts2.spring.StrutsSpringObjectFactory.setServletContext(javax.servlet.ServletContext).

After much searching, I was guessing maybe I needed the SessionContextAutowiringInterceptor mentioned in the struts-default.xml in the struts2-core-2.0.8.jar, and also mentioned in the struts-plugin.xml in the struts2-spring-plugin-2.0.8.jar:

<interceptor name="sessionAutowiring" class="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterceptor"/>

Unfortunately, this class does not exist in the .jar, resulting in a ClassNotFoundException. I suspect this is a case of a file not making it over from Webwork 2.2.5. In fact, there are 6 files missing under the "spring" package and two sub-packages. This interceptor is not part of the defaultStack. So maybe that is why no one else has noticed.

However, does that mean that Spring IOC integration is handled in another manner and this interceptor and the above classes unnecessary? Or is no one doing Struts2/Spring integration? That also seems unlikely as I shifted to Struts2 from Webwork because of AppFuse which uses both.

Please, someone, shed a little light! I am stumbling around in the dark and the bruises are killing me. Thank you.

Fred


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to