Tuesday, August 18, 2009

org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'Security' while deploying handler 'PolicyBasedSecurityOutHandler'

Exception :
org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'Security' while deploying handler 'PolicyBasedSecurityOutHandler'. 
at org.apache.axis2.phaseresolver.PhaseHolder.addHandler(PhaseHolder.java:75)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToFlow(PhaseResolver.java:68)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseResolver.java:104) at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseResolver.java:110)
at org.apache.axis2.description.AxisOperation.onEngage(AxisOperation.java:158)
at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:490) at org.apache.axis2.description.AxisService.onEngage(AxisService.java:788)
at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:490) at org.apache.axis2.description.AxisServiceGroup.onEngage(AxisServiceGroup.java:134)
at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:490) at org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:453)
at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:323) at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:293)
at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:175)
at org.apache.axis2.client.ServiceClient.(ServiceClient.java:143)
Root Cause :
"Security" phase is not defined under "OutFaultFlow" in axi2.xml - which is required [by default this should be there]

Solution :
Define "Security" phase under "OutFaultFlow" in axi2.xml

<phaseOrder type="OutFaultFlow">
   <phase name="soapmonitorPhase"/>
   <phase name="OperationOutFaultPhase"/>
   <phase name="RMPhase"/>
   <phase name="PolicyDetermination"/>
   <phase name="MessageOut"/>
   <phase name="Security"/>
</phaseOrder>

2 comments:

Thiam Teck (1983 - ?)

Great tips! You save me a day :D

manojkumar

I am getting securityConfig phase exception:
Caused by: java.lang.IllegalStateException: org.apache.axis2.phaseresolver.PhaseException: Did not find the desired phase 'securityConfig' while deploying handler 'SecurityConfigInHandler'.
at com.ibm.b2b.comms.as4.core.axis.AS4AxisDeployer.(AS4AxisDeployer.java:346)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:539)
at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:270)
at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:959)
at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:327)
... 47 more

Post a Comment