Hi Rogan,

I don't know why you'd be experiencing this problem, but at least under Tomcat you probably want to have the .mar files in the /WEB-INF/modules directory, rather than the /WEB-INF/lib directory. My article at http://www.ibm.com/developerworks/java/library/j-jws4/index.html discusses the basics of setting up Axis2 with Rampart, including generating the axis2.war file with Rampart installed. Here's the relevant part:

/To use the Rampart code in an Axis2 server installation, you need to create a new axis2.war file, one that includes the added Rampart .jar and .mar files. You can use the Ant build.xml provided in the webapp directory to create axis2.war, provided you make one change: delete the line |<exclude name="axis2-codegen*.jar"/>| near the end of the file. Then open a console to the Axis2 webapp directory and run |ant|. After the build.xml runs, you can find the created axis2.war Web application in the Axis2 installation dist directory./

Once you've got the axis2.war you should be able to deploy that to Tomcat without a problem. If you *do* have problems, in my experience the exception stack traces in the Tomcat logs will always give you pointers.

That said, I haven't tried using Rampart 1.4 with Axis2 1.5. I'd thought there were incompatibilities between the two, but some recent Rampart discussions seemed to indicate this would work. If Rampart 1.4 ahs been working for you with Axis2 1.5 under Jetty I don't know any reason why it also wouldn't work under Tomcat.

 - Dennis

--
Dennis M. Sosnoski
Java XML and Web Services
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Rogan Creswick wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I've been trying to use axis2 with rampart to work under Tomcat, and I
keep running into the same problem:

The rampart module doesn't seem to be working when axis is running under
  Tomcat.  Everything seems to work when run either under jetty as a war
(with maven, as part of our larger build process) or when we
build an aar, deploy that under $AXIS2_HOME/repository/services and run
$AXIS2_HOME/bin/axis2server.sh

When run under tomcat, any service that uses rampart is listed as
faulty, and the axis admin page lists rampart-1.4 as a "Faulty Module",
with no specific details as to what happened.

I've also been unable to find an axis2.log file anywhere, and the tomcat
logs do not provide any insight.

I'm using Axis2 1.5 and rampart 1.4, with Tomcat 5.5, hosted on Ubuntu.

So far, I've tried hosting a self-contained .war file under tomcat on a
system with no axis or rampart components external to the war (this is
my ideal deployment situation, if possible).  I've tried manually
building the war so that the rampart/rahas .mar files are in the war's
lib directory (this was necessary to get Jetty to launch the war
properly without an expanded version, but had no effect on deployment
under Tomcat.)

I've most recently tried following these directions:

http://wso2.org/library/knowledge-base/run-rampart-samples-apache-tomcat

with the result described above -- when I try to visit the service from
the axis2 service list (http://localhost:8180/axis2/listServices/) I see
this error in the browser: (this is produced with the Rampart sample 03
aar.)


This Web axisService has deployment faults

Error: org.apache.axis2.deployment.DeploymentException: The rampart
module is not valid or has not been deployed. at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:151)
at
org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:81)
at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:663)
at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:338)
at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241)
at
org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131)
at
org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:284)
at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:525)
at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:443)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:127)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595) Caused by:
org.apache.axis2.deployment.DeploymentException: The rampart module is
not valid or has not been deployed. at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:431)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:102)
at
org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:144)
... 25 more Caused by: org.apache.axis2.deployment.DeploymentException:
The rampart module is not valid or has not been deployed. at
org.apache.axis2.deployment.ServiceBuilder.processModuleRefs(ServiceBuilder.java:678)
at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:327)
... 27 more Caused by: org.apache.axis2.deployment.DeploymentException:
The rampart module is not valid or has not been deployed. at
org.apache.axis2.deployment.ServiceBuilder.processModuleRefs(ServiceBuilder.java:670)
... 28 more


I'm going a bit nuts with this problem -- I've been googling and trying
different combinations of configuration for three days straight, and
I've hardly made any progress at all.  Any help would be greatly
appreciated!

Thanks,
Rogan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr8nHgACgkQd6evq+e7lOB0/wCgt+7E/IvJbor15qWYjTAgr6fl
30gAoNbpRiuuN860w62vW3EJ3i5/dx/Q
=XRbN
-----END PGP SIGNATURE-----

Reply via email to