You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Mano Swerts <m....@aca-it.be> on 2012/01/25 11:06:52 UTC

Sporadic CMISUnauthorizedException

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: m.swerts@aca-it.be
F: +32 (0)11 26 50 11          U: www.aca-it.be
M: +32 (0)484 80 81 45
______________________________________________________

Re: Sporadic CMISUnauthorizedException

Posted by Florian Müller <fm...@apache.org>.
 Hi Mano,

 The CmisUnauthorizedException is thrown when the server returns the 
 HTTP status code 401.


 - Florian


> Hi Florian,
>
> Thanks for the response. I will try to investigate the issue some
> more at the Alfresco side.
>
> One question though, is the CmisUnauthorizedException used for
> authentication and authorization? So both scenarios would then be
> possible when getting this error:
>
> - Authentication succeeds, but the query seems to return results
> which the user should not receive or the query queries a particular
> port of the document tree which is not accessible for the user
> launching the query.
>
> - Authentication fails when executing a query.
>
> Thanks.
>
> -- Mano
>
> On Wed, Jan 25, 2012 at 12:48 PM, Florian Müller  wrote:
>
>  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  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 findDocuments(Session cmisSession, Query
>  query, String language) {
>
>  ItemIterable 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 [3]          E: m.swerts@aca-it.be [4]
>  F: +32 (0)11 26 50 11 [5]          U: www.aca-it.be [6]
>  M: +32 (0)484 80 81 45 [7]
>  ______________________________________________________
>
>
>
> Links:
> ------
> [1] mailto:fmui@apache.org
> [2] mailto:m.swerts@aca-it.be
> [3]
> http://webmailer.hosteurope.de/tel:%2B32%20%280%2911%2026%2050%2010
> [4] mailto:m.swerts@aca-it.be
> [5]
> http://webmailer.hosteurope.de/tel:%2B32%20%280%2911%2026%2050%2011
> [6] http://www.aca-it.be
> [7]
> http://webmailer.hosteurope.de/tel:%2B32%20%280%29484%2080%2081%2045


Re: Sporadic CMISUnauthorizedException

Posted by Mano Swerts <m....@aca-it.be>.
Hi Florian,

Thanks for the response. I will try to investigate the issue some more at
the Alfresco side.

One question though, is the CmisUnauthorizedException used for
authentication and authorization? So both scenarios would then be possible
when getting this error:

- Authentication succeeds, but the query seems to return results which the
user should not receive or the query queries a particular port of the
document tree which is not accessible for the user launching the query.

- Authentication fails when executing a query.

Thanks.

-- Mano



On Wed, Jan 25, 2012 at 12:48 PM, Florian Müller <fm...@apache.org> wrote:

>
> 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 <m....@aca-it.be> 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.**
>>> fillUserAssignmentsWithDocumen**ts(UserAssignmentServiceImpl.**java:201)
>>>        at
>>>
>>> be.idewe.park.service.impl.**UserAssignmentServiceImpl.**
>>> getUserAssignmentsByDocumentTy**pes(UserAssignmentServiceImpl.**
>>> java:191)
>>>        at
>>>
>>> be.idewe.park.service.impl.**UserAssignmentServiceImpl.**
>>> getUserAssignmentsByDocumentTy**pes(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: m.swerts@aca-it.be
>>> F: +32 (0)11 26 50 11          U: www.aca-it.be
>>> M: +32 (0)484 80 81 45
>>> ______________________________**________________________
>>>
>>>
>

Re: Sporadic CMISUnauthorizedException

Posted by Florian Müller <fm...@apache.org>.
 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 <m....@aca-it.be> 
> 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: m.swerts@aca-it.be
>> F: +32 (0)11 26 50 11          U: www.aca-it.be
>> M: +32 (0)484 80 81 45
>> ______________________________________________________
>>


Re: Sporadic CMISUnauthorizedException

Posted by Mano Swerts <m....@aca-it.be>.
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 <m....@aca-it.be> 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: m.swerts@aca-it.be
> F: +32 (0)11 26 50 11          U: www.aca-it.be
> M: +32 (0)484 80 81 45
> ______________________________________________________
>