Tomcat application container for WebLogic The pit encountered by the application container:
Caused by:error loading configuration file Struts.xml-[unknown location]
at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments (Xmlconfigurationprovider.java : 147)
at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init ( xmlconfigurationprovider.java:110)
at Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (defaultconfiguration.java:168)
at Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:55)
... More
caused By:unable to attain a urlclassloader-[unknown location]
at Com.opensymphony.xwork2.util.ClassPat Hfinder.findmatches (classpathfinder.java:80)
at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles ( xmlconfigurationprovider.java:940)
at Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments (Xmlconfigurationprovider.java : 143)
The reason is Struts.xml configuration file include wildcard characters *
How many files are there to include, and do not use wildcard characters.
Because I tracked the code, I found that the error in the Xwork Classpathfinder.findmatches method to obtain the current ClassLoader way is classloader loader = Thread.CurrentThread (). Getcontextclassloader ();
A URLClassLoader instance is taken in the tomcat environment, and underneath the WebLogic is Weblogic.utils.classloaders.ChangeAwareClassLoader, WebLogic has its own classloader mechanism, which leads to errors.
I think to solve such problems unless weblogic themselves to solve, such as inheriting URLClassLoader and so on.
If you try to solve it yourself, even if you solve it, there may be problems like that. Therefore, in the most common way, honestly put all of the files are one of the include in the bar.