Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketException when doing SingleResourceAdapter.uploadFile #278

Closed
bill-okara opened this issue Feb 3, 2017 · 1 comment
Closed

SocketException when doing SingleResourceAdapter.uploadFile #278

bill-okara opened this issue Feb 3, 2017 · 1 comment

Comments

@bill-okara
Copy link

Hi,

When trying to do the following, got the
javax.ws.rs.ProcessingException: java.net.SocketException: Connection reset

with jrs-rest-java-client-6.3.0

Steps:

  • SingleResourceAdapter r3 = session.resourcesService().resource('path-to-domain')
  • r3.uploadFile (newSchema, ClientFile.FileType.xml, JaspersoftConstants.SCHEMA, "schema");
    (trying to replace an existing schema file with the new one)
    got the following error
    (also tried to use createOrUpdate by retrieving a schema ClientFile and then do ClientFile.setContent(newSchemaContent), got Bad Request error)

something I missed? or is this a bug?

****** uploadFile error *******
javax.ws.rs.ProcessingException: java.net.SocketException: Connection reset
at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:287)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:684)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:681)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:681)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:437)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:343)
at com.jaspersoft.jasperserver.jaxrs.client.core.JerseyRequest.executeRequest(JerseyRequest.java:185)
at com.jaspersoft.jasperserver.jaxrs.client.core.JerseyRequest.post(JerseyRequest.java:155)
at com.jaspersoft.jasperserver.jaxrs.client.apiadapters.resources.SingleResourceAdapter.uploadFile(SingleResourceAdapter.java:226)

Thanks!
Bill

@bill-okara
Copy link
Author

never mind, probably not using it in correct manner, thus the exception. was able to update using createOrUpdate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant