You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Jason Scammell <ja...@kelman.com> on 2001/03/15 19:23:01 UTC

RE: NoSuchMethodError on Sample (MY SOLUTION)

To the people that have had this problem before I would like to share with
you my solution to this problem.
I had configured my CLASSPATH correctly in the Tomcat.bat file, and on my PC
environment, exactly the same way as other people have mentioned.  After
doing some debugging on what was happening to the CLASSPATH in the
tomcat.bat file, I found something very interesting.  Take a look and see
what you guys think if I have made the right fix to this problem.

This was my CLASSPATH
CLASSPATH=D:\xerces\xerces-1_3_0\xerces.jar;D:\soap-2_1\lib\soap.jar;D:\soap
-2_1;C:\javaAF-1.0.1\activation.jar;D:\javamail-1.1.3\mail.jar;%TOMCAT_HOME%
\lib\tomcat.jar;%CLASSPATH%;%CP%

:chkClasspath
if "%CLASSPATH%" == "" goto noClasspath
REM THIS IS A FIX TO THE CLASS PATH
set CP=%CLASSPATH%%CP%;
rem original configuration line below
REM set CP=%CP%;%CLASSPATH%
:noClasspath

The CP variable was being put on the front of the class path hence, xerces
was not being put first at the front of the class path after tomcat was
running. and no one can run the soap samples.

I ran and tested the getstockquote example with multiple configurations to
the lines of code above. If you use the original configuration on the
tomcat.bat you will get that silly Ouch! error.  Use mine and I think the
problem will go away.

If this is not the correct way to fix this problem, I would like to hear
about how to fix this correctly.
If there are any success stories I would like to hear them as well.

Cheers and happy SOAPING!
Jay
    -----Original Message-----
    From: Juranek, Scott
    Sent: Wednesday, March 14, 2001 12:07 PM
    To: 'soap-user@xml.apache.org'
    Subject: RE: NoSuchMethodError on Sample


    Thanks to Mark Bloore and some very careful re-reading I have it
working.

    Here is what I have in startup.bat, taking Mark's suggestion into
account.

    set TOMCAT_HOME=C:\Apache\jakarta-tomcat-3.2.1
    set JAVA_HOME=C:\jdk1.3.0_02
    SET path=C:\jdk1.3.0_02\bin
    set
CLASSPATH=C:\Apache\xerces-1_3_0\xerces.jar;C:\Apache\soap-2_1\lib\soap.jar;
C:\jdk1.3.0_02\javamail-1.2\mail.jar;C:\jdk1.3.0_02\jaf-1.0.1\activation.jar
;C:\Apache\soap-2_1;%CLASSPATH%;%cp%

    Also, you need to modify the tomcat.bat and make sure the the xerces
parser is referenced.  I did spend time figuring out all the logic so I just
sprinkled a bunch of "C:\Apache\xerces-1_3_0\xerces.jar" where the classpath
or cp was set.  Sloppy but I just wanted to get it to work for now.  The
docs talk about an xml.jar but I don't have it installed with Tomcat.

    Hopefully this help you out.  Also I found the archives at:
    http://marc.theaimsgroup.com

    -Scott

        -----Original Message-----
        From: Jason Scammell [mailto:jasons@kelman.com]
        Sent: Wednesday, March 14, 2001 12:03 PM
        To: soap-user@xml.apache.org
        Subject: RE: NoSuchMethodError on Sample


        I have a similar problem with this sample. Same configuration as the
other person who posted earlier.

        set
CLASSPATH=D:\xerces\xerces-1_3_0\xerces.jar;C:\javaAF-1.0.1\activation.jar;D
:\javamail-1.1.3\mail.jar;D:\foo\soap-2_1\lib\soap.jar;D:\foo\soap-2_1\;C:\j
dk1.3\lib\tools.jar;

        This is the error that I recieve when I run the testit or even
trying to deploy this sample.

        Ouch, the call failed:

        Fault Code = SOAP-ENV:Server.Exception:

        Fault String = java.lang.NoSuchMethodError

        Anyone have a solution or ideas on where to look to get this sample
going?

        Thanks

        Jay

            -----Original Message-----
            From: Mark Bloore
            Sent: Wednesday, March 14, 2001 9:48 AM
            To: 'soap-user@xml.apache.org'
            Subject: RE: NoSuchMethodError on Sample


            replace "C:\Apache\soap-2_1\samples\stockquote" with
"C:\Apache\soap-2_1" in your classpath.  the cmd files assume that the
sample's paths start from there.
                -----Original Message-----
                From: Juranek, Scott [mailto:Scott.Juranek@Rainier.com]
                Sent: Wednesday, 14 March 2001 12:24 AM
                To: 'soap-user@xml.apache.org'
                Subject: NoSuchMethodError on Sample


                I know this question has probably been answered but there
doesn't seem to be a FAQ or searchable archive for the Apache/SOAP stuff.

                I just got all the Apache SOAP stuff setup on a Win2K
machine.  I'm using Tomcat 3.2.1, SOAP 2.1, Xerces 1.3.  I can get the SOAP
Admin pages:  http://localhost:8080/soap/admin/index.html and go through the
list, deploy, and un-deply options.  However, I can't get any of the samples
to work.  I run the testit.cmd under \samples\stockquote and the output is
shown below.

                The following is in my startup.bat for Tomcat -
                set
CLASSPATH=C:\Apache\xerces-1_3_0\xerces.jar;C:\Apache\soap-2_1\lib\soap.jar;
C:\jdk1.3.0_02\javamail-1.2\mail.jar;C:\jdk1.3.0_02\jaf-1.0.1\activation.jar
;C:\Apache\soap-2_1\samples\stockquote;%CLASSPATH%;%cp%

                I also added that line into the testit.cmd just in case I
was missing some class paths.

                I also tried manually deploying via the admin page and that
worked but when I tried to use the service I would get a null exception
error back via a SOAP fault.

                Thanks,

                -Scott

                --------------------------------------------------

                This test assumes a server URL of
http://localhost:8080/soap/server/rpcrouter
                Deploying the stockquote service...
                Ouch, the call failed:
                  Fault Code   = SOAP-ENV:Server.Exception:
                  Fault String = java.lang.NoSuchMethodError
                .
                Verify that its there
                Ouch, the call failed:
                  Fault Code   = SOAP-ENV:Server.Exception:
                  Fault String = java.lang.NoSuchMethodError
                .
                Running the stockquote test
                Exception in thread "main" java.lang.NoClassDefFoundError:
samples/stockquote/GetQuote
                .
                Undeploy it now
                Ouch, the call failed:
                  Fault Code   = SOAP-ENV:Server.Exception:
                  Fault String = java.lang.NoSuchMethodError
                .
                Verify that its gone
                Ouch, the call failed:
                  Fault Code   = SOAP-ENV:Server.Exception:
                  Fault String = java.lang.NoSuchMethodError