I can reproduce this. I'll try to work around it at LocalizationFilter level ...



On Fri, Aug 27, 2010 at 9:45 AM, Nguyen Anh Kien <nguyenanhkien2a@gmail.com> wrote:
Hi,

I found one to reproduce this issue by using 'New Staff' of Gatein:
1. Go to GateIn with root
2. Group/Organization/New Staff navigation
3. After creating new staff successfully. you will get that exception.

Iam not sure that is GateIn or PicketLink IDM problem.


On Fri, Aug 27, 2010 at 2:26 PM, Trong Tran <trong.tran@exoplatform.com> wrote:
( added gatein-dev list to this conversation )

On 27 August 2010 13:40, Boleslaw Dawidowicz <bdawidow@redhat.com> wrote:
Hi,

I would be grateful for any tips on how to reproduce this. I saw this few times but it was always related to other issues that I was working on. So far the only way in which I can reproduce this is by too long remote debugging session but it is quite obvious that it can trigger transaction timeout and should break other stuff too. Recently Chris spot this during WSRP tests but also could not point any valid way to reproduce.

The thing is that PLIDM internally doesn't manage transaction stuff - this is covered either with with JTA or Hibernate transaction and managed around  portal request. This is applied using ComponentRequestLifecycle.startRequest/endRequest method in PicketLinkIDMOrganizationServiceImpl and triggered by kernel. There must be some disturbance in the request flow or something that breaks active transaction happening so it is really hard to track the issue itself as it could be also just a side effect of different issue. I guess that I can apply extra transaction check in LocalizationFilter as it seems from all reports I got that this is the place where it happens most often.

Bolek


On Aug 27, 2010, at 6:15 AM, Trong Tran wrote:

> Hi Boleslaw and Marko,
>
> During run GateIn trunk recently, we have sometimes got an exception :
>
> org.picketlink.idm.common.exception.IdentityException: IdentityObjectType[USER] not present in the store.
>     at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2558)
>     at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.findIdentityObject(HibernateIdentityStoreImpl.java:648)
>     at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.findIdentityObject(WrapperIdentityStoreRepository.java:155)
>     at org.picketlink.idm.impl.api.session.managers.PersistenceManagerImpl.findUser(PersistenceManagerImpl.java:426)
>     at org.exoplatform.services.organization.idm.UserProfileDAOImpl.findUserProfileByName(UserProfileDAOImpl.java:144)
>     at org.exoplatform.portal.application.localization.LocalizationFilter.getUserProfileLocale(LocalizationFilter.java:172)
>     at org.exoplatform.portal.application.localization.LocalizationFilter.doFilter(LocalizationFilter.java:137)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at org.exoplatform.web.login.ClusteredSSOFilter.doFilter(ClusteredSSOFilter.java:73)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
>     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
>     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>     at java.lang.Thread.run(Thread.java:637)
> Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction
>     at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:338)
>     at $Proxy87.createCriteria(Unknown Source)
>     at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2532)
>     ... 22 more
>
> I do not know usecase to persistently get the exception.
>
> Apparently this is related to the patch of GTNPORTAL-1355 we have applied recently and to usage of PicketLink IDM.
>
> Could you have a look to see if there is any idea to fix this ?
>
> Thanks
> --
> Tran The Trong
> eXo Platform SAS




--
Tran The Trong
eXo Platform SAS

_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev




--
------
Best Regards!
==============================
==============
Kien Nguyen
Portal Team Developer
eXo Platform South East Asia (http://www.exoplatform.com)
A: 7 Flr, ThaiHa building, 18/11 alley, ThaiHa Str, Hanoi, Viet Nam
M: (+84) 933.975.960
E: kien.nguyen@exoplatform.com


_______________________________________________
gatein-dev mailing list
gatein-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev