Hi Scott,
My output looked pretty similar to yours. I've managed to resolve the problem
on the server side, but now I'm faced with another one. Incomplete responses.
I sent out another email on that issue.
Thanks for your suggestions thus far.
Scott Nichol wrote:
> FYI, I added the following code to AddressBook#getAddressFromName
>
> try {
> FileWriter fw = new FileWriter("h:/code/javahack/classpath.txt");
> PrintWriter pw = new PrintWriter(fw);
> ClassLoader loader = Thread.currentThread().getContextClassLoader();
> while (loader != null) {
> if (loader instanceof URLClassLoader) {
> URL[] urls = ((URLClassLoader) loader).getURLs();
> for (int i = 0; i < urls.length; i++)
> pw.println(urls[i]);
> pw.println("-----");
> } else
> pw.println("@@@@@");
> loader = loader.getParent();
> }
> loader = ClassLoader.getSystemClassLoader();
> if (loader instanceof URLClassLoader) {
> URL[] urls = ((URLClassLoader) loader).getURLs();
> for (int i = 0; i < urls.length; i++)
> pw.println(urls[i]);
> }
> pw.flush();
> pw.close();
> } catch (IOException e) {
> throw new IllegalArgumentException(e.toString());
> }
>
> and got the following output
>
> file:/J:/jakarta-tomcat-4.0-b6/work/localhost/soap/WEB-INF/classes/
> -----
> file:J:/jakarta-tomcat-4.0-b6/lib/jasper-runtime.jar
> file:J:/jakarta-tomcat-4.0-b6/lib/namingfactory.jar
> -----
> file:J:/jakarta-tomcat-4.0-b6/common/lib/naming.jar
> file:J:/jakarta-tomcat-4.0-b6/common/lib/resources.jar
> file:J:/jakarta-tomcat-4.0-b6/common/lib/servlet.jar
> -----
> file:/J:/xerces-1_2_3/xerces.jar
> file:/J:/jakarta-tomcat-4.0-b6/bin/bootstrap.jar
> file:/J:/jdk1.3.0_01/lib/tools.jar
> file:/K:/Program Files/Allaire/JRun/lib/ext/mail.jar
> file:/K:/Program Files/Allaire/JRun/lib/ext/activation.jar
> -----
> -----
> file:/J:/xerces-1_2_3/xerces.jar
> file:/J:/jakarta-tomcat-4.0-b6/bin/bootstrap.jar
> file:/J:/jdk1.3.0_01/lib/tools.jar
> file:/K:/Program Files/Allaire/JRun/lib/ext/mail.jar
> file:/K:/Program Files/Allaire/JRun/lib/ext/activation.jar
>
> Scott
>
> ----- Original Message -----
> From: "David Turner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 31, 2001 3:19 PM
> Subject: Re: Parsing error...
>
> > An update:
> > It looks like I was able to get the server side working (I removed any
> jaxp.jar
> > references; Note: tomcat installation also puts a crimson.jar file in
> > tomcats/lib directory - it didn't on a windows/linux install), but there
> still
> > is a problem.
> >
> > When I deployed my service the servlet did deploy it and sent back a good
> > response -- I dumped the response to System.out.println before the servlet
> > returned the response. Now, back on the client side I checked the
> response
> > coming in with a debug statement and TCPTunnelGui and what's coming back
> is an
> > incomplete soap message as follows:
> >
> > Content-Type: text/xml; charset=utf-8
> > Content-Transfer-Encoding: 8bit
> > Content-ID: <13245490.996606151346.apache-soap.darwin.wi.mit.edu>
> > Content-Length: 435
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> > <SOAP-ENV:Body>
> > <ns1:deployResponse xmlns:ns1="urn:xml-
> > --------------------------------------------------------------------------
> ---------------------------------------------------
> >
> > The following is what the servlet dumped for a response:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> > <SOAP-ENV:Body>
> > <ns1:deployResponse xmlns:ns1="urn:xml-soap-service-management-service"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > </ns1:deployResponse>
> >
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> > --------------------------------------------------------------------------
> -----------------------------------------------------
> >
> > What would be some possible reasons for losing response data?
> >
> >
> >
> >
> >
> > Scott Nichol wrote:
> >
> > > David,
> > >
> > > I had time this morning to put together JDK 1.3.0_01, Tomcat 4.0 b6 and
> SOAP
> > > 2.2 on Win2k. Unfortunately, things work with that combo. I have to
> wait
> > > to try anything on Tru64 since my cable modem connection is out.
> > >
> > > After this adventure, though, I am curious about two things. First,
> have
> > > you tried setting JAVA_COMPILER=NONE in your environment? When I did
> not
> > > have mail.jar in the server classpath, I got a NullPointerException
> running
> > > with the JIT, and a ClassNotFoundException running without the JIT.
> Second,
> > > exactly what server classpath are you using? I used the following
> > > modification to catalina.bat:
> > >
> > > Was:
> > > set CP=CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar
> > >
> > > Changed to:
> > > set
> > >
> CP=j:\xerces-1_2_3\xerces.jar;%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\
> > >
> lib\tools.jar;k:\progra~1\allaire\jrun\lib\ext\mail.jar;k:\progra~1\allaire\
> > > jrun\lib\ext\activation.jar
> > >
> > > Scott
> > >
> > > ----- Original Message -----
> > > From: "David Turner" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, July 31, 2001 9:40 AM
> > > Subject: Re: Parsing error...
> > >
> > > > Hi Scott,
> > > >
> > > > I tried getting the classpath used by the class loader via the code
> you
> > > > recommended and it returned the following only:
> > > >
> > > >
> file:/a/franklin/fg/softdev/lib/soap-2_2/webapps/soap/WEB-INF/lib/soap.jar
> > > >
> > > >
> > > >
> > > > Scott Nichol wrote:
> > > >
> > > > > Have you determined the classpath in use by the class loader for the
> > > thread
> > > > > on which your servlet is running? The contents of java.class.path
> in
> > > the
> > > > > System properties need not have any relationship to this.
> > > > >
> > > > > Scott
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "David Turner" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Monday, July 30, 2001 4:18 PM
> > > > > Subject: Re: Parsing error...
> > > > >
> > > > > > In RPCRouterServlet I checked the class of the document builder
> being
> > > > > returned
> > > > > > by XMLParserUtils.getXMLDocBuilder() and it's as follows:
> > > > > > xdb documentBuilder class type = class
> > > > > > org.apache.crimson.jaxp.DocumentBuilderImpl
> > > > > >
> > > > > > I don't understand why the crimson version one is being used when
> I
> > > have
> > > > > xerces
> > > > > > as my parser. My classpath looks right.
> > > > > > Does anybody know why this is happening?
> > > > > >
> > > > > >
> > > > > > Scott Nichol wrote:
> > > > > >
> > > > > > > The classpath being used by the class loader is different than
> the
> > > > > System
> > > > > > > properties classpath. Tomcat creates several class loaders,
> > > including a
> > > > > > > separate class loader for each servlet. The class loader for
> each
> > > > > servlet
> > > > > > > will include stuff in WEB-INF for that servlet. That is why
> dumping
> > > the
> > > > > > > effective classpath for the thread on which the servlet is
> running
> > > would
> > > > > be
> > > > > > > interesting.
> > > > > > >
> > > > > > > However, it seems like your debugging is getting close enough to
> the
> > > > > problem
> > > > > > > that you should probably follow that path. Whether the
> different
> > > JDKs
> > > > > are
> > > > > > > the cause of the problem will likely be best determined this
> way.
> > > > > > >
> > > > > > > Scott
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: "David Turner" <[EMAIL PROTECTED]>
> > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > Sent: Friday, July 27, 2001 11:30 AM
> > > > > > > Subject: Re: Parsing error...
> > > > > > >
> > > > > > > > Scott,
> > > > > > > > I dumped the System environment variables and I don't see
> anything
> > > > > > > unusual.
> > > > > > > >
> > > > > > > > Also, One thing I completely forgot to mention is that the
> > > version
> > > > > that I
> > > > > > > got
> > > > > > > > working (Linux and Win) I used JDK1.4.0beta. Here I'm using
> > > JDK1.3.0.
> > > > > > > That
> > > > > > > > shouldn't have anything to do with it, right?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > java.runtime.name=Java(TM) 2 Runtime Environment, Standard
> > > Edition,
> > > > > > > > sun.boot.library.path=/usr/opt/java130/jre/lib/alpha,
> > > > > > > > java.vm.version=1.3.0-1.p1,
> > > > > > > > java.vm.vendor=Compaq Computer Corp.,
> > > > > > > > java.vendor.url=http://www.compaq.com/java,
> > > > > > > > path.separator=:,
> > > > > > > > java.vm.name=Classic VM,
> > > > > > > > file.encoding.pkg=sun.io,
> > > > > > > > java.vm.specification.name=Java Virtual Machine Specification,
> > > > > > > > user.dir=/a/franklin/home/franklin/turner/tomcat4.0/bin,
> > > > > > > > java.runtime.version=1.3.0-1.p1,
> > > > > > > > java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment,
> > > > > > > > os.arch=alpha,
> > > > > > > > java.io.tmpdir=/tmp/,
> > > > > > > > line.separator=
> > > > > > > > java.vm.specification.vendor=Sun Microsystems Inc.,
> > > > > > > > java.naming.factory.url.pkgs=org.apache.naming,
> > > > > > > > java.awt.fonts=,
> > > > > > > > os.name=OSF1,
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> java.library.path=/usr/opt/java130/bin/../jre/lib/alpha/classic:/usr/opt/jav
> > > > > > >
> > > > >
> > >
> a130/bin/../jre/lib/alpha/native_threads:/usr/opt/java130/bin/../jre/lib/alp
> > > > > > >
> > > > >
> > >
> ha::/usr/opt/java130/bin/../jre/../lib/alpha:/util/sybase/lib:/humgen/softwa
> > > > > > >
> > > > >
> > >
> re/lib:/seq/software/Staden.05_97/lib/alpha-binaries:/util/lib:/util/sybase/
> > > > > > >
> > > > >
> > >
> lib:/util/oracle/lib:/usr/shlib:/usr/local/lib:/util/oracle/lib:/usr/lib:/us
> > > > > > > r/shlib,
> > > > > > > >
> > > > > > > > java.specification.name=Java Platform API Specification,
> > > > > > > > java.class.version=47.0,
> > > > > > > > os.version=V4.0,
> > > > > > > > user.home=/home/franklin/turner,
> > > > > > > > catalina.useNaming=true,
> > > > > > > > user.timezone=GMT-05:00,
> > > > > > > > java.awt.printerjob=sun.awt.motif.PSPrinterJob,
> > > > > > > > file.encoding=ISO8859-1,
> > > > > > > > java.specification.version=1.3,
> > > > > > > > catalina.home=./..,
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> java.class.path=/fg/softdev/lib/xerces-1_4_1/xerces.jar:/fg/softdev/lib/jaxp
> > > > > >
> > > > >
> > >
> > -1.1/jaxp.jar:./../bin/bootstrap.jar:./../bin/servlet.jar:./../bin/naming.
> > > > > ja
> > > > > > > r:/usr/opt/java130/lib/tools.jar,
> > > > > > > >
> > > > > > > > user.name=turner,
> > > > > > > >
> > > > >
> > >
> java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory,
> > > > > > > > java.vm.specification.version=1.0,
> > > > > > > > java.home=/usr/opt/java130/jre,
> > > > > > > > user.language=en,
> > > > > > > > java.specification.vendor=Sun Microsystems Inc.,
> > > > > > > > java.vm.info=native threads, jit,
> > > > > > > > java.version=1.3.0,
> > > > > > > > java.ext.dirs=/usr/opt/java130/jre/lib/ext,
> > > > > > > >
> > > > > > >
> > > > >
> > >
> sun.boot.class.path=/usr/opt/java130/jre/lib/rt.jar:/usr/opt/java130/jre/lib
> > > > > > >
> > > > >
> > >
> /i18n.jar:/usr/opt/java130/jre/lib/sunrsasign.jar:/usr/opt/java130/jre/class
> > > > > > > es,
> > > > > > > >
> > > > > > > > java.vendor=Compaq Computer Corp.,
> > > > > > > > file.separator=/,
> > > > > > > >
> java.vendor.url.bug=http://www.compaq.com/java/contact/index.html,
> > > > > > > > java.compiler=jit_130,
> > > > > > > > sun.io.unicode.encoding=UnicodeBig,
> > > > > > > > sun.cpu.endian=little,
> > > > > > > > sun.cpu.isalist=
> > > > > > > >
> > > > > > > >
> > > > > > > > Scott Nichol wrote:
> > > > > > > >
> > > > > > > > > > Or a simpler thing to do at any point would be something
> like
> > > > > > > > > >
> > > > > > > > > > ClassLoader loader =
> > > > > > > Thread.currentThread().getContextClassLoader();
> > > > > > > > > > if (loader instanceof URLClassLoader) {
> > > > > > > > > > URL[] urls = loader.getURLs();
> > > > > > > > >
> > > > > > > > > Make that
> > > > > > > > > URL[] urls = ((URLClassLoader)loader).getURLs();
> > > > > > > > >
> > > > > > > > > > for (int i = 0; i < urls.length; i++)
> > > > > > > > > > System.out.println(urls[i]);
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > > I'm not 100% certain this will work, but it seems worth a
> try
> > > just
> > > > > to
> > > > > > > see
> > > > > > > > > > what the classpath looks like.
> > > > > > > > >
> > > > > > > > > Scott
> > > > > > > >
> > > > > > > > --
> > > > > > > > David Turner <[EMAIL PROTECTED]>
> > > > > > > > Senior Software Engineer
> > > > > > > > Whitehead Institute/MIT Center for Genome Research
> > > > > > > > One Kendall Square, Bldg. 300
> > > > > > > > Cambridge, MA 02139-1561 USA
> > > > > > > > phone 617-252-1573 / fax 617-252-1902
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > > --
> > > > > > David Turner <[EMAIL PROTECTED]>
> > > > > > Senior Software Engineer
> > > > > > Whitehead Institute/MIT Center for Genome Research
> > > > > > One Kendall Square, Bldg. 300
> > > > > > Cambridge, MA 02139-1561 USA
> > > > > > phone 617-252-1573 / fax 617-252-1902
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > > --
> > > > David Turner <[EMAIL PROTECTED]>
> > > > Senior Software Engineer
> > > > Whitehead Institute/MIT Center for Genome Research
> > > > One Kendall Square, Bldg. 300
> > > > Cambridge, MA 02139-1561 USA
> > > > phone 617-252-1573 / fax 617-252-1902
> > > >
> > > >
> >
> > --
> > David Turner <[EMAIL PROTECTED]>
> > Senior Software Engineer
> > Whitehead Institute/MIT Center for Genome Research
> > One Kendall Square, Bldg. 300
> > Cambridge, MA 02139-1561 USA
> > phone 617-252-1573 / fax 617-252-1902
> >
> >
--
David Turner <[EMAIL PROTECTED]>
Senior Software Engineer
Whitehead Institute/MIT Center for Genome Research
One Kendall Square, Bldg. 300
Cambridge, MA 02139-1561 USA
phone 617-252-1573 / fax 617-252-1902