You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tom van den Berge <to...@gmail.com> on 2007/03/22 13:43:44 UTC

User guide examples are broken

Hi,

I'm new to Axis, and I'm trying to get the examples in the user guide
working. Unfortunately, they are broken.

Building and deploying the sample service (MyService.aar) as explained in
section "Installing and testing client code" seems to work fine.

But running the client as explained fails:
axis2 org.apache.axis2.axis2userguide.Client results in "Exception in thread
"main" java.lang.NoClassDefFoundError:
org/apache/axis2/axis2userguide/Client".

Then I tried the approach as explained in the README.txt in the userguide
directory.  Deploying the service using "axis2server.bat" fails with the
following stacktrace:

"org.apache.axis2.deployment.DeploymentException: Processing Operations
Modules logging module is invalid or has not been deployed; nested exception
is:"

But since the deployment I mentioned first was successful
(http://localhost:8080/axis2/services/listServices
nicely lists the "MyService" service as Active) , this shouldn't be a big
problem. So I tried running the sample client against this service
deployment:
"ant run.client.blocking", resulting in:

"[java] org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules logging module is invalid or has not been deployed;
nested exception is:" <<huge stack trace following>>

I became a bit frustrated here :(
Then I found a number of bug reports, raising very similar issues:


https://issues.apache.org/jira/browse/AXIS2-2040
https://issues.apache.org/jira/browse/AXIS2-1815
 <https://issues.apache.org/jira/browse/AXIS2-2040>https://issues.apache.org/jira/browse/AXIS2-1700
 <https://issues.apache.org/jira/browse/AXIS2-2040>
Two of them are still open, and one of them is resolved. I've tried
today's (21 March) snapshot, but if fails compiling since it can't
find  org.apache.axiom.om.OMElement
, when running "ant run.client.blocking".

Then I followed the helpful advise of another user experiencing
similar problems
(http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html).
This allowed me to successfully deploy the "MyServiceWithModule.aar"
 but I really don't know if I need this service. What's the difference
between MyService and MyServiceWithModule, and which one is the client
application using?

Still, this did not result in a working client application.

Can somebody explain to me, in detail, how to get the user guide
(version 1.1.1) example working?

Or even better, can somebody make sure that the user guide examples
work out of the box? For people who are new to a technology (like
myself to Axis2), simple tutorials and samples are extremely valuable.
Not working
examples are extremely frustrating, and quickly result in loss of
confidence in the technology; "If they can't even get the examples
working....."

Thanks,
Tom

[Axis2] Re: User guide examples are broken

Posted by Davanum Srinivas <da...@gmail.com>.
deepal,

Can you please confirm that these problems are fixed in RC1?

thanks,
dims

On 3/26/07, Stadelmann Josef <jo...@winterthur.ch> wrote:
>
>
> My comment ++>
>
> -----Ursprüngliche Nachricht-----
> Von: Tom van den Berge [mailto:tom.vandenberge@gmail.com]
> Gesendet: Donnerstag, 22. März 2007 13:44
> An: axis-user@ws.apache.org
> Betreff: User guide examples are broken
>
>
> Hi,
>
> I'm new to Axis, and I'm trying to get the examples in the user guide
> working. Unfortunately, they are broken.
>
> Building and deploying the sample service (MyService.aar) as explained in
> section "Installing and testing client code" seems to work fine.
>
> But running the client as explained fails:   axis2
> org.apache.axis2.axis2userguide.Client results in
>  "Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/axis2/axis2userguide/Client".
>
> ++> use an IDE to launch your Client code. IDE's such as NetBeans or Eclips
> gives you some burden to learn how to use it.
> But otherwhise they manage many of the niffty tricky Classpath settings
> required to run your java code. So, are you able to build and debug the
> SOAPClient from userguide?
>
> Then I tried the approach as explained in the README.txt in the userguide
> directory.  Deploying the service using "axis2server.bat" fails with the
> following stacktrace:
>
> "org.apache.axis2.deployment.DeploymentException:
> Processing Operations Modules logging module is invalid or has not been
> deployed; nested exception is:"
>
> ++> copy from
> C:\axis2-1.1\repository\modules\saple-logging.mar to
> C:\Tomcat-5-5\webapps\axis2\WEB-INF\modules\logging.mar
>  then stop Tomcat; goto  C:\Tomcat-5-5\logs and clear the log files. Then
> resatrt Tomcat; and after a short period watch
> C:\Tomcat-5-5\logs\stdout_nnnnnn.log; you should now see
> that logging was deployed
>
> But since the deployment I mentioned first was successful
> (http://localhost:8080/axis2/services/listServices nicely
> lists the "MyService" service as Active) , this shouldn't be a big problem.
> So I tried running the sample client against this service deployment:
> "ant run.client.blocking", resulting in:
>
> ++> which sample client did you use?
>
> "[java] org.apache.axis2.deployment.DeploymentException:
> Processing Operations Modules logging module is invalid or has not been
> deployed; nested exception is:" <<huge stack trace following>>
>
> ++> make sure that logging.mar was deployed corectly (see above)
>
> I became a bit frustrated here :(
> Then I found a number of bug reports, raising very similar issues:
>
>
> https://issues.apache.org/jira/browse/AXIS2-2040
> https://issues.apache.org/jira/browse/AXIS2-1815
>
> https://issues.apache.org/jira/browse/AXIS2-1700
>
>
> Two of them are still open, and one of them is resolved. I've tried today's
> (21 March) snapshot, but if fails compiling since it can't find
> org.apache.axiom.om.OMElement
> , when running "ant run.client.blocking
> ".
>
> ++> I agee with you, some developers have a large amount of open bugs to
> fix.
>
>
> Then I followed the helpful advise of another user experiencing similar
> problems (
>
> http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html).
> This allowed me to successfully deploy the "MyServiceWithModule.aar"
>  but I really don't know if I need this service. What's the difference
> between MyService and MyServiceWithModule, and which one is the client
> application using?
>
> ++> look at the different service code. you want see a differences in java
> code. but then look at each service.xml and study the difference. You will
> see a few differences.
>
> 1. the name of the service is different; even if you would deploy the exact
> same java class you can refere to it by a different service name, given in
> service.xml
>
> 2. in service.xml the <parameter name="ServiceClass"
> locked="false">userguide.example1.MyService</parameter> is always different
>
> 3,. with .1 and .2 with have now a mapping from a service name to class
>
> 4. if your service likes to engage a module
>
> - <service name="MyServiceWithModule">
>
>
>   <description>This is a sample Web Service with a logging module
> engaged.</description>
>
>   <module ref="logging" />  so the logging.mar gets referenced here
>
> 5. Your client references the wanted service by an end point reference
> (toEpr) such as      private static String toEpr =
> http://alpha1:8080/axis2/rest/MyService;
>  and again, to which class MyService goes is stated in the service.xml file
> deployed with the MyService.aar for example.
>
> Still, this did not result in a working client application.
>
> Can somebody explain to me, in detail, how to get the user guide (version
> 1.1.1) example working?
>
> ++> I hope it helps a bit, but FLEXIBILITY such as offered with Axis2 has
> it's price in learning how to configure the system. OK, I agree, an
> out-of-box-working-example, would be good.
> BTW: what IDE are you using to develop your code. Did you attempt to use
> debugging technics and single step through axis2 client and service
> examples. Do so, you learn a lot.
>
> Or even better, can somebody make sure that the user guide examples work out
> of the box? For people who are new to a technology (like myself to Axis2),
> simple tutorials and samples are extremely valuable. Not working examples
> are extremely frustrating, and quickly result in loss of confidence in the
> technology; "If they can't even get the examples working....."
>
> Thanks,
> Tom
>
> Regards ++> Josef
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: User guide examples are broken

Posted by Tom van den Berge <to...@gmail.com>.
My response below...

On 3/26/07, Stadelmann Josef <jo...@winterthur.ch> wrote:
>
>  My comment ++>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Tom van den Berge [mailto:tom.vandenberge@gmail.com]
> *Gesendet:* Donnerstag, 22. März 2007 13:44
> *An:* axis-user@ws.apache.org
> *Betreff:* User guide examples are broken
>
> Hi,
>
> I'm new to Axis, and I'm trying to get the examples in the user guide
> working. Unfortunately, they are broken.
>
> Building and deploying the sample service (MyService.aar) as explained in
> section "Installing and testing client code" seems to work fine.
>
> But running the client as explained fails:   axis2
> org.apache.axis2.axis2userguide.Client results in
>  "Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/axis2/axis2userguide/Client".
>
> ++> use an IDE to launch your Client code. IDE's such as NetBeans or
> Eclips gives you some burden to learn how to use it.
> But otherwhise they manage many of the niffty tricky Classpath settings
> required to run your java code. So, are you able to build and debug the
> SOAPClient from userguide?
>
> First, I found out that the class org.apache.axis2.axis2userguide.Client
does not exist at all. The user guide probably gives this as an example.
Pretty confusing, since one paragraph ealier, it specifically describes how
to deploy the "MyService.aar". Why not describe how to run a client for this
service?

Running the clients from Eclipse is pretty simple, as you say. However, only
a few of the sample clients work.

The clients using the "MyServiceWithModule"  don't work, since I couldn't
get this service installed properly. More on this later.
Next to that, some of the clients using "MyService" don't work because of
some problem with an addressing module: "Unable to engage module :
addressing". My axis2 web app does have an addressing file in its modules
directory ("addressing-1.1.1.mar").
So in the end, I managed to get EchoBlockingClient, EchoNonBlockingClient
and PingClient working. (The last one doesn't produce any output at all, so
I assume it's working?).



Then I tried the approach as explained in the README.txt in the userguide
> directory.  Deploying the service using "axis2server.bat" fails with the
> following stacktrace:
>
> "org.apache.axis2.deployment.DeploymentException: Processing Operations
> Modules logging module is invalid or has not been deployed; nested exception
> is:"
>
> ++> copy from C:\axis2-1.1\repository\modules\saple-logging.mar to
> C:\Tomcat-5-5\webapps\axis2\WEB-INF\modules\logging.mar
>  then stop Tomcat; goto  C:\Tomcat-5-5\logs and clear the log files. Then
> resatrt Tomcat; and after a short period watch
> C:\Tomcat-5-5\logs\stdout_nnnnnn.log; you should now see that logging was
> deployed
>
> The trick here is how to obtain the logging.mar file. It's not contained
in the binary or war distribution; you have to build it yourself.
Unfortunately, running the samples/userguide/build.xml does not produce it;
you have to figure out yourself that you should run "ant generate.module" to
produce it -- this is not documented.

But even with the logging module installed in my axis2 web app, the
MyServiceWithModule still does not start up. The following appears in my
tomcat log file after starting up:

SEVERE: Invalid service  MyServiceWithModule.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


But since the deployment I mentioned first was successful
(http://localhost:8080/axis2/services/listServices
> nicely lists the "MyService" service as Active) , this shouldn't be a big
> problem. So I tried running the sample client against this service
> deployment:
> "ant run.client.blocking", resulting in:
>
> ++> which sample client did you use?
>
>
The ant target "run.client.blocking" simply starts
userguide.clients.EchoBlockingClient. It fails like this:

     [java] org.apache.axis2.deployment.DeploymentException: Processing
Operations Modules logging module is invalid or has not been deployed;
nested exception is:...

I can't explain this, since running this client from Eclipse works fine!
This client should not have any dependency on a logging module that is
installed on the server...

"[java] org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules logging module is invalid or has not been deployed;
> nested exception is:" <<huge stack trace following>>
>
> ++> make sure that logging.mar was deployed corectly (see above)
>
> I became a bit frustrated here :(
> Then I found a number of bug reports, raising very similar issues:
>
>
>
> https://issues.apache.org/jira/browse/AXIS2-2040
> https://issues.apache.org/jira/browse/AXIS2-1815
>
>  <https://issues.apache.org/jira/browse/AXIS2-2040>https://issues.apache.org/jira/browse/AXIS2-1700
>  <https://issues.apache.org/jira/browse/AXIS2-2040>
> Two of them are still open, and one of them is resolved. I've tried today's (21 March) snapshot, but if fails compiling since it can't find  org.apache.axiom.om.OMElement
> , when running "ant run.client.blocking
> ".
>
>
>
> ++> I agee with you, some developers have a large amount of open bugs to fix.
>
>
>
> Then I followed the helpful advise of another user experiencing similar problems ( <http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html>
>
> http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html). This
> allowed me to successfully deploy the "MyServiceWithModule.aar"
>  but I really don't know if I need this service. What's the difference
> between MyService and MyServiceWithModule, and which one is the client
> application using?
>
> ++> look at the different service code. you want see a differences in java
> code. but then look at each service.xml and study the difference. You will
> see a few differences.
>
> 1. the name of the service is different; even if you would deploy the
> exact same java class you can refere to it by a different service name,
> given in service.xml
>
> 2. in service.xml the <parameter name="*ServiceClass*" locked="*false*">*
> userguide.example1.MyService*</parameter> is always different
>
> 3,. with .1 and .2 with have now a mapping from a service name to class
>
> 4. if your service likes to engage a module
>  *-* <service name="*MyServiceWithModule*">
>  * * <description>*This is a sample Web Service with a logging module
> engaged.*</description>
>  * * <module ref="*logging*" />  so the logging.mar gets referenced here
>
> 5. Your client references the wanted service by an end point reference
> (toEpr) such as      private static String toEpr =
> http://alpha1:8080/axis2/rest/MyService;
>  and again, to which class MyService goes is stated in the service.xmlfile deployed with the
> MyService.aar for example.
>
> Still, this did not result in a working client application.
>
> Can somebody explain to me, in detail, how to get the user guide (version
> 1.1.1) example working?
>
> ++> I hope it helps a bit, but FLEXIBILITY such as offered with Axis2 has
> it's price in learning how to configure the system. OK, I agree, an
> out-of-box-working-example, would be good.
> BTW: what IDE are you using to develop your code. Did you attempt to use
> debugging technics and single step through axis2 client and service
> examples. Do so, you learn a lot.
>
>
I'm using Eclipse. I have not attempted to debug the client or server code
(yet).

I agree with you that this might be a very useful approach to learn the
details of Axis. However, I'm not at that stage yet. I'm completely new to
Axis, and I would like to see it working, preferrably with a simple example
that I can run myself. I don't want to start using debugging sessions in
order to get a simple example working.

If I want to buy a new car, I would like to walk around it to have a good
look, and drive a little while. I don't want to look under the hood and
under the car, and study all the mechanics, in order to judge if this car is
good enough for me.

With Axis, I'm dissappointed by the number of hoops I have to jump through,
to get even the simple things to work (generating the logging module,
finding out how to do that, installing the module, finding out how to run
the examples, etc., etc.). The documentation is simply incorrect at some
points, or does not explain very much. (However I have to say that it is
much better than some one year ago, when I also had a brief look at it).
There are quite some people, like yourself, who are very helpful by
answering questions, which is very good. But I think that the Axis project
would be helped much more if it provides simple, working examples, right out
of the box, including correct and concise documentation.

I'm convinced that the Axis project provides a wealth of excellent
functionality in the soap/web services area, but I feel that much more can
be won if more time was spent on these issues -- increase the product
quality. I realise it's not the most exciting job in the world, but it helps
tremendously to attract new users to Axis. Like I said before, there are
many people who will simply give up if the documentation is not clear and
the examples are not working.

I have to admit that in my experience, another popular soap stack (hosted by
codehaus:) is outperforming Axis --at least in this area--  quite easily.


I hope my message gets picked up by the Axis guys!

Thanks,
Tom

Or even better, can somebody make sure that the user guide examples work out
> of the box? For people who are new to a technology (like myself to Axis2),
> simple tutorials and samples are extremely valuable. Not working examples
> are extremely frustrating, and quickly result in loss of confidence in the
> technology; "If they can't even get the examples working....."
>
> Thanks,
> Tom
>
> Regards ++> Josef
>
>

AW: User guide examples are broken

Posted by Stadelmann Josef <jo...@winterthur.ch>.
My comment ++>

-----Ursprüngliche Nachricht-----
Von: Tom van den Berge [mailto:tom.vandenberge@gmail.com]
Gesendet: Donnerstag, 22. März 2007 13:44
An: axis-user@ws.apache.org
Betreff: User guide examples are broken


Hi,

I'm new to Axis, and I'm trying to get the examples in the user guide working. Unfortunately, they are broken.

Building and deploying the sample service (MyService.aar) as explained in section "Installing and testing client code" seems to work fine. 

But running the client as explained fails:   axis2 org.apache.axis2.axis2userguide.Client results in  
 "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/axis2userguide/Client". 
 
++> use an IDE to launch your Client code. IDE's such as NetBeans or Eclips gives you some burden to learn how to use it. 
But otherwhise they manage many of the niffty tricky Classpath settings required to run your java code. So, are you able to build and debug the SOAPClient from userguide?  

Then I tried the approach as explained in the README.txt in the userguide directory.  Deploying the service using "axis2server.bat" fails with the following stacktrace:

"org.apache.axis2.deployment.DeploymentException: Processing Operations Modules logging module is invalid or has not been deployed; nested exception is:"  
 
++> copy from C:\axis2-1.1\repository\modules\saple-logging.mar to  C:\Tomcat-5-5\webapps\axis2\WEB-INF\modules\logging.mar
 then stop Tomcat; goto  C:\Tomcat-5-5\logs and clear the log files. Then resatrt Tomcat; and after a short period watch C:\Tomcat-5-5\logs\stdout_nnnnnn.log; you should now see that logging was deployed

But since the deployment I mentioned first was successful ( http://localhost:8080/axis2/services/listServices  <http://localhost:8080/axis2/services/listServices> nicely lists the "MyService" service as Active) , this shouldn't be a big problem. So I tried running the sample client against this service deployment: 
"ant run.client.blocking", resulting in: 
 
++> which sample client did you use? 

"[java] org.apache.axis2.deployment.DeploymentException: Processing Operations Modules logging module is invalid or has not been deployed; nested exception is:" <<huge stack trace following>>  
 
++> make sure that logging.mar was deployed corectly (see above) 

I became a bit frustrated here :(
Then I found a number of bug reports, raising very similar issues:

 <https://issues.apache.org/jira/browse/AXIS2-2040> 



https://issues.apache.org/jira/browse/AXIS2-2040
https://issues.apache.org/jira/browse/AXIS2-1815 <https://issues.apache.org/jira/browse/AXIS2-2040> 


https://issues.apache.org/jira/browse/AXIS2-1700 <https://issues.apache.org/jira/browse/AXIS2-2040> 



Two of them are still open, and one of them is resolved. I've tried today's (21 March) snapshot, but if fails compiling since it can't find  org.apache.axiom.om.OMElement
, when running "ant run.client.blocking  

".  
 
++> I agee with you, some developers have a large amount of open bugs to fix.
 

Then I followed the helpful advise of another user experiencing similar problems (  <http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html> 
http://www.mail-archive.com/axis-dev@ws.apache.org/msg26819.html). This allowed me to successfully deploy the "MyServiceWithModule.aar"
 but I really don't know if I need this service. What's the difference between MyService and MyServiceWithModule, and which one is the client application using? 
 
++> look at the different service code. you want see a differences in java code. but then look at each service.xml and study the difference. You will see a few differences.
 
1. the name of the service is different; even if you would deploy the exact same java class you can refere to it by a different service name, given in service.xml
 
2. in service.xml the <parameter name="ServiceClass" locked="false">userguide.example1.MyService</parameter> is always different
 
3,. with .1 and .2 with have now a mapping from a service name to class
 
4. if your service likes to engage a module 

 <file:///C:/Documents%20and%20Settings/c770817/Local%20Settings/Temp/services.xml#> - <service name="MyServiceWithModule">
  <description>This is a sample Web Service with a logging module engaged.</description> 
  <module ref="logging" />  so the logging.mar gets referenced here
 
5. Your client references the wanted service by an end point reference (toEpr) such as      private static String toEpr = http://alpha1:8080/axis2/rest/MyService; 
 and again, to which class MyService goes is stated in the service.xml file deployed with the MyService.aar for example.

Still, this did not result in a working client application.

Can somebody explain to me, in detail, how to get the user guide (version 1.1.1) example working?  
 
++> I hope it helps a bit, but FLEXIBILITY such as offered with Axis2 has it's price in learning how to configure the system. OK, I agree, an out-of-box-working-example, would be good.
BTW: what IDE are you using to develop your code. Did you attempt to use debugging technics and single step through axis2 client and service examples. Do so, you learn a lot. 

Or even better, can somebody make sure that the user guide examples work out of the box? For people who are new to a technology (like myself to Axis2), simple tutorials and samples are extremely valuable. Not working examples are extremely frustrating, and quickly result in loss of confidence in the technology; "If they can't even get the examples working....."

Thanks,
Tom 
 
Regards ++> Josef