I have the following configuration: a Glassfish server in witch I am running a Java web services. During a process task it is necessary to connect ,with HTTP GET, to an other web services with a HTTPURLConnection. This connection run real unstable sometimes it is possible to send 1200 request to this services with out problems, but some times it create an error. The HTTP Status is 200 but if I try to read from the Inputstream, its null. Also all Logs show nothing special. In the end of the request i close the reader and after this i disconnect the connection. Any suggestions?
HTTPURLConnection Status 200 but inputstream is null
958 Views Asked by carsten AtThere are 2 best solutions below
carsten
On
Tanks I see now that I have a HTTP Error 504. Means I have to increase the cache of my Glassfish?
HTTP/1.1 504 Fiddler - Receive Failure Date: Wed, 03 Dec 2014 21:35:28 GMT Content-Type: text/html; charset=UTF-8 Connection: close Cache-Control: no-cache, must-revalidate Timestamp: 16:35:28.838
[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes.
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in WEB-SERVICES
- Apache CXF is unable to handle duplicate localnames
- Why do we call all http services 'Web Api/Web Service'?
- Postman Webservice PHP Curl Code POST request giving forbidden error when run in local
- Migrate ASMX web method to WCF which accepts string array
- PKIX failed when using custom SSLcontext with custom keyStore and trustStore
- Problems in Validations via Web Service in a Vue 3 Application
- Maven plugin 100% compatible Java21 to generate stub classes from WSDL file and generate *.wsdl from java classes? A solution
- Kubernetes Ingress Port to Port route
- How to handle a multi thread tests calling a single thread web service in .Net Framework 4.6?
- oracle.dataaccess.dll keep showing up as reference after build of C# web service using Oracle MDAC
- Your thoughts on the suggested architecture for addressing the challenges and maintenance of third-party API implementation
- Issue with BizTalk register WCF-WSHttp adapter while calling web service
- Does PHP SoapClient creates XML to be sent to webservice end point, based on WSDL file, while using CURL the XML should be manually created?
- Invoice API in Authorize.net like Square
- Publish JAXWS Endpoint in the same port than Spring boot
Related Questions in GLASSFISH
- Get FileNotFoundException in EAR on Glassfish
- JBoss 4.x to Glassfish 2022 and Java 6 to Java 8 causes 1 non-XA Resource Exception
- Not able to change the logging level log4j on Payara server
- GlassFish Server, deploy, null, false build-impl.xml:1072: The module has not been deployed. See the server log for details
- Glassfish 7.0.12 adds question mark to URL when running JAVA EE Application
- ModelValidationException in JAVA Jersey
- I'm not able to start jetty server
- Automating Glassfish Server during Apache Netbeans installation
- GLASSFISH CONNECTION TO DATABASE
- Glassfish JDBC Connection Pool: don't connect to MySQL
- Jaxb2RootElementHttpMessageConverter throws jakarta.xml.bind.MarshalException: null at org.glassfish.jaxb.runtime.v2.runtime.MarshallerImpl.write
- Glassfish6 WAR Module Doesn't Boot as ejb,web,webservice despite having @WebService Annotation
- What could be causing an invalid URLPatternSpec exception on glassfish 7 and how do I fix it?
- Monitoring HTTP Listeners in Glassfish 4 via JMX
- GlassFish deleted Documents
Related Questions in HTTPURLCONNECTION
- Java HttpURLConnection cannot set Content-Length
- Cant read the whole response from the HttpURLConnection I want to achieve that for My Proxy Server?
- Android Studio HttpURLConnection every second request is empty on host
- getResponseCode returns null
- Jenkins Groovy HttpURLConnection PUT request failing while creating writer
- Android Volley library for secure requests
- HTTP connection failure when calling local API from .Net MAUI view
- What is the most efficient way to call rest service multiple times in a loop
- Not able to intercept methods of java.net.HttpURLConnection class in Java 17
- How to Access Set-Cookie Values with httpUrlConnection.getHeaderFields() When Headers Are Empty Due to HTTP Only Cookie Restrictions?
- Trying to get initial cookie value for a non authenticated website but it's throwing 403, using HttpURLConnection
- How to read EXCEL FILE with RESTRICTED permissions from URL in java?
- Spring Cloud Open Feign: HttpURLConnection and Apache HttpClient
- Overlapping bars and X-axis labels not showing correctly, also need to set Y-axis max value dynamically
- Android HttpUrlConnection not working in release
Related Questions in HTTP-STATUS-CODE-200
- MockMVC return 200 instead of 400
- Title: Angular - Page not loading data after successful user add (Server Error 200)
- Can't get Postman to give a 200 despite following freeCodeCamp tutorial on Springboot
- React error page return status code 200, how can i fix it and show 404 page*
- JQuery getJSON() has status code 200 but returns no data
- Calling request localhost always returns status code 200
- Check IMG URL status (PHP get_headers)
- how to redirect to another component in vue 3 using AXIOS after getting API response inside ( then block )
- Python: Return 200 status code even for invalid urls
- Cypress reutrns 302 instead of 200
- HTTP Status code 202 vs 200 for a POST request
- axios.get returns error code 400, but then resolves correctly with code 200
- Should I return a 404 error on a resource resulting in empty set?
- ActionResult<object> Returns Status code 200, ActionResult.Result.Value does contain correct object, but ActionResult.Value is Null
- Status 200 (from disk cache) and 304 Not Modified issue
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
My suggestion is to first get some eyes on the request/reponse. You can use tcp monitor/fiddler/etc as a proxy server to see the raw message. Once you have the proxy server setup you can see if theres anything wrong with the payload.