Using ant to run the client may be OK for this sample but I wonder how the 
other folks using Windows get it done without using ant (or any other build 
tool).

In my "reality", having a build tool to run an app client does not make much 
sense. I guess I like better runtime and development environment separated.

Cheers!
Hernan

Lasantha Ranaweera wrote:
Hi,

Thanks for the info.

I have no idea on this WARNING at the moment. Let me explore it bit more &
get back to you if I find something interesting.

As you noticed my initial idea was to setting up the classpath of the
application client using MANIFEST file of the jar archive. Eventhough it
works in Linux environment gave problems in the Windows. I am still
wondering why it doesn't pickup the jar files & not found a solution for
that too :(. So I thought putting big effort to get rid this problem is
not such good idea since still we are using Ant in our sample apps anyway.

What do you think?

Thanks,
Lasantha

BTW, I also updated the doc and attachments. If you need to do any update
pls use the copy from the cwiki.

BTW2, is the any other way to run the client without using ant?

Cheers!

Hernan

Hernan Cunico wrote:
Lasantha,
I had to do some modifications to the dep plans but the client now
works. However I do see a warning, any idea?

D:\Calculator>ant run-client -Dval1=1 -Dval2=12
Buildfile: build.xml

run-client:
    [java] Working directory ignored when same JVM is used.
    [java] Feb 8, 2007 10:06:05 AM org.apache.axis.utils.JavaUtils
isAttachmentSupported
    [java] WARNING: Unable to find required classes
(javax.activation.DataHandler and javax.mail.internet.MimeMultipart).
Attachment support is disabled.
    [java] Sum of 1 and 12 is 13

BUILD SUCCESSFUL
Total time: 1 second

Cheers!
Hernan

Lasantha Ranaweera wrote:
Check both 1.1 & 1.2 samples.

both documentations updated too.

Please follow the new instructions to  run the  client application.
Still get an error for Jetty & I sent it to the dev list too.

Thanks,
Lasantha

Hernan Cunico wrote:
Cool, pls check the 1.1 version because it was giving me some hard
time too.

Cheers!
Hernan

Lasantha Ranaweera wrote:
Hernan,

Still there is this classpath issue in my sample :-( . I am going to
change it to ant script rather than direct java command. Hopefully
it will remove most of the pains from users and my side too.

I will make the 1.2 sample according to that that and update the
doc. Hopefully I will finish it by tomorrow.

Thanks,
Lasantha

Hernan Cunico wrote:
I put in the classpath the same jars I specified in the build.xml.
Geronimo v1.1 and v1.2 are quite different in terms of how these
specs are grouped, could you pinpoint what are the changes you made
to the v1.1 sample, I had to make lots of changes myself to migrate
the app to v1.2

Cheers!
Hernan

Lasantha Ranaweera wrote:
I have changed the sample application now to load the relevant JAR
files in to a different location and set the path as in the
server.jar. Latest version is uploaded in the 1.1 documentation.
But I couldn't test this one in a Windows machine either due to
some practical problems :-\ . Please follow the  steps in the 1.1
Doc.

BTW: I suspect your machine's CLASSPATH variable has a problem if
you have followed my previous steps still getting the previous
error. Becos javax/xml/soap/SOAPException is part of
geronimo-j2ee_1.4_spec-1.1.jar and it should be loaded from it.

Sorry for this problem.

Lasantha

Hernan Cunico wrote:
By doing that the command does not fail without arguments,
however when I specify any values I get a new exception

d:\samples\1.2\Calculator\bin>java
org.apache.geronimo.samples.calc.client.CalculatorClient 10 10
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/xml/soap/SOAPException
       at
org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)

       at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
       at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
       at
org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
       at
org.apache.axis.client.Service.getAxisClient(Service.java:104)
       at org.apache.axis.client.Service.<init>(Service.java:157)
       at
org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198)

       at
org.apache.geronimo.samples.calc.client.CalculatorClient.main(CalculatorClient.java:42)


Shouldn't all these already be addressed at build time?

Cheers!
Hernan

Lasantha Ranaweera wrote:
Looks like a class path issue  :-\ . Please follow the given
steps and let me know the status. I would like to dig more in to
this problem.

1. Add the  following JAR files to your class path.

geronimo-j2ee_1.4_spec-1.1.jar
geronimo-jaxrpc_1.1_spec-1.0.1.jar
axis-1.4.jar
commons-logging-1.0.4.jar
commons-discovery-0.2.jar
wsdl4j-1.5.2.jar
(Note some  of the  versions differ according to your G version)
2.Open a command prompt and move in to the <calculator_home>/bin.
3. java
org.apache.geronimo.samples.calc.client.CalculatorClient <num1>
<num2>

Thanks,
Lasantha

Hernan Cunico wrote:
I can't get that far yet. I'm stuck trying to run the
CalcClient, it complains about not finding the
org/apache/geronimo/samples/calc/client/CalculatorClient, but
the class is actually there and accessible.

BTW, I'm trying on Tomcat first.

Cheers!
Hernan

Lasantha Ranaweera wrote:
Hernan,

Thanks for pointing out this issue. Looks like we definitely
have a case
here. Please verify the error you are getting as same given
below.

After you have mentioned I tested this sample application in
both Jetty &
Tomcat version of the server for 1.1.1 & trunk version (built
recently)
but not in 1.2. The client side of the application fails in
the Jetty
version of the server with following error for each case for
me too:(. The
interesting thing is it works fine for Tomcat version.

AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (404)Not Found
 faultActor:
 faultNode:
 faultDetail:
        {}:return code:  404
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html;
charset=ISO-8859-1&quot;/&gt;
&lt;title&gt;Error 404 &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;&lt;h2&gt;HTTP ERROR:
404&lt;/h2&gt;&lt;pre&gt;NOT_FOUND&lt;/pre&gt;
&lt;p&gt;RequestURI=//Calculator/calculator&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;small&gt;&lt;a

href=&quot;http://jetty.mortbay.org/&quot;&gt;Powered by
Jetty://&lt;/a&gt;&lt;/small&gt;&lt;/i&gt;&lt;/p&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;

&lt;/body&gt;
&lt;/html&gt;

        {http://xml.apache.org/axis/}HttpErrorCode:404

(404)Not Found
        at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)

        at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)

        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

        at
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at
org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
        at
org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at
org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:163)

        at $Proxy0.addition(Unknown Source)
        at
org.apache.geronimo.samples.calc.client.CalculatorClient.main(Unknown

Source)


Thanks,
Lasantha

Lasantha,
I've been trying to get this app to work on G 1.2. I updated
the build
script and deployment plans but still can't get the client to
work. I had
the same error in 1.1.1, any chance you could take a look at
it?

Here is the link to the 1.2 version.

http://cwiki.apache.org/GMOxDOC12/simple-web-services-sample-application.html


Cheers!
Hernan








Reply via email to