fetch external resource fails with HTTP 406

IDEA cant' fetch the following schema
http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
Sun server returns a 406 code (not acceptable).

This url works fine when using a browser.

I sniffed the http request made by IDEA, and i guess text/xml should be added to the acceptable formats.

The error message comes from my corporation proxy, so i do not know if it is jsut forwarding the message it gets from the sun server or if the problem is from the proxy itself.

Anyone seen this already ?



GET http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd HTTP/1.1

User-Agent: Java/1.5.0_11

Host: java.sun.com

Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

Proxy-Connection: keep-alive



HTTP/1.1 406 Not Acceptable

Cache-Control: no-cache

Pragma: no-cache

Content-Type: text/html; charset=utf-8

Proxy-Connection: close

Connection: close

Content-Length: 513



.... ..


.. ..Message du serveur de cache BCPC11

..Votre requ..te utilise un protocole () invalide.
..
..Veuillez r..essayer ult..rieurement. .. .. .. ..

4 comments
Comment actions Permalink

Thibaut wrote:

I sniffed the http request made by IDEA, and i guess text/xml should be added to the acceptable formats.


But it already accepts /, so that shouldn't affect anything, right?

GET http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd HTTP/1.1


But this seems to try to find something called
"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" (essentially a
concatenation of two URLs) which doesn't exist.

0
Comment actions Permalink

right but this request was created by IDEA when choosing the "fetch external resource" quickfix on
]]>

(triggering alt-enter on "http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" token)

Indeed exception shown by idea is "java.io.IOException: Server returned HTTP response code: 406 for URL: http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"

0
Comment actions Permalink

Please submit a request

0
Comment actions Permalink

'xmlns:schemaLocation' should be replaced with 'xsi:schemaLocation'

Thibaut wrote:

right but this request was created by IDEA when choosing the "fetch external resource" quickfix on
<application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" id="Application_ID" version="1.4">

(triggering alt-enter on "http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" token)

Indeed exception shown by idea is "java.io.IOException: Server returned HTTP response code: 406 for URL: http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.