wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 2.1.6 filter startup problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2.1.6 filter startup problem" Watch "Struts 2.1.6 filter startup problem" New topic
Author

Struts 2.1.6 filter startup problem

Lynn Keeling
Greenhorn

Joined: Jan 16, 2009
Posts: 1
I recently ran into a problem with Struts 2.0.11.2 but discovered the problem had been fixed in 2.1.6 so I started upgrading. Little did I know that annotation handling had chnaged so dramatically. I converted my code to use the new conventions plugin but now the filter won't start. I've gone as far as commenting out all of my annotations and the exception still gets thrown. Anyone else seen this error before?

SEVERE: Exception starting filter struts2
java.lang.ArrayIndexOutOfBoundsException: 0
at org.apache.struts2.convention.SEOActionNameBuilder.build(SEOActionNam
eBuilder.java:69)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.determi
neActionName(PackageBasedActionConfigBuilder.java:601)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildCo
nfiguration(PackageBasedActionConfigBuilder.java:445)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildAc
tionConfigs(PackageBasedActionConfigBuilder.java:278)
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(C
lasspathPackageProvider.java:52)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContai
ner(DefaultConfiguration.java:200)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
ConfigurationManager.java:55)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Di
spatcher.java:360)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)

here is my filter setup. nothing special. it worked fine before:

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.nexus.portal.ctrl.action</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>



David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Did you follow the directions for Converting a Codebehind based application to Convention? I'd start there, there's a bit more at Converting application from Codebehind to Convention Plugin.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2.1.6 filter startup problem
 
Similar Threads
Struts2 integration with Spring Security
Velocity + Struts2 + Sitemesh + Spring +Hibernate Integration How to configur web.xml?
Struts2 config error
LazyInitializationException [spring + struts2]
Filter mapping in struts2