[ https://issues.apache.org/jira/browse/ATLAS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109432#comment-16109432 ]
Richard Ding commented on ATLAS-1867: ------------------------------------- The exception I got is {code} Exception in thread "main" com.sun.jersey.api.client.UniformInterfaceException: DELETE http://localhost:31000/api/atlas/v2/types/typedefs/ returned a response status of 204 No Content at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:609) at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586) at org.apache.atlas.AtlasServiceException.<init>(AtlasServiceException.java:65) at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:356) at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:296) at org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:448) at org.apache.atlas.AtlasClientV2.deleteAtlasTypeDefs(AtlasClientV2.java:281) {code} It appears that the server returns successfully with "204 No Content" but client can only handle "200 OK" response code. > org.apache.atlas.AtlasClientV2.deleteAtlasTypeDefs gives an exception > --------------------------------------------------------------------- > > Key: ATLAS-1867 > URL: https://issues.apache.org/jira/browse/ATLAS-1867 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.8-incubating > Reporter: David Radley > Assignee: Richard Ding > > The org.apache.atlas.AtlasClientV2 is the Java API for Atlas. As such the > helper methods in it are the API. calling deleteAtlasTypeDefs gives the > exception > Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: > java.net.ProtocolException: HTTP method DELETE doesn't support output > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155) > at > com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105) > at com.sun.jersey.api.client.Client.handle(Client.java:652) > at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) > at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) > at > com.sun.jersey.api.client.WebResource$Builder.method(WebResource.java:634) > at > org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:298) > at > org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:285) > at org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:427) > at > org.apache.atlas.AtlasClientV2.deleteAtlasTypeDefs(AtlasClientV2.java:258) > at > org.apache.atlas.examples.DeleteTypesFromJsonFileUtil.runTypeDelete(DeleteTypesFromJsonFileUtil.java:73) > at > org.apache.atlas.examples.DeleteTypesFromJsonFileUtil.main(DeleteTypesFromJsonFileUtil.java:58) > Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support > output > at > sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1083) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler$1$1.getOutputStream(URLConnectionClientHandler.java:238) > at > com.sun.jersey.api.client.CommittingOutputStream.commitStream(CommittingOutputStream.java:117) > at > com.sun.jersey.api.client.CommittingOutputStream.write(CommittingOutputStream.java:89) > at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) > at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) > at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) > at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) > at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) > at java.io.BufferedWriter.flush(BufferedWriter.java:254) > at > com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java:191) > at > com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:128) > at > com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:88) > at > com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringProvider.java:58) > at > com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217) > at > com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)