Unknown Error


#1

Hi!

Еverything was fine, but after installing the Avast Antivirus I always get an “Unknown Error”

Where is the problem?

Thanks.


#2

I deleted the Avast Antivirus still get the ‘Unknown Error’ !!!

Where is the problem?

Thanks.


#3

You need to explain what you are trying to do and where you see “unknown error”.


#4

I call “http://flightxml.flightaware.com/json/FlightXML3/FlightInfoStatus?ident=UA8021&howMany=1"
and get " org.apache.http.StatusLine: HTTP/1.1 598 Unknown Error”


#5

Ensure you have fully disabled its “Web shield” or anything that might be interfering with network access. You may need to restart your system, or uninstall it completely if you feel it is still interfering with network access.


#6

Disabling and removing the “Web shield” does not help.
The problem arose suddenly without any changes in the program.
It arose after the transition to winter time.
Тhis can be the reason?
And how to be further?


#7

I changed the authentication procedure for Apache to the procedure of glassfish (javax.ws) and it all worked!
It remains a mystery why suddenly the Apache procedure stopped working.


#8

Can you be more specific about what you changed?

Are you proposing a change to what we recommend to new users in any of our Java example programs?


#9

Authentication procedure for Apache:

            String fxml_host = "flightxml.flightaware.com";
            String fxml_url3 = "/json/FlightXML3/";
            DefaultHttpClient httpclient = new DefaultHttpClient();
            HttpHost targetHost = new HttpHost(fxml_host, 80, "http");
            HttpEntity entity = null;
            httpclient.getCredentialsProvider().setCredentials(new AuthScope(null, -1),  new UsernamePasswordCredentials(username, apiKey));
            HttpRequestInterceptor preemptiveAuth = new HttpRequestInterceptor() {
                public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException {
                    AuthState authState = (AuthState) context.getAttribute(ClientContext.TARGET_AUTH_STATE);
                    CredentialsProvider credsProvider = (CredentialsProvider) context.getAttribute(ClientContext.CREDS_PROVIDER);
                    HttpHost targetHost = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
                    if (authState.getAuthScheme() == null) {
                        AuthScope authScope = new AuthScope(targetHost.getHostName(), targetHost.getPort());
                        Credentials creds = credsProvider.getCredentials(authScope);
                        if (creds != null) {
                            authState.setAuthScheme(new BasicScheme());
                            authState.setCredentials(creds);
                        }
                    }
                }
            };
            httpclient.addRequestInterceptor(preemptiveAuth, 0);
            HttpGet httpget = new HttpGet(fxml_url3 + "FlightInfoStatus?ident=" + ident);
            HttpResponse response = httpclient.execute(targetHost, httpget);

procedure of glassfish (javax.ws)

        HttpAuthenticationFeature basicAuthFeature = HttpAuthenticationFeature.basic(username, apiKey);
        WebTarget findFlightWebTarget = ClientBuilder.newClient().register(basicAuthFeature).target(
                UriBuilder.fromUri("http://flightxml.flightaware.com/json/FlightXML3/FlightInfoStatus")
                        .queryParam("ident", "AA169")
                        .queryParam("howMany", 5)
                        .build()
        );
        Response response = findFlightWebTarget.request().get();