[ https://issues.apache.org/jira/browse/WW-4055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carol Saah updated WW-4055: --------------------------- Comment: was deleted (was: In struts2 versions 2.3.8 and 2.2.3, on WebLogic 10 to 12.1.1.0, we were able to view actions by including the following in the struts.xml configuration file: <constant name="struts.convention.action.includeJars" value=".*_wl_cls_gen.*"/> <constant name="struts.convention.action.fileProtocols" value="jar,zip" /> But, starting with struts2 version 2.3.12, this workaround does not work. There is a bug in line 416 of PackageBasedActionConfigBuilder: urlSet.include(new UrlSet(classLoaderInterface, this.fileProtocols)); The URLs generated in new UrlSet(classLoaderInterface, this.fileProtocols) DO include _wl_cls_gen.jar, but the jars from the UrlSet are not added to the overall urlSet. Line 104 in UrlSet does not add the URLs from the urlSet parameter. This test will fail for the 2.3.14 implementation of UrlSet. (I copied the source file for UrlSet into our apps test packages to write a test against it.) @Test public void testInclude() { try { UrlSet thisUrlSet = new UrlSet(); ArrayList<URL> urls = new ArrayList<URL>(); URL url = new URL("file:/c:/dir"); urls.add(url); UrlSet anotherUrlSet = new UrlSet(urls); thisUrlSet.include(anotherUrlSet); List<URL> expectedUrlsInUrlSet = thisUrlSet.getUrls(); assertFalse("file:/c:/dir should be in the list of URLs", expectedUrlsInUrlSet.isEmpty()); assertThat("file:/c:/dir should be in the list of URLs", url, Matchers.isIn(expectedUrlsInUrlSet)); } catch (MalformedURLException e) { fail("should not throw: " + e.getMessage()); } } The workaround is to add the following lines to struts.xml using the 2.3.8 version of PackageBasedActionConfigBuilder. I put a copy of PackageBasedActionConfigBuilder from 2.3.8 in a package in our project. <bean type="org.apache.struts2.convention.ActionConfigBuilder" name="ActionConfigBuilder_2_3_8" class="...package_name...PackageBasedActionConfigBuilder"/> <constant name="struts.convention.actionConfigBuilder" value="ActionConfigBuilder_2_3_8"/> <constant name="struts.convention.exclude.parentClassLoader" value="false" /> Maybe the suggested solution in this issue is better. However, there is still a bug in UrlSet in Struts2 2.3.12 and 2.3.14.) > Convention plugin doesn't find any Action classes in EAR deployment on > Weblogic 10 and 12 > ----------------------------------------------------------------------------------------- > > Key: WW-4055 > URL: https://issues.apache.org/jira/browse/WW-4055 > Project: Struts 2 > Issue Type: Bug > Components: Plugin - Convention > Affects Versions: 2.3.14 > Reporter: Stefan Reich > Fix For: 2.3.15 > > Attachments: PackageBasedActionConfigBuilder.patch > > > The weblogic container versions 10, 11 and 12 has a peculiar way of deploying > ear and war files. > It unpacks the ear and war file, and jars up the contents of WEB-INF classes > into a new file: WEB-INF/lib/_wl_cls_gen.jar. After that, all content from > WEB-INF/classes is deleted. > The consequence is that the classloader will return a URL to the > WEB-INF/classes directory when the plugin is searching for annotated classes, > but it will be empty, so this plugin would never find any Action classes. > I have a patch that has been verified to work on Weblogic 10 and 12. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira