hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahmet E Topcu" <ato...@gmail.com>
Subject Re: get method problem
Date Wed, 16 Jan 2008 03:12:59 GMT
Hi Roland,
I expect to get  XML object which has  author, title etc..
metadata.HoweverI got server error message.
Yes I use the context log to see stack trace.I copied the message here.

thanks,
Ahmet Topcu


DEBUG [org.apache.commons.httpclient.HttpClient] Java version: 1.5.0_14
DEBUG [org.apache.commons.httpclient.HttpClient] Java vendor: Sun
Microsystems Inc.
DEBUG [org.apache.commons.httpclient.HttpClient] Java class path:
C:\workspace\srg5\build\classes;C:\apache-tomcat-6.0.14\lib\activation.jar
;C:\apache-tomcat-6.0.14\lib\annotations-api.jar;C:\apache-
tomcat-6.0.14\lib\axis-ant.jar;C:\apache-tomcat-6.0.14\lib\axis.jar
;C:\apache-tomcat-6.0.14\lib\castor-1.0.1.jar;C:\apache-
tomcat-6.0.14\lib\castor-xml.jar;C:\apache-
tomcat-6.0.14\lib\catalina-ant.jar;C:\apache-
tomcat-6.0.14\lib\catalina-ha.jar;C:\apache-
tomcat-6.0.14\lib\catalina-tribes.jar;C:\apache-
tomcat-6.0.14\lib\catalina.jar;C:\apache-
tomcat-6.0.14\lib\commons-codec-1.3.jar;C:\apache-
tomcat-6.0.14\lib\commons-discovery-0.2.jar;C:\apache-
tomcat-6.0.14\lib\commons-httpclient-3.0.1.jar;C:\apache-
tomcat-6.0.14\lib\commons-logging-1.0.4.jar;C:\apache-
tomcat-6.0.14\lib\commons-logging-1.1.jar;C:\apache-
tomcat-6.0.14\lib\dom4j-1.6.1.jar;C:\apache-tomcat-6.0.14\lib\dom4j-full.jar
;C:\apache-tomcat-6.0.14\lib\el-api.jar;C:\apache-
tomcat-6.0.14\lib\jakarta-regexp-1.1.jar;C:\apache-
tomcat-6.0.14\lib\jasper-el.jar;C:\apache-tomcat-6.0.14\lib\jasper-jdt.jar
;C:\apache-tomcat-6.0.14\lib\jasper.jar;C:\apache-
tomcat-6.0.14\lib\jaxrpc.jar;C:\apache-tomcat-6.0.14\lib\jdom.jar;C:\apache-
tomcat-6.0.14\lib\jericho-html-2.1.jar;C:\apache-
tomcat-6.0.14\lib\jsp-api.jar;C:\apache-tomcat-6.0.14\lib\jstl-1.1.2.jar
;C:\apache-tomcat-6.0.14\lib\junit-4.1.jar;C:\apache-
tomcat-6.0.14\lib\log4j-1.2.15.jar;C:\apache-tomcat-6.0.14\lib\mail.jar
;C:\apache-tomcat-6.0.14\lib\mysql-connector-java-5.0.4-bin.jar;C:\apache-
tomcat-6.0.14\lib\mysql.jar;C:\apache-tomcat-6.0.14\lib\rome-0.9.jar
;C:\apache-tomcat-6.0.14\lib\saaj.jar;C:\apache-
tomcat-6.0.14\lib\servlet-api.jar;C:\apache-tomcat-6.0.14\lib\Tidy.jar
;C:\apache-tomcat-6.0.14\lib\tomcat-coyote.jar;C:\apache-
tomcat-6.0.14\lib\tomcat-dbcp.jar;C:\apache-
tomcat-6.0.14\lib\tomcat-i18n-es.jar;C:\apache-
tomcat-6.0.14\lib\tomcat-i18n-fr.jar;C:\apache-
tomcat-6.0.14\lib\tomcat-i18n-ja.jar;C:\apache-
tomcat-6.0.14\lib\wsdl4j-1.5.1.jar;C:\apache-tomcat-6.0.14\lib\xalan.jar
;C:\apache-tomcat-6.0.14\lib\xerces.jar;C:\apache-
tomcat-6.0.14\lib\xercesImpl.jar;C:\apache-
tomcat-6.0.14\lib\xmlParserAPIs.jar
;C:\workspace\srg4\lib\abdera\abdera.client.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.core.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.parser.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.protocol.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.security.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.server.0.3.0-incubating.jar
;C:\workspace\srg4\lib\abdera\abdera.spring.0.3.0-incubating.jar
;C:\workspace\srg4\lib\atomsphere\atomsphere-1.0.2.0.jar
;C:\workspace\srg4\lib\atomsphere\sjsxp.jar;C:\workspace\srg4\lib\atomsphere\stax-
1.2.0.jar;C:\workspace\srg4\lib\atomsphere\stax-utils.jar
;C:\workspace\srg4\lib\xmlParserAPIs.jar;C:\workspace\srg4\lib\activation.jar;C:\workspace\srg4\lib\axis-
ant.jar;C:\workspace\srg4\lib\castor-1.0.1.jar;C:\workspace\srg4\lib\castor-
xml.jar;C:\workspace\srg4\lib\commons-codec-1.3.jar
;C:\workspace\srg4\lib\commons-logging-1.0.4.jar
;C:\workspace\srg4\lib\commons-logging-1.1.jar;C:\workspace\srg4\lib\dom4j-
1.6.1.jar;C:\workspace\srg4\lib\dom4j-full.jar
;C:\workspace\srg4\lib\jakarta-regexp-1.1.jar
;C:\workspace\srg4\lib\jdom.jar;C:\workspace\srg4\lib\jericho-html-2.1.jar
;C:\workspace\srg4\lib\jstl-1.1.2.jar;C:\workspace\srg4\lib\junit-4.1.jar
;C:\workspace\srg4\lib\mail.jar;C:\workspace\srg4\lib\mysql-
connector-java-5.0.4-bin.jar;C:\workspace\srg4\lib\rome-0.9.jar
;C:\workspace\srg4\lib\Tidy.jar;C:\workspace\srg4\lib\xalan.jar;C:\workspace\srg4\lib\xerces.jar;C:\workspace\srg4\lib\xercesImpl.jar;C:\workspace\srg4\lib\wsdl4j-
1.5.1.jar;C:\workspace\srg4\lib\axis.jar;C:\workspace\srg4\lib\commons-
discovery-0.2.jar
;C:\workspace\srg4\lib\saaj.jar;C:\workspace\srg4\lib\jaxrpc.jar;C:\workspace\srg4\lib\mysql.jar;C:\workspace\srg4\lib\commons-
httpclient-3.0.jar;C:\workspace\srg4\lib\PDFBox-0.7.3.jar
;C:\workspace\srg5\WebContent\WEB-INF\lib\axis.jar;C:\workspace\srg5\WebContent\WEB-INF\lib\commons-
discovery-0.2.jar;C:\workspace\srg5\WebContent\WEB-INF\lib\commons-
logging.jar
;C:\workspace\srg5\WebContent\WEB-INF\lib\jaxrpc.jar;C:\workspace\srg5\WebContent\WEB-INF\lib\saaj.jar;C:\workspace\srg5\WebContent\WEB-INF\lib\wsdl4j-
1.5.1.jar;C:\downloads\PDFBox-0.7.3\external\ant.jar;C:\downloads\PDFBox-
0.7.3\external\bcmail-jdk14-132.jar;C:\downloads\PDFBox-
0.7.3\external\bcprov-jdk14-132.jar;C:\downloads\PDFBox-
0.7.3\external\checkstyle-all-4.2.jar;C:\downloads\PDFBox-
0.7.3\external\FontBox-0.1.0-dev.jar;C:\downloads\PDFBox-
0.7.3\external\junit.jar;C:\downloads\PDFBox-
0.7.3\external\lucene-core-2.0.0.jar;C:\downloads\PDFBox-
0.7.3\external\lucene-demos-2.0.0.jar
DEBUG [org.apache.commons.httpclient.HttpClient] Operating system name:
Windows XP
DEBUG [org.apache.commons.httpclient.HttpClient] Operating system
architecture: x86
DEBUG [org.apache.commons.httpclient.HttpClient] Operating system version:
5.1
DEBUG [org.apache.commons.httpclient.HttpClient] SUN 1.5: SUN (DSA
key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom;
X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPathBuilder; LDAP, Collection CertStores)
DEBUG [org.apache.commons.httpclient.HttpClient] SunRsaSign 1.5: Sun RSA
signature provider
DEBUG [org.apache.commons.httpclient.HttpClient] SunJSSE 1.5: Sun JSSE
provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
DEBUG [org.apache.commons.httpclient.HttpClient] SunJCE 1.5: SunJCE Provider
(implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE,
Diffie-Hellman, HMAC)
DEBUG [org.apache.commons.httpclient.HttpClient] SunJGSS 1.0: Sun (Kerberos
v5)
DEBUG [org.apache.commons.httpclient.HttpClient] SunSASL 1.5: Sun SASL
provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL,
PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.useragent = Jakarta Commons-HttpClient/3.0.1
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.version = HTTP/1.1
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.connection-manager.class = class
org.apache.commons.httpclient.SimpleHttpConnectionManager
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.cookie-policy = rfc2109
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.element-charset = US-ASCII
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.content-charset = ISO-8859-1
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.method.retry-handler =
org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@196c1b0
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy
HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE,
dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss
z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy
HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z,
EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
DEBUG [org.apache.commons.httpclient.params.DefaultHttpParams] Set parameter
http.protocol.cookie-policy = compatibility
DEBUG [org.apache.commons.httpclient.HttpConnection] Open connection to
academic.live.com:80
DEBUG [httpclient.wire.header] >> "GET /query.aspx?q=fox&count=3
HTTP/1.1[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Adding Host request
header
DEBUG [httpclient.wire.header] >> "Connection: keep-alive[\r][\n]"
DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta
Commons-HttpClient/3.0.1[\r][\n]"
DEBUG [httpclient.wire.header] >> "Host: academic.live.com[\r][\n]"
DEBUG [httpclient.wire.header] >> "[\r][\n]"
DEBUG [httpclient.wire.header] << "HTTP/1.1 500 Internal Server
Error[\r][\n]"
DEBUG [httpclient.wire.header] << "Server: Microsoft-IIS/6.0[\r][\n]"
DEBUG [httpclient.wire.header] << "P3P: CP="BUS CUR CONo FIN IVDo ONL OUR
PHY SAMo TELo"[\r][\n]"
DEBUG [httpclient.wire.header] << "X-Powered-By: ASP.NET[\r][\n]"
DEBUG [httpclient.wire.header] << "X-AspNet-Version: 2.0.50727[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Type: text/html;
charset=utf-8[\r][\n]"
DEBUG [httpclient.wire.header] << "Content-Length: 3026[\r][\n]"
DEBUG [httpclient.wire.header] << "Date: Wed, 16 Jan 2008 03:01:51
GMT[\r][\n]"
DEBUG [httpclient.wire.header] << "Connection: keep-alive[\r][\n]"
DEBUG [httpclient.wire.header] << "Cache-Control: private[\r][\n]"
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Buffering response body
DEBUG [org.apache.commons.httpclient.HttpMethodBase] Should NOT close
connection in response to directive: keep-alive
DEBUG [org.apache.commons.httpclient.HttpConnection] Releasing connection
back to connection manager.
body:<html>
    <head>
        <title>Runtime Error</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size:
.7em;color:black;}
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top:
-5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top:
-5px}
         H1 {
font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 {
font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold;
color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1
color=silver></H1>

            <h2> <i>Runtime Error</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular,
sans-serif ">

            <b> Description: </b>An application error occurred on the
server. The current custom error settings for this application prevent the
details of the application error from being viewed remotely (for security
reasons). It could, however, be viewed by browsers running on the local
server machine.
            <br><br>

            <b>Details:</b> To enable the details of this specific error
message to be viewable on remote machines, please create a
&lt;customErrors&gt; tag within a &quot;web.config&quot; configuration file
located in the root directory of the current web application. This
&lt;customErrors&gt; tag should then have its &quot;mode&quot; attribute set
to &quot;Off&quot;.<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;customErrors mode=&quot;Off&quot;/&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

                  </td>
               </tr>
            </table>

            <br>

            <b>Notes:</b> The current error page you are seeing can be
replaced by a custom error page by modifying the &quot;defaultRedirect&quot;
attribute of the application's &lt;customErrors&gt; configuration tag to
point to a custom error page URL.<br><br>

            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
    &lt;system.web&gt;
        &lt;customErrors mode=&quot;RemoteOnly&quot;
defaultRedirect=&quot;mycustompage.htm&quot;/&gt;
    &lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

                  </td>
               </tr>
            </table>

            <br>

    </body>
</html>

Method failed: HTTP/1.1 500 Internal Server Error

On Jan 5, 2008 1:04 AM, Roland Weber <ossfwot@dubioso.net> wrote:

> Hello Ahmet,
>
> > I try to use the get method to extract data  in the following codes.
> > It works for all other pages except for the link shown in the code.
>
> In what way does it _not_ work? Exception? Error response sent
> by the server? If an exception, please send the stack trace.
> Please also provide a log of the attempt to retrieve the page.
> The context log should be sufficient:
>        http://hc.apache.org/httpclient-3.x/logging.html
>
> cheers,
>  Roland
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


-- 
Ahmet E. Topcu
812 856 0756

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message