You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Manuela Vergerio <ma...@teaminformatica.ch> on 2014/05/14 11:33:17 UTC

[Axis2] Exception in loading logging module

Good morning,

 

I'm a software developer and I'm dealing with an open source Java Trasmitter
which sends and receives signed and encrypted xml files using SOAP envelope
(README.html in attachment is the documentation I've got and pom.xml is the
main maven xml compiler instructions).

 

I was able to run Java Trasmitter through Eclipse, I create a simple main
class (Lancia_Trasmitter.java) which just Ping the test server, here is the
log from Eclipse:

 

[INFO] Configuring client

[INFO] No services directory was found under
C:\Eclipse_Project\TRASMITTER\transmitter\target\test-classes\axis.

[INFO] Deploying module: addressing-1.6.2 -
file:/C:/Eclipse_Project/TRASMITTER/Jars/axis2-1.6.2.jar

[INFO] Deploying module: rahas-1.1 -
file:/C:/Eclipse_Project/TRASMITTER/Jars/axis2-rahas-1.1.jar

[INFO] Deploying module: metadataExchange-1.6.2-classpath-module -
file:/C:/Eclipse_Project/TRASMITTER/Jars/mex-1.6.2-classpath-module.jar

[INFO] Deploying module: logging-3.0.0 -
file:/C:/Eclipse_Project/TRASMITTER/Jars/logging-3.0.0.mar

[INFO] Deploying module: rampart-1.6.2 -
file:/C:/Eclipse_Project/TRASMITTER/Jars/rampart-1.6.2.mar

[INFO] Deploying module: rampart-3.0.0 -
file:/C:/Eclipse_Project/TRASMITTER/Jars/rampart-3.0.0.mar

[INFO] Configuring endpoint to
https://tst.itserve.ch/itserve/lohnstandard/testing/refapps2/receiver-webser
vice/20130514-0.0/SalaryDeclarationService

[INFO] Antwort Ping: <?xml version="1.0" encoding="UTF-8"
standalone="yes"?><PingResponse
xmlns:ns2="http://www.swissdec.ch/schema/sd/20130514/SalaryDeclarationContai
ner"
xmlns="http://www.swissdec.ch/schema/sd/20130514/SalaryDeclarationServiceTyp
es"
xmlns:ns3="http://www.swissdec.ch/schema/sd/20130514/SalaryDeclaration"><Sys
temDateTime>2014-05-14T10:40:16.177+02:00</SystemDateTime></PingResponse>

 

 

Now I need to run the same Lancia_Trasmitter.java class outside Eclipse. In
order to reach my goal I create a jar file with all java classes,
TI_Trasmitter.jar, and this are instructions I use from command line:
 
cd C:\WDProjet 14\Paghe_DEC\Trasmitter

 

"C:/Program Files/Java/jdk1.7.0_55/bin/TEST_SWISSDEC" -cp
.;./activation-1.1.jar;./antlr-2.7.7.jar;./axiom-api-1.2.13.jar;./axiom-dom-
1.2.13.jar;./axiom-impl-1.2.13.jar;./axis2-adb-codegen-1.6.2.jar;./axis2-ant
-plugin-1.6.2.jar;./axis2-clustering-1.6.2.jar;./axis2-codegen-1.6.2.jar;./a
xis2-corba-1.6.2.jar;./axis2-fastinfoset-1.6.2.jar;./axis2-jaxbri-1.6.2.jar;
./axis2-jibx-1.6.2.jar;./axis2-json-1.6.2.jar;./axis2-metadata-1.6.2.jar;./a
xis2-mtompolicy-1.6.2.jar;./axis2-saaj-1.6.2.jar;./axis2-soapmonitor-servlet
-1.6.2.jar;./axis2-spring-1.6.2.jar;./bcel-5.1.jar;./commons-cli-1.2.jar;./c
ommons-codec-1.3.jar;./commons-fileupload-1.2.jar;./commons-httpclient-3.1.j
ar;./commons-io-1.4.jar;./commons-logging-1.1.1.jar;./esapi-2.0GA.jar;./log4
j-1.2.15.jar;./bcprov-jdk15-140.jar;./commons-collections-3.1.jar;./commons-
lang-2.3.jar;./esapi-2.0GA.jar;./joda-time-1.6.2.jar;./opensaml-2.5.1-1.jar;
./openws-1.4.2-1.jar;./rampart-core-1.6.2.jar;./rampart-policy-1.6.2.jar;./r
ampart-trust-1.6.2.jar;./slf4j-api-1.5.5.jar;./slf4j-jcl-1.5.5.jar;./velocit
y-1.5.jar;./wss4j-1.6.4.jar;./xmlsec-1.4.6.jar;./xmltooling-1.3.2-1.jar;./ax
is2-rahas-1.1.jar;./axis2-jaxws-1.6.2.jar;./axis2-java2wsdl-1.6.2.jar;./axis
2-xmlbeans-1.6.2.jar;./httpcore-4.0.jar;./woden-api-1.0M9.jar;./commons-http
client-3.1-rc1.jar;./axis2-transport-http-1.6.2.jar;./axis2-transport-local-
1.6.2.jar;./axis2-adb-1.6.2.jar;./neethi-3.0.1.jar;./XmlSchema-1.4.7.jar;./w
sdl4j-1.6.2.jar;./transmitter-3.0.0.jar;./axis2-1.6.2;./axis2-kernel-1.6.2.j
ar;./axiom-api-1.2.14.jar;./axiom-dom-1.2.14.jar;./axiom-impl-1.2.14.jar;./c
ommons-lang-2.3.jar;./commons-logging-1.1.3.jar;./log4j.jar;./mail.jar;./jun
it-4.11.jar;./TI_Trasmitter.jar
ch/swissdec/samples/transmitter/Lancia_Trasmitter

 

