I have all the latest jar files in the right directories. (I do have the old jar files saved in another directory, but those are not in the classpath so I don't think that could be hurting me.) I modified the classpath and am no longer getting the java.lang.LinkageError. I'm still getting the SAXParseException though. Is there anything else that I can try?
Debbie -----Original Message----- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 2:32 PM To: Gentile, Deborah Cc: [email protected] Subject: Re: Error -- org.xml.sax.SAXParseException: Premature end of file. check all the jars (recursively) under tomcat. make sure only the latest Axis 1.2.1 jars are present. -- dims On 8/31/05, Gentile, Deborah <[EMAIL PROTECTED]> wrote: > After trying what you suggested below, the request that is going out > using 1.2.1 now matches the request that is going out using 1.1. > However, the response that I am getting (1.2.1) is now "(500) Internal > Server Error" and here is part of the stack trace that is displayed in > the tcpmonitor: > java.lang.LinkageError: loader constraints violated when linking > javax/xml/soap/SOAPMessage class > org.apache.axis.transport.http.AxisServlet.CreateMessageContext(AxisSe > rv > let.java:924) > org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:614 > ) > javax.servlet.http.HttpServlet.service(HttpServlet.java:763) > org.apache.axis.transport.http.AxisServletBase.service(AxisServerBase. > ja > va:327) > javax.servlet.http:HttpServlet.service(HttpServlet.java:856) > > I started and stopped Tomcat, but I'm getting the same error. Any > ideas? > > Thanks. > Debbie > > -----Original Message----- > From: Davanum Srinivas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 31, 2005 9:48 AM > To: Gentile, Deborah > Cc: [email protected] > Subject: Re: Error -- org.xml.sax.SAXParseException: Premature end of > file. > > Try > > AxisProperties.setProperty(AxisEngine.PROP_DOMULTIREFS, > Boolean.FALSE); > > in your client code. > > thanks, > dims > > On 8/31/05, Gentile, Deborah <[EMAIL PROTECTED]> wrote: > > I used tcpmon to compare the request/response pairs using axis > > version > > 1.1 and 1.2.1. It appears that the problem is on the request side. > > When sending a request that is passing no parameters (using 1.1 & > > 1.2.1), I get the response that I'm expecting. When sending a > > request > > > that is passing parameters with 1.1, I get the response I'm > > expecting, > > > but in 1.2.1, the XML is different and I get the error, > > org.xml.sax.SAXParseException: Premature end of file. > > > > The XML for the request in 1.1 looks like this in the tcp monitor: > > <?xml version="1.0" encoding="UTF-8" ?> <soapenv:Envelope > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > <soapenv:Body> > > <ns1:getDataSubset > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:ns1="com.ngc.bmc2/binding"> > > <offset xsi:type="xsd:int">2</offset> > > <numRecordsRequesting xsi:type="xsd:int">6</numRecordsRequesting> > > </ns1:getDataSubset> > > </soapenv:Body> > > </soapenv:Envelope> > > > > The XML for the request in 1.2.1 looks like this in the tcp monitor: > > (in the tcp monitor, in 1.2.1, this soap request is all on one line) > > <?xml version="1.0" encoding="UTF-8" ?> <soapenv:Envelope > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > <soapenv:Body> > > <ns1:getDataSubset > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:ns1="com.ngc.bmc2/binding"> > > <offset href="#id0"/> > > <numRecordsRequesting href="#id1"/> </ns1:getDataSubset> <mulitRef > > id="id1" soapenc:root="0" > > soapenv:encodingStyle="http://schemas/xmlsoap.org/soap/encoding/" > > xsi:type="xsd:int" > > xmlns:soapenc="http://schemas.xmlsoap.org/encoding/"> > > 6 </multiRef> > > <multiRef id="id1" soapenc:root="0" > > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > > xsi:type="xsd:int" xmlns:soapenc= > > "http://schemas.xmlsoap.org/encoding/"> 2 > > </multiRef></soapenv:Body></soapenv:Envelope> > > > > The corresponding response in 1.2.1: > > HTTP/1.1 200 OK > > Context-Type: text/xml;charset=utf-8 > > Date: Wed, 31 Aug 2005 11:50:42 GMT > > Server: Apache-Coyote/1.1 > > Connection: close > > > > Should I open a bug report, or am I missing something? > > Thanks. > > Debbie > > > > > > -----Original Message----- > > From: Davanum Srinivas [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 30, 2005 8:37 AM > > To: [email protected] > > Subject: Re: Error -- org.xml.sax.SAXParseException: Premature end > > of file. > > > > If you need more than the usual help on the mailing list / jira > > and/or > > > need production support, drop a note to [EMAIL PROTECTED] with what kind > > of services you need/expect. > > > > thanks, > > dims > > > > On 8/30/05, Davanum Srinivas <[EMAIL PROTECTED]> wrote: > > > Debbie, > > > > > > Use the tcpmon (check archives/wiki) to look at the > > > request/response > > > > pairs both from 1.1 and 1.2.1 and compare them. if they are > > > corrupted/bad, please open a bug report with your WSDL > > > > > > thanks, > > > dims > > > > > > On 8/29/05, Gentile, Deborah <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi. > > > > > > > > I'm running: > > > > Axis version 1.2.1 > > > > Xerces version 2.5.0 > > > > Apache Tomcat version 5.0.18 > > > > > > > > I created a wsdl and used WSDL2Java to generate the client stubs. > > > > I've added code into the stubs, and was able to successfully > > > > compile > > and deploy. > > > > When I hit a web service that just returns an int, I get back > > > > the number that I was expecting. When I hit a web service that > > > > returns a structure or an array, I get, > "org.xml.sax.SAXParseException: > > Premature end of file." > > > > Previously, before upgrading to Axis version 1.2.1, the same > > > > wsdl was used as well as the same stub code and it worked using > > > > Axis version 1.1. The only thing that changed was the Axis > > > > version that was being used. Not sure if it has anything to do > > > > with it, but I am > > > > > > using rpc encoding. Is it possible that I need a newer version > > > > of > > > > > Xerces or that I am missing a jar file? I'm including the > > > > following > > > > > > jar files: axis-1_2_1/lib/axis.jar, axis-1_2_1/lib/axis-ant.jar, > > > > axis-1_2_1/lib/commons-discovery-0.2.jar, > > > > axis-1_2_1/lib/commons-logging-1.0.4.jar, > > > > axis-1_2_1/lib/jaxrpc.jar, > > > > > > axis-1_2_1/lib/log4j-1.2.8.jar, axis-1_2_1/lib/saaj.jar, > > > > axis-1_2_1/lib/wsdl4j-1.5.1.jar, xerces-2_5_0/xercesImpl.jar, > > > > xerces-2_5_0/xml-apis.jar, xerces-2_5_0/xmlParserAPIs.jar, > > > > jaf-1.0.2/activation.jar, and javamail-1.3.1/mail.jar. I would > > > > appreciate any help that anyone can offer. > > > > > > > > Thanks. > > > > > > > > Debbie Gentile > > > > E-2C Software Engineer > > > > Northrop Grumman Integrated Systems > > > > 925 South Oyster Bay Road > > > > Bethpage, NY 11714-3582 > > > > M/S: X07-14 > > > > Phone: (516) 575-7131 > > > > Fax: (516) 346-3915 > > > > E-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service > > > Platform > > > > > > > > > -- > > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service > > Platform > > > > > -- > Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service > Platform > -- Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform
