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
955 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
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in WEB-SERVICES
- couldn't copy pdb file to another directory while consuming wcf web service
- .net rest service with JSON string and consumed with java client
- How to send Rest GET request that contains "#" value in url parameters?
- Looking the Method that MANUALLY INSTALL PHP on OSX Yosemite
- How to use @queryparam when using array in Java
- How to accept cookies when using a webservice - Android?
- zend soap server reading xml attributes
- Web Service Error path property must set before calling the send method
- Error with kSOAP2
- JAX-RS service response is returning double fields without decimal places
- How can I call a ASP.Net webservice using AJAX without calling controller
- Generate clients for multiple WSDL files and place it in different package through Spring Gradle
- File upload in AXIS2 webservice
- How to route by call method in proxy with WSO2?
- fetch data from web service to dataset in Delphi
Related Questions in GLASSFISH
- Simple JavaEE HTML GET/POST application
- Access roles from multiple applications
- GlassFish sometimes doesn't load my web apps
- How to configure custom access-log format for Glassfish-4.1 (worked in v3.1.2.2, ignored in v4.1)
- File upload via h:inputfile (prettyfaces) does not work
- java 8 with Glassfish 4.1 Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available
- Why won't my JSF app deploy to GlassFish?
- Best way redirect REST service request on glassfish + JAX-RS to https URL?
- JCA Glassfish to JBoss/Wildfly
- Ajax h:link doesn't call listener function
- JPA Bidirectionnal Uknown column
- Glassfish Closing JDBC Connection
- How to get other properties from an LDAP principal (user) after login using Glassfish's LDAPRealm?
- Deploying two applications in GlassFish's root context
- Starting Java EE Application on Glassfish
Related Questions in HTTPURLCONNECTION
- Consuming ASP.NET Web Api from Android HttpUrlConnection and Gson
- DELETE Request not working , Returns status code 200
- How to Download and Parse a JSON string faster over HTTP in java
- Java HttpURLConnection OutputStreamWriter is empty
- two dependent HttpUrlConnection with AsyncTask in android
- Upload multile image as a queue with showing progress bar like whats app
- HttpURLConnection throws java.net.SocketTimeoutException: SSL handshake timed out in Android 4.1.1
- UnknownHostException when attempting to create a HTTPUrlConnection with a proxy
- Send Utf8(persian) to Server By HttpURLConnection
- Using Java how can I lay down text to an HTML textbox that responds to a users keyup action?
- android request a php web service using HttpURLConnection and submit the php form
- Digest on Android get 401
- Android HttpUrlconnection not posting to URL
- android httpclient works but my similar HttpUrlconnection does not post
- HttpURLConnection catch block repeating
Related Questions in HTTP-STATUS-CODE-200
- Cache-Control not returning 304
- Jquery ajaxrequest xhr.status code 0 but html status code 200
- always returns status code 200
- HTTPURLConnection Status 200 but inputstream is null
- MockMVC return 200 instead of 400
- how to redirect to another component in vue 3 using AXIOS after getting API response inside ( then block )
- axios.get returns error code 400, but then resolves correctly with code 200
- Rendering HTML in HTTP 200 instead of 404 - accent in URLs
- Using java to connect to a site and POST, HTTP Status Code 200
- Why does valid PDF link returns status code 404?
- Python: Return 200 status code even for invalid urls
- Status 200 (from disk cache) and 304 Not Modified issue
- ActionResult<object> Returns Status code 200, ActionResult.Result.Value does contain correct object, but ActionResult.Value is Null
- Should I return a 404 error on a resource resulting in empty set?
- Httpcomponents httpcore and httpclient HTTP_status 400
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 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.