I'm using Wildfly and have deployed Struts2 as a module. I deployed my project.war file into standalone/deployments. There's a project-web.jar file in project.war/WEB-INF/lib that contains my Struts2 actions. I'm using the convention plugin. In my struts2.xml I have the following:
<constant name="struts.convention.action.includeJars" value=".*?/project-web.*?jar(!/)?"/>
<constant name="struts.convention.exclude.parentClassLoader" value="true" />
<constant name="struts.convention.action.fileProtocols" value="file,jar,zip"/>
The errors I am getting include
2019-11-26 13:21:01,511 WARN [com.opensymphony.xwork2.util.fs.DefaultFileManager] (default task-6) Could not normalize URL [vfs:.../wildfly-10.1.0.Final/bin/content/project-war-0.0.1.war] to file protocol!
2019-11-26 13:21:01,520 WARN [org.apache.struts2.convention.PackageBasedActionConfigBuilder] (default task-6) The includeJars pattern [.*?/project-web.*?jar(!/)?] did not match any jars in the classpath
2019-11-26 13:21:01,523 ERROR [com.opensymphony.xwork2.util.ResolverUtil] (default task-6) Could not search jar file '...\wildfly-10.1.0.Final\bin\content\project-0.0.1.war\WEB-INF\lib\project-web-0.0.1.jar\com\company\project\actions' for classes matching criteria: org.apache.struts2.config.ClasspathPackageProvider$1@606e8501 due to an IOException: java.io.FileNotFoundException: ...\wildfly-10.1.0.Final\bin\content\project-0.0.1.war\WEB-INF\lib\project-web-0.0.1.jar\com\company\project\actions (The system cannot find the path specified)
While there's no bin\content folder in Wildfly, I see that it has to do with a JBoss vfs.
Note that the webapp worked when I deployed Struts2 with my project.war instead of as a module.
Why can't Struts2 find my actions?
It seems as though earlier versions of Struts2 had problems with JBoss's VFS. I upgraded from 2.3.24 to 2.5.20 and that seems to have gotten me past that point.