Rasika Perera Rasika Perera - 1 month ago 16
Apache Configuration Question

Apache Axis with Rampart modules giving Deployment Exception

I am trying to add Apache Rampart Modules to the Apache Axis server. But I am getting following error.

[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


I using Apache Axis2 1.6.2 and Apache Rampart 1.6.2. Also tried the this but no luck. Any clue on this error?

Answer

Finally I found the answer and posting here hoping someone will find this useful.

According to the rampart quick start guide in here; You need to follow two steps;

  1. Copy all the module files to in the modules directory of Rampart binary distribution to Axis2 modules directory($AXIS_HOME/repository/modules/)
  2. Copy all the libraries in the lib directory of Rampart binary distribution to Axis2 lib directory($AXIS2_HOME/lib).

In my case; I missed the step 2. Thus, on the error stack in the deep it showing Deployment Exception is caused by the ClassNotFound Exception.