You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Cook <Ja...@wecomm.com> on 2009/09/10 12:40:37 UTC
2.1.6 with Convention + Spring plugins
Hi All,
I have set up my first Struts2 project. I have added the convention
library and the spring library to the project. Now when I deploy
(Glassfish 2 ur2) I receive various exception messages, all in the vein
of
java.lang.Exception: Could not load MultiColumnPrinter.class
From Googling this error I can tell it is an issue with the version of
Glassfish I am using. However looking deeper into the trace I can see it
is also trying load
java.lang.Exception: Could not load
org/apache/struts/actions/DispatchAction.class
at
com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder
.java:745)
at
com.opensymphony.xwork2.util.finder.ClassFinder.access$400(ClassFinder.j
ava:57)
Now, I recognise this as a Struts 1 class which another project I have
deployed on the same domain of the same glassfish instance. For every
class in this Struts 1 project which extends DispatchAction I have an
error for.
However this *only* happens if I have the spring plugin added to my
Struts2 project. Also note this doesn't stop the application from
working, but I am concerned that it appears to be searching the entire
domain for actions, and spewing out these messages.
Can anyone provide any suggestions on what I have done wrong here?
Struts 2 Libs I have in my project:
Commons-fileupload-1.2.1
Commons-io-1.3.2
Commons-logging-1.0.4
Freemarker-2.3.1.3
Ognl-2.6.11
Struts2-config-browser-plugin-2.1.6
Struts2-convention-plugin-2.1.6
Struts2-core-2.1.6
Xwork-2.1.2
Web-xml
<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">
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</l
istener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/SpringConfig.xml</param-value>
</context-param>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndEx
ecuteFilter</filter-class>
<init-param>
<param-name>struts.devMode</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.objectFactory.spring.autoWire.alwaysRespect</param-na
me>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>struts.convention.result.path</param-name>
<param-value>/WEB-INF/jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Cheers
James
___________________________________________________________________
This email has been scanned by MessageLabs on behalf of weComm Ltd.
___________________________________________________________________