#669 Improper error message when deleting a non existing user
Closed: Fixed None Opened 9 years ago by lsunkara.

Description: Trying to delete a non existing user, results in ClientResponseFailure: Error status 500 Internal Server Error returned

Example: when trying to delete a deleted or non existing user "CA_adminV", folowing error message occurs
Resulting output:

#pki -d /tmp/tmp.mNuoOX1oF5/nssdb -n "PKI Administrator for rhts.eng.bos.redhat.com" -c Password user-del CA_adminV

org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException: javax.xml.bind.UnmarshalException
- with linked exception:
[java.io.IOException: Stream closed]
at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:125)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:61)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:433)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:377)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:350)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:344)
at com.netscape.certsrv.client.PKIErrorInterceptor.handle(PKIErrorInterceptor.java:49)
at org.jboss.resteasy.client.core.extractors.ClientErrorHandler.clientErrorHandling(ClientErrorHandler.java:49)
at org.jboss.resteasy.client.core.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:55)
at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:120)
at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:88)
at com.sun.proxy.$Proxy28.removeUser(Unknown Source)
at com.netscape.certsrv.user.UserClient.removeUser(UserClient.java:73)
at com.netscape.cmstools.user.UserRemoveCLI.execute(UserRemoveCLI.java:49)
at com.netscape.cmstools.user.UserCLI.execute(UserCLI.java:101)
at com.netscape.cmstools.cli.MainCLI.execute(MainCLI.java:350)
at com.netscape.cmstools.cli.MainCLI.main(MainCLI.java:373)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[java.io.IOException: Stream closed]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:206)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:175)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:125)
at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:121)
... 18 more
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:162)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:206)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream.read(SelfExpandingBufferredInputStream.java:47)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2815)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:660)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:799)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:203)
... 22 more
ClientResponseFailure: Error status 500 Internal Server Error returned

Expected output:
User doesn't exist.


master: 66eabd97adafa95f97215202a825d73f5fca7692

Metadata Update from @lsunkara:
- Issue assigned to edewata
- Issue set to the milestone: 10.1 - 10/13 (October)

5 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1239

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata