An error occurred marshalling the object [java.io.IOException: Broken pipe] - java

I'm getting an error in my Java Springboot application, and the error doesn't mention anywhere which object is failing to be marshalled. We have org.eclipse.persistence.core at v2.7.7.
The full error is:
An I/O error has occurred while writing a response message entity to the container output stream. javax.ws.rs.WebApplicationException: HTTP 500 Internal Server Error
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:994)
....
[Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred marshalling the object
Internal Exception: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe]
at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:513)
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:992)
Any ideas on what can cause the broken pipe? Is it due to marshalling an unsupported object? Or maybe there's another underlying issue?

Related

How to resolve this error: HTTP Status 500 - Internal Server Error

I try to open my project in Java Web using Netbeans but i dont know how to resolve this.
HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.postgresql.util.PSQLException: FATAL: database "eCommerce" does not exist
root cause
org.postgresql.util.PSQLException: FATAL: database "eCommerce" does not exist
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 5.0 logs.
javax.servlet.ServletException: org.postgresql.util.PSQLException: FATAL: database "eCommerce" does not exist
This is the cause of the exception. Your application is trying to access a PostgreSQL database 'eCommerce' which doesn't seem to exist. You will have to create the database 'eCommerce', if you have access to the database server and the privileges to do so.

JAXB client, Failed to read a response: javax.xml.bind.UnmarshalException

I have a webservice use jaxb, in client I build webservice client jar file by Netbean. My problem is sometime client send request but can't read response object, follow exception:
Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,36959]
Message: Premature EOF]
com.sun.xml.internal.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,36959]
Message: Premature EOF]
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
Try to intercept your XML requests and response as described here
You may solve your problem then.

Spring REST Template java.net.SocketException: Unexpected end of file from server

I have a REST Web Service made with Spring MVC 3.2.0 that calls others REST Web Services also with Spring MVC. I'm having the following exception:
25-11-2014 17:49:42-ERROR-ajp-/172.23.111.22:8109-9-pe.com.dummy.BusinessDummyImpl- I/O error on POST request for "http://172.23.111.23/dummy-2/rest/method1":Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://172.23.111.23/dummy-2/rest/method1":Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:499)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:447)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:295)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:747)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:608)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1334)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
at org.springframework.http.client.SimpleClientHttpResponse.getRawStatusCode(SimpleClientHttpResponse.java:47)
at org.springframework.http.client.AbstractClientHttpResponse.getStatusCode(AbstractClientHttpResponse.java:32)
at org.springframework.web.client.DefaultResponseErrorHandler.getHttpStatusCode(DefaultResponseErrorHandler.java:55)
at org.springframework.web.client.DefaultResponseErrorHandler.hasError(DefaultResponseErrorHandler.java:49)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:485)
... 42 more
It happens randomly and when I check the log on dummy-2 WS there is no trace of error.
What can be causing this error?

RESTful Web service Testing error in Netbeans 6.9 with Mysql

Hi I have created a RESTful web service in netbeans 6.9 with mysql. I followed this tutorial from netbeans: http://netbeans.org/kb/docs/websvc/rest.html
But when I am trying to test the service I am getting the following error in browser. Can anyone please help how to resolve the issue.
Thanks in advance.
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
root cause
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
root cause
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
root cause
java.sql.SQLException: Error in allocating a connection. Cause: null
I think this link may help you :
http://netbeans-org.1045718.n5.nabble.com/Error-in-allocating-a-connection-Cause-null-td3358722.html
If your mysql tables have field names that have spaces in them, it will cause this problem.
Thank you for your response Ji. And no, I didn't have any space in the column. The issue is with the Admin Properties for the mySQL. I had to put the Path to start server, path to stop server etc in the Admin Properties.
Please refer to this link for more details. http://netbeans.org/kb/docs/ide/mysql.html
Also please note, if you are using PhpMyAdmin sort of tool to control your mySQL server, then you need to put the Admin Properties according to that.

error deploying to Google Appengine

I'm trying to deploy my java based appengine app through the eclipse plugin. I get an error at the very end of the process whichI pasted below. Any ideas what this could mean?
com.google.appengine.tools.admin.AdminException: Unable to update app: Error posting to URL: http://appengine.google.com/api/queue/update?app_id=ipoobeta&version=v1-6&
500 Internal Server Error
Server Error (500)
A server error has occurred.
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:62)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:271)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Error posting to URL: http://appengine.google.com/api/queue/update?app_id=ipoobeta&version=v1-6&
500 Internal Server Error
Server Error (500)
A server error has occurred.
at com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.updateQueue(AppVersionUpload.java:255)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:134)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:56)
... 4 more
Since this question was written there have been many enhancements to the serving infrastructure of Google App Engine. Be sure you are using the High Replication Datastore (HRD). It is extremely unlikely that you will encounter this type of error and if you do it will be transient.

Categories