Hi there,
I'm trying to add the sample logging module to my service (server-side) as described in http://ws.apache.org/axis2/1_0/userguide4.html#MyService_with_a_Logging_Module
. However I run into some probelms -- anyone can shed some light on this ? That would be most appreciated.
It looks like some crucial parts are missing in this otherwise excellent documentation: where sample configuration files are given, precisely the part described is usually not there ! Even when described as "in green", I can't find it ..
Anyway, trying to do it gives me this error at server startup time. (I'd moved the logging classes to a package named 'test', recreated logging.mar, and renamed logging.mar to logging-1.0.mar as per another mail thread in this list).
[10 Jul 2006 15:09:46] ERROR org.apache.axis2.deployment.DeploymentEngine.doDeploy():636 - Invalid service MyService.aar due to Invalid phases
please recheck axis2.xml loggingPhase for the handler InFlowLogHandler
org.apache.axis2.phaseresolver.PhaseException: Invalid phases please recheck axis2.xml loggingPhase for the handler InFlowLogHandler
at org.apache.axis2.phaseresolver.PhaseHolder.addHandler(PhaseHolder.java
:66)
at org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseResolver.java:191)
at org.apache.axis2.description.AxisOperation.engageModule(AxisOperation.java:128)
. . . etc.
after exploding the logging-1.0.mar so that the classes are unpacked into this application's classes directory (running in WebLogic), this error disappears, but now I see repeatedly this message at server startup time, and the logging does not work (extra debug statements with ### added by me):
[10 Jul 2006 15:20:49 ] DEBUG test.LoggingModule): 31 - #################### init ##################
Retrieving document at ''.
[10 Jul 2006 15:20:50] DEBUG test.LogHandler(): 33 - #################### getName ##################
[10 Jul 2006 15:20:50] DEBUG org.apache.axis2.engine.Phase.addHandler():113 - Handler null added to Phase loggingPhase
I have axis2.xml like
. . .
<phaseOrder type="inflow">
<!-- System pre defined phases -->
<phase name="Transport">
<handler name="RequestURIBasedDispatcher" class="org.apache.axis2.engine.RequestURIBasedDispatcher
">
<order phase="Dispatch"/>
</handler>
<handler name="SOAPActionBasedDispatcher" class="org.apache.axis2.engine.SOAPActionBasedDispatcher
">
<order phase="Dispatch"/>
</handler>
</phase>
<phase name="Security"/>
<phase name="PreDispatch"/>
<phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
<handler name="AddressingBasedDispatcher" class="org.apache.axis2.engine.AddressingBasedDispatcher
">
<order phase="Dispatch"/>
</handler>
<handler name="SOAPMessageBodyBasedDispatcher" class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher
">
<order phase="Dispatch"/>
</handler>
<handler name="InstanceDispatcher" class="org.apache.axis2.engine.InstanceDispatcher
">
<order phase="PostDispatch"/>
</handler>
</phase>
<!-- System pre defined phases -->
<!-- After Postdispatch phase module author or or service author can add any phase he want -->
<phase name="OperationInPhase"/>
<phase name="loggingPhase">
<handler name="InFlowLogHandler" class="test.LogHandler"> <!-- I changed the package for the logging handler to "test" -->
<order phase="Dispatch"/>
</handler>
</phase>
</phaseOrder>
. . .
and an services.xml like this
<serviceGroup>
<service name="MyService">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out
" class="com.xxx.MyServiceMessageReceiverInOut"/>
</messageReceivers>
<module ref="logging"/>
<parameter locked="false" name="ServiceClass">
com.xxx.MyServiceSkeleton</parameter>
<operation name="MyRQ" mep="http://www.w3.org/2004/08/wsdl/in-out">
<actionMapping>myAction</actionMapping>
</operation>
</service>
</serviceGroup>
and inside the logging-1.0.mar, a module.xml like this :
<module name="logging" class="test.LoggingModule">
<inflow>
<handler name="InFlowLogHandler" class="test.LogHandler">
<order phase="loggingPhase"/>
</handler>
</inflow>
<outflow>
<handler name="OutFlowLogHandler" class="test.LogHandler">
<order phase="loggingPhase"/>
</handler>
</outflow>
<Outfaultflow>
<handler name="FaultOutFlowLogHandler" class="test.LogHandler">
<order phase="loggingPhase"/>
</handler>
</Outfaultflow>
<INfaultflow>
<handler name="FaultInFlowLogHandler" class="test.LogHandler">
<order phase="loggingPhase"/>
</handler>
</INfaultflow>
</module>
Any help is greatly appreciated !
- [Axis2] Invalid phases please recheck axis2.xml, handler... heikki
- Re: [Axis2] Invalid phases please recheck axis2.xml... Deepal Jayasinghe