Here exceptions I got:

[INFO] Configuring client

[INFO] Deploying module: rahas-1.1 - file:/C:/WDProjet
14/Paghe_DEC/Trasmitter/axis2-rahas-1.1.jar

[INFO] Deploying module: logging-3.0.0 - file:/C:/WDProjet
14/Paghe_DEC/Trasmitter/logging-3.0.0.mar

[INFO] Deploying module: rampart-3.0.0 - file:/C:/WDProjet
14/Paghe_DEC/Trasmitter/rampart-3.0.0.mar

[ERROR] Error loading logging module

ch.swissdec.samples.transmitter.TransmitterException: Error loading logging
module

        at
ch.swissdec.samples.transmitter.AbstractTransmitter.configure(AbstractTransm
itter.java:92)

        at
ch.swissdec.samples.transmitter.AbstractTransmitter.createServiceStub(Abstra
ctTransmitter.java:115)

        at
ch.swissdec.samples.transmitter.PingTransmitter.ping(PingTransmitter.java:30
)

        at
ch.swissdec.samples.transmitter.PingTest.testPing(PingTest.java:15)

        at
ch.swissdec.samples.transmitter.Lancia_Trasmitter.main(Lancia_Trasmitter.jav
a:29)

Caused by: org.apache.axis2.phaseresolver.PhaseException: Did not find the
desired phase 'Logging' while deploying handler 'InFlowLogHandler'.

        at
org.apache.axis2.phaseresolver.PhaseHolder.addHandler(PhaseHolder.java:75)

        at
org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToFlow(PhaseResolve
r.java:68)

        at
org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseRe
solver.java:104)

        at
org.apache.axis2.phaseresolver.PhaseResolver.engageModuleToOperation(PhaseRe
solver.java:110)

        at
org.apache.axis2.description.AxisOperation.onEngage(AxisOperation.java:152)

        at
org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.ja
va:478)

        at
org.apache.axis2.description.AxisService.onEngage(AxisService.java:779)

        at
org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.ja
va:478)

        at
org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.ja
va:439)

        at
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:361)

        at
ch.swissdec.samples.transmitter.AbstractTransmitter.configure(AbstractTransm
itter.java:90)

        ... 4 more

Exception in thread "main" junit.framework.AssertionFailedError: Error
loading logging module

        at junit.framework.Assert.fail(Assert.java:57)

        at junit.framework.TestCase.fail(TestCase.java:227)

        at
ch.swissdec.samples.transmitter.PingTest.testPing(PingTest.java:31)

        at
ch.swissdec.samples.transmitter.Lancia_Trasmitter.main(Lancia_Trasmitter.jav
a:29)

 

I attach:

-          AbstractTransmitter.java (the error is at line 92
AbstractTransmitter.java:92)

-          LoggingModule.java

-          LogHandler.java

-          logging-3.0.0.mar  (the result I obtain after compiling logging
part with maven)

 

 

I really don't understand why I always got error:  "Error loading logging
module", what's wrong in my command line??

 

Thanks very much in advance for your help!

Best Regards,

Manuela Vergerio

Senior Software Analyst & Developer

 



Via Roncaglia 3 | CH-6883 Novazzano, Switzerland

Tel +41 91 922 92 81 | fax +41 91 923 27 56 | Skype: manuela_team

 <http://www.teaminformatica.ch/> http://www.teaminformatica.ch

 

This message, including attachments, is strictly confidential and subjected
to applicable laws. If you receive this message by mistake, please notify
the sender then delete and destroy the original message, any attachment and
all copies. You should not copy, forward, and/or disclose the message, in
whole or in part, without permission of sender.

P Please consider the environment before printing this email, make sure that
it's necessary.


Re: [Axis2] Exception in loading logging module

Posted by "robertlazarski ." <ro...@gmail.com>.
On Wed, May 14, 2014 at 6:33 AM, Manuela Vergerio <
manuela.vergerio@teaminformatica.ch> wrote:

> Caused by: org.apache.axis2.phaseresolver.PhaseException: Did not find the
> desired phase 'Logging' while deploying handler 'InFlowLogHandler'.
>
>         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:152)
>
>         at
> org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:478)
>
>         at
> org.apache.axis2.description.AxisService.onEngage(AxisService.java:779)
>
>         at
> org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:478)
>
>         at
> org.apache.axis2.description.AxisDescription.engageModule(AxisDescription.java:439)
>
>         at
> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:361)
>
>         at
> ch.swissdec.samples.transmitter.AbstractTransmitter.configure(AbstractTransmitter.java:90)
>
>         ... 4 more
>
> Exception in thread "main" junit.framework.AssertionFailedError: Error
> loading logging module
>
>
I would try this outside JUnit since it makes the classloader messy. The
main issue though is it seems your axis2.xml in this case is missing '<phase
name="loggingPhase"/> '  . As a client you may be running a default
axis2.xml without the phase defined. See this link for an example of
setting up axis2.xml for logging:

http://axis.apache.org/axis2/java/core/docs/modules.html#MyService_with_a_Logging_Module

- R