tomcat/struts startup throwing ClassNotFoundException for ja



我遇到一个奇怪的问题。当我用我的webapp (struts 2)启动tomcat时,我在catalina.out中看到了这一点。它在我的应用程序的类目录中寻找java.io.File,当然找不到它。它还在寻找许多其他核心java类,如Comparator。

有谁知道它为什么在那里看吗?在堆栈跟踪中,我看到opensymphony,这意味着它是Struts问题,一种猜测是它是涉及类加载器的配置问题,但我仍然感到困惑。

在下面的堆栈跟踪中,我用"替换了路径。

    12:50:12.547 [main] DEBUG c.o.x.u.c.FileResourceStore - Unable to read file [java/io/File.class]
java.io.FileNotFoundException: /home/<company name>/WEB-INF/classes/java/io/File.class (No such file or directory)
    at java.io.FileInputStream.open(Native Method) ~[na:1.6.0_20]
    at java.io.FileInputStream.<init>(Unknown Source) ~[na:1.6.0_20]
    at com.opensymphony.xwork2.util.classloader.FileResourceStore.read(FileResourceStore.java:33) ~[xwork-core-2.1.6.jar:na]
    at com.opensymphony.xwork2.util.classloader.ResourceStoreClassLoader.fastFindClass(ResourceStoreClassLoader.java:31) [xwork-core-2.1.6.jar:na]
    at com.opensymphony.xwork2.util.classloader.ResourceStoreClassLoader.loadClass(ResourceStoreClassLoader.java:45) [xwork-core-2.1.6.jar:na]

我们需要更多的信息。你可以张贴你的struts.xml或(如果有一个)你的struts.properties?此外,请注意您运行的是旧版本的S2,如果我没记错的话,它在您发布的一些类中改变了一些东西。

最新更新