12-06-2012 07:35 AM
We have problem regarding import of a SSL certificate (.pfx).
For import of the certificate, we are using org.nuxeo.ecm.directory.api.DirectoryService and org.nuxeo.ecm.core.api.DocumentModel packages, further using:
certificate = session.createEntry(map);
where:
Map<String, Object> map = new HashMap<String, Object>(); map.put("userid", userID); map.put("filename", userCertificate.getFilename());
ByteArrayOutputStream byteOS = new ByteArrayOutputStream(); String keystore64Encoded = Base64.encodeBytes(byteOS.toByteArray()); map.put("keystore", keystore64Encoded);
and session is an org.nuxeo.ecm.directory.Session and certificate is DocumentModel certificate.
The error we get in the log is the following:
org.nuxeo.ecm.directory.DirectoryException: createEntry failed
In case of trying to update an existing certificate, with newly generated we get the following error:
Exception during saving certificate.org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.directory.DirectoryException. message: updateEntry failed for 'username'.
Can you please help us with some direction regarding this issue ?
Thank you very much in advance, A.
12-06-2012 12:57 PM
Hi,
The "createEntry failed" error log is followed by a stack trace giving more details on the root cause.
/>
You would also get much more details by setting a DEBUG log level on "org.nuxeo.ecm.directory".
Same remarks about the update, even if I'm not sure how you can update something if the creation failed.
Did you write unit tests for validating your code? That would also help us to reproduce your issue if you could share those tests.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.