English 中文(简体)
Why does Tomcat error when I change the keystore?
原标题:

I have a problem with axis2-client inside JAX-WS web service. This JAX-WS web service is inside Tomcat container. Keystorefile is retrieved dynamically from database. When I start Tomcat I can use ws-client normally and it works fine, but if I change the keystore it fails with stacktrace shown below. If I restart Tomcat it works fine. Does rampart or tomcat have some static variables that aren t flushed until Tomcat is restarted? I use rampart-module 1.3 to sign message for a secure web service. I think inflow and outflow configs are correct since I have been printing them in the log.

The Stacktrace in Tomcat Catalina log:

 org.apache.axis2.AxisFault: Error during Signature: ; nested exception is:
        org.apache.ws.security.WSSecurityException: General security error (No certificates for user user1 were found for signature)
        at org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:67)
        at org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:72)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:416)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
最佳回答

Ok I found out the solution. The trick was to use PolicyBased configuration. I was using old ParameterBased configuration. Here is a link to great blog by Thilina:

How to build rampart-config programmatically..

Remember to define policy.xml file when following this tutorial. This was something that I first forgot to do :)

问题回答

暂无回答




相关问题
Eclipse Generated Web Service Client Extremely Slow

A little up front info: I have a SOAP service (hosted using JAX-WS (Endpoint class), but I don t think that is important). I can connect to and use the web service just fine with Visual Studio ...

Changing the color of an axis

Is there a way to change the color of an axis (not the ticks) in matplotlib? I have been looking through the docs for Axes, Axis, and Artist, but no luck; the matplotlib gallery also has no hint. Any ...

Passing parameters to AXIS web service

I have an AXIS servlet which deployed on an apache tomcat server on windows. I wrote a web service which I want to run on AXIS. When I want to deploy my web service, I make a jar file from the ...

Why does Tomcat error when I change the keystore?

I have a problem with axis2-client inside JAX-WS web service. This JAX-WS web service is inside Tomcat container. Keystorefile is retrieved dynamically from database. When I start Tomcat I can use ws-...

Rotating axis labels in R

How do I make a (bar) plot s y axis labels parallel to the X axis instead of parallel to the Y axis?

In-process SOAP service server for Java

OK, I am developing a program which will be deployed to lots of machines (Windows, Linux, AIX, z/Linux, openVMS, etc.). I want that application to contain a SOAP web service, but I don t want to ...

Buliding a WAR that uses Axis2 + Rampart for Tomcat

I m trying to build an axis-based web service with rampart for security, and I ve been hoping to deploy a single war to tomcat, rather than installing axis and deploying within axis. (I m not fixed ...

Axis 1.4 AxisFault Premature end of file

I get this error when I use my autogenerated ServiceBindingStub.java. WebService side is working ok, so this error must be in code, but code is autogenerated, so I cannot know why it doesn t work. ...

热门标签