我正在尝试将Apache Rampart模块添加到Apache Axis服务器。但是我得到以下错误。

[ERROR] The rahas-1.6.2.mar module, which is not valid, caused org.apache.rahas.Rahas
org.apache.axis2.deployment.DeploymentException: org.apache.rahas.Rahas
    at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:527)
    ... more
Caused by: java.lang.ClassNotFoundException: org.apache.rahas.Rahas
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
    at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:70)
    ... 14 more

[ERROR] The rampart-1.6.2.mar module, which is not valid, caused org.apache.rampart.Rampart
org.apache.axis2.deployment.DeploymentException: org.apache.rampart.Rampart
    ... more
Caused by: java.lang.ClassNotFoundException: org.apache.rampart.Rampart
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
    at org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.java:70)
    ... 14 more


我使用Apache Axis2 1.6.2和Apache Rampart 1.6.2。还尝试了this但没有运气。关于此错误有任何线索吗?

最佳答案

最后,我找到了答案,并在此处发布,希望有人会觉得有用。

根据here中的raftart快速入门指南;您需要遵循两个步骤;


将所有模块文件复制到Rampart二进制文件的modules目录中
分配给Axis2模块
目录($ AXIS_HOME / repository / modules /)
复制Rampart的lib目录中的所有库
二进制分发到Axis2库目录($ AXIS2_HOME / lib)。


就我而言我错过了步骤2。因此,在较深的错误堆栈中,显示Deployment Exception的原因是ClassNotFound Exception

07-25 23:46