2 Replies Latest reply on Apr 18, 2016 9:26 PM by prat

    User getting added only once in the permission group when getting added to the group while registration.

    shipra

      Hello,

       

      I have a scenario in which I have to add the users which register in jive 7 via the jive registration form (in login page) to a permission group.

      I have to add a new link for this purpose and users getting registered via this link are only suppose to be added. I have created a plugin for the same in which I have overridden the create-account.jspa action.

      The logic of adding the user in the permission group is done in indexAction.java (as we can add the user in a group only once its user object has been created)

      When i run my plugin its working perfectly fine in the first time. Second time the registration process is a success but the user is not getting added in the permission group.

       

      Attaching the logs for both the cases:

      First time after the system restart things are good:

      2014-03-19 09:54:16,346 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - Cookies-->true

      2014-03-19 09:54:16,348 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - user info in service implImmutableUser: 2078 [awf29] [awf29@j.com] ??true

      2014-03-19 09:54:16,381 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - extended proptrue

      2014-03-19 09:54:16,383 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - inside if

      2014-03-19 09:54:16,384 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - from sys propAWF_Account

      2014-03-19 09:54:16,738 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - user group isDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }user is obtainedImmutableUser: 2078 [awf29] [awf29@j.com]

      2014-03-19 09:54:16,740 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - is member/admin

      2014-03-19 09:54:16,741 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - after addming memberDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }

      2014-03-19 09:54:16,946 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.registration.action.IndexAction - after group updaterDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }

      2014-03-19 09:54:17,066 [http-bio-8080-exec-3] [2078:awf29:REGULAR] INFO com.jivesoftware.community.redirect.CustomRedirectFilter - checking against redirect list for URL http://localhost:8080/get-started and URI /get-started

      2014-03-19 09:54:17,197 [NonBlockingEventDispatcher-thread] [::] WARN com.jivesoftware.base.event.v2.EventDispatchStats - Event handler [class com.jivesoftware.community.moderation.GroupMembershipListener] took too long (239 ms) to process event [com.jivesoftware.base.event.GroupEvent@4a792e42[eventType=USER_ADDED,payload=EntityDescriptor{objectID=1001, objectType=4},params={Member=User: 2078 [awf29] [awf29@j.com] , Members=[User: 2078 [awf29] [awf29@j.com] ]},createdDate=Wed Mar 19 09:54:16 EDT 2014,actor=EntityDescriptor{objectID=2078, objectType=3},callingstack=<null>]].

      2014-03-19 09:54:17,244 [NonBlockingEventDispatcher-thread] [::] WARN com.jivesoftware.base.event.v2.EventDispatchStats - Event handler [class com.jivesoftware.community.integration.storage.listeners.ExStorageGroupEventListener] took too long (45 ms) to process event [com.jivesoftware.base.event.GroupEvent@4a792e42[eventType=USER_ADDED,payload=EntityDescriptor{objectID=1001, objectType=4},params={Member=User: 2078 [awf29] [awf29@j.com] , Members=[User: 2078 [awf29] [awf29@j.com] ]},createdDate=Wed Mar 19 09:54:16 EDT 2014,actor=EntityDescriptor{objectID=2078, objectType=3},callingstack=<null>]].

      2014-03-19 09:54:17,766 [Thread-27] [::] ERROR com.jivesoftware.community.mail.outgoing.EmailManagerImpl - Email senders are failing

      1. javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25 (java.net.ConnectException: Connection refused: connect)

      SECOND TIME WHEN USER NOT GETTING ADDED TO THE PERMISSION GROUP:

       

      2014-03-19 10:46:05,875 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - Cookies-->true

      2014-03-19 10:46:05,878 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - user info in service implImmutableUser: 2079 [awf30] [awf30@j.com] ??true

      2014-03-19 10:46:05,891 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - extended proptrue

      2014-03-19 10:46:05,892 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - inside if

      2014-03-19 10:46:05,893 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - from sys propAWF_Account

      2014-03-19 10:46:05,894 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - user group isDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }user is obtainedImmutableUser: 2079 [awf30] [awf30@j.com]

      2014-03-19 10:46:05,895 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - is member/admin

      2014-03-19 10:46:05,896 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - after addming memberDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }

      2014-03-19 10:46:05,925 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.registration.action.IndexAction - after group updaterDbGroup { id: 1001, name: AWF_Account, description: The users getting registered using AWF aCOOUNT GETS PERMISSION TO THEIR SPACE. }

      2014-03-19 10:46:05,951 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.jivesoftware.community.redirect.CustomRedirectFilter - checking against redirect list for URL http://localhost:8080/get-started and URI /get-started

      2014-03-19 10:46:06,675 [http-bio-8080-exec-14] [2079:awf30:REGULAR] INFO com.jivesoftware.community.web.security.JiveXHRTokenValidator - generated token: 15ee7ed983e31e9c0715a0fd42d93b056cafefe734d7fa2234e5535d46062817

      2014-03-19 10:46:08,616 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - No dashboards available for 0; created a default dashboard.

      2014-03-19 10:46:09,415 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.app.AppGadgetUpdateHandler - Could not resolve gadget URI https://developers.jivesoftware.com/appsmarket/opensocial/applicationInstanceID/939c8f31-1781-4ca1-9384-9448a99d8690/gadget.xml to a known app.

      2014-03-19 10:46:09,454 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - Successfully configured app (saved connects defaults)

      2014-03-19 10:46:09,509 [NonBlockingEventDispatcher-thread] [::] WARN com.jivesoftware.base.event.v2.EventDispatchStats - Event handler [class com.jivesoftware.community.statuslevel.event.AppInstanceEventListener] took too long (36 ms) to process event [com.jivesoftware.community.app.event.AppInstanceEvent@335fab2d[eventType=CREATED,payload=EntityDescriptor{objectID=1302, objectType=1402},params={publishActivity=false, user=ImmutableUser: 2079 [awf30] [awf30@j.com] },createdDate=Wed Mar 19 10:46:09 EDT 2014,actor=EntityDescriptor{objectID=2079, objectType=3},callingstack=<null>]].

      2014-03-19 10:46:10,215 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.app.AppGadgetUpdateHandler - Could not resolve gadget URI https://developers.jivesoftware.com/appsmarket/opensocial/applicationInstanceID/e19d68ce-950f-4fd9-9b56-b3702e8ac73d/gadget.xml to a known app.

      2014-03-19 10:46:10,258 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - Successfully configured app (saved connects defaults)

      2014-03-19 10:46:10,272 [http-bio-8080-exec-13] [2079:awf30:REGULAR] INFO com.jivesoftware.community.redirect.CustomRedirectFilter - checking against redirect list for URL http://localhost:8080/people/awf30/avatar/24.png and URI /people/awf30/avatar/24.png

      2014-03-19 10:46:10,814 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.app.AppGadgetUpdateHandler - Could not resolve gadget URI https://developers.jivesoftware.com/appsmarket/opensocial/applicationInstanceID/44924223-aad9-4648-98c5-557dcc4f406a/gadget.xml to a known app.

      2014-03-19 10:46:10,840 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - Successfully configured app (saved connects defaults)

      2014-03-19 10:46:11,459 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.app.AppGadgetUpdateHandler - Could not resolve gadget URI https://developers.jivesoftware.com/appsmarket/opensocial/applicationInstanceID/c76845be-6eff-427c-b6fd-bc86597aff70/gadget.xml to a known app.

      2014-03-19 10:46:11,487 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - Successfully configured app (saved connects defaults)

      2014-03-19 10:46:12,034 [TaskEngineWorker-pool-1] [::] WARN com.jivesoftware.community.app.AppGadgetUpdateHandler - Could not resolve gadget URI https://developers.jivesoftware.com/appsmarket/opensocial/applicationInstanceID/ea00ca6e-4e36-424f-8f0b-92bc0f2cbb8e/gadget.xml to a known app.

      2014-03-19 10:46:12,058 [TaskEngineWorker-pool-1] [::] INFO com.jivesoftware.community.app.install.AppInstaller - Successfully configured app (saved connects defaults)

      2014-03-19 10:46:12,125 [NonBlockingEventDispatcher-thread] [::] ERROR com.jivesoftware.community.eae.impl.ActivityManagerImpl - Unable to add new activity. Writing to journal temporarily.

      1. com.jivesoftware.service.ingress.ActivityStreamServiceException: Could not get tenancy information to make service request!

                  at com.jivesoftware.service.client.search.JiveActivityStreamIngressService.add(JiveActivityStreamIngressService.java:41)

                  at com.jivesoftware.community.eae.impl.ActivityManagerImpl.addActivity(ActivityManagerImpl.java:279)

                  at com.jivesoftware.community.eae.impl.ActivityManagerImpl.addActivity(ActivityManagerImpl.java:262)

                  at com.jivesoftware.community.eae.proxy.ActivityManagerProxy.addActivity(ActivityManagerProxy.java:51)

                  at com.jivesoftware.community.eae.event.listeners.StatusLevelEventListener.handlePromotion(StatusLevelEventListener.java:52)

                  at com.jivesoftware.community.eae.event.listeners.StatusLevelEventListener.handle(StatusLevelEventListener.java:46)

                  at com.jivesoftware.community.eae.event.listeners.StatusLevelEventListener.handle(StatusLevelEventListener.java:1)

                  at com.jivesoftware.base.event.v2.EventDispatchHelper.dispatchEvent(EventDispatchHelper.java:162)

                  at com.jivesoftware.base.event.v2.NonBlockingEventDispatcherImpl$JiveEventWrapperFuture.complete(NonBlockingEventDispatcherImpl.java:283)

                  at com.jivesoftware.base.event.v2.NonBlockingEventDispatcherImpl.fireInternal(NonBlockingEventDispatcherImpl.java:166)

                  at com.jivesoftware.base.event.v2.EventDispatchHelper$CommitRunnable.run(EventDispatchHelper.java:250)

                  at com.jivesoftware.util.TransactionUtil$RunnableTransactionSynchronization.afterCommit(TransactionUtil.java:209)

                  at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:133)

                  at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:121)

                  at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:951)

                  at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:797)

                  at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)

                  at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387)

                  at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$afterReturning$org_springframework_transaction_aspectj_AbstractTransactionAspect$3$2a73e96c(AbstractTransactionAspect.aj:78)

                  at com.jivesoftware.community.statuslevel.event.AppInstanceEventListener.appAdded(AppInstanceEventListener.java:58)

                  at com.jivesoftware.community.statuslevel.event.AppInstanceEventListener.handle(AppInstanceEventListener.java:37)

                  at com.jivesoftware.community.statuslevel.event.AppInstanceEventListener.handle(AppInstanceEventListener.java:1)

                  at com.jivesoftware.base.event.v2.EventDispatchHelper.dispatchEvent(EventDispatchHelper.java:162)

                  at com.jivesoftware.base.event.v2.NonBlockingEventDispatcherImpl$JiveEventWrapperFuture.complete(NonBlockingEventDispatcherImpl.java:283)

                  at com.jivesoftware.base.event.v2.NonBlockingEventDispatcherImpl$EventsProcessor.run(NonBlockingEventDispatcherImpl.java:244)

       

      If anyone has faced a similar issue please help me on this.

      Thanks