Hi Mano,
That is probably a question for Alfresco.
OpenCMIS provides the credentials. If the repository doesn't accept
them once in a while, OpenCMIS cannot do anything about it.
- Florian
Hi all,
Sorry for the abrupt stop of the previous e-mail. I accidentally
pressed a
hotkey to send it.
Anyhow, the following mail describes the whole problem and like I
said
before, it only occurs sporadicly. Also a refresh of the page
executes the
same call and then works. So it isn't the case that we lost our
authentication context and the user needs to sign in again.
We use CMIS to connect to an Alfresco 3.4 repository. We have
searched te
web for this, but have found nothing.
I hope someone on this mailing list has a clue.
Thanks in advance.
Mano
On Wed, Jan 25, 2012 at 11:06 AM, Mano Swerts <[email protected]>
wrote:
Hi all,
We have created a JSF 1.2 application for a client which uses
openCMIS
0.5.0. Unfortunately we have an exception sporadicly that we cannot
reproduce.
We see the following stack trace in the logs:
Caused by:
org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException:
Unauthorized
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:568)
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:141)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:557)
at
org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
at
org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
*at
be.idewe.park.repository.impl.EmployeeDocumentRepositoryImpl.findDocuments(EmployeeDocumentRepositoryImpl.java:53)
*
at
be.idewe.park.service.impl.EmployeeDocumentServiceImpl.getDocumentsForUserAssignments(EmployeeDocumentServiceImpl.java:96)
at
be.idewe.park.service.impl.UserAssignmentServiceImpl.fillUserAssignmentsWithDocuments(UserAssignmentServiceImpl.java:201)
at
be.idewe.park.service.impl.UserAssignmentServiceImpl.getUserAssignmentsByDocumentTypes(UserAssignmentServiceImpl.java:191)
at
be.idewe.park.service.impl.UserAssignmentServiceImpl.getUserAssignmentsByDocumentTypes(UserAssignmentServiceImpl.java:175)
at
be.idewe.park.ui.UnreadDocumentsBean.getInboxes(UnreadDocumentsBean.java:166)
at
be.idewe.park.ui.UnreadDocumentsBean.getInbox(UnreadDocumentsBean.java:235)
at
be.idewe.park.ui.UnreadDocumentsBean.getEmployeeInbox(UnreadDocumentsBean.java:227)
at sun.reflect.GeneratedMethodAccessor860.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:83)
at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
... 69 more
The bold line in the stack trace is the last piece of code written
by us
in the trace and is quite simple:
public List<EmployeeDocument> findDocuments(Session cmisSession,
Query
query, String language) {
ItemIterable<QueryResult> employeeDocuments =
cmisSession.query(query.getQueryString(), false);
for (QueryResult queryResult : employeeDocuments) {
...
}
}
Our CMIS Session is cached on the security context of Spring
Security and
passed to the method.
--
Met vriendelijke groeten,
Kind regards,
Bien à vous,
Mano Swerts
Solution Engineer
_______________________________________________________
ACA IT-Solutions
Ilgatlaan 5C Clovislaan 82
B-3500 Hasselt B-1000 Brussel
Belgium Belgium
T: +32 (0)11 26 50 10 E: [email protected]
F: +32 (0)11 26 50 11 U: www.aca-it.be
M: +32 (0)484 80 81 45
______________________________________________________