For 1 reason or another subscriptions with daily frequency don't work in our portal.
On SDN I found a lot of discussions about this topic and as far as I can judge the settings (e.g. activate Polling Scheduler Task) are OK.
In default trace log file I found errors around the time the polling scheduler task was supposed to run:
SubscriptionManager subscription: error polling DailySubscriptions while getting notificiations - java.lang.NullPointerException
Anyone any idea what causes this error?
I have assigned Active Directory groups to the subscription as recipients. This means that the Active Directory members of the groups should receive a notification. As possible reason for the error could be that not all Active Directory accounts have an e-mail address assigned to them. But I'm not sure as I didn't find any information about the error.
Thanks for the reply. For permissions and subscriptions we use the same AD-groups. So the members of those groups do have read access.
I think the problem may be caused by empty AD-groups.
To find out if this is the case I doing some testing with different combinations.
We got a similar issue in the past ,the exception is coming from this method
private boolean parameterOk(IResource resource, IUser user, IPermission
It checks the validity of the parameters and in this case the resource which is checked or the user should be null to throw this exception.As the resources are returned from the crawler and they are checked one by one for permissions against the users I expect that they are not null.
The user is taken from he object Recipient and I checked that in case of group such Recipient object can be created, but later when the group is expanded to list of users every user is created separately. And because of the exception it seems that the some users cannot be resolved and the Recipients objects that are created from them are containing user with ID null. From this the method for checking parametters fails and throws NullpointerException which breaks the whole process of sending notifications.
The idea that we have is to check for such exception and to not break the whole process, only the broken users will not receive notifications. But in general I think that there is some inconsistency in the system. It seems that you have a group which contains some IDs and for these IDs
there is no assigned LDAP user. Try also to assign exactly the same goups to the working subscription as recipients and check whether it will work properly.
Thank you very much for the reply.
Indeed I think I have to investigate in that direction.
This morning I was looking at the default trace and found the errors below:
Error: SubscriptionManager: error getting user "xxxxx" caused by: null
Warning: RecipientFactory: unable to create recipient id=xxxxx type=0
Error: EmailChannel: message error while setting recipient for EMAIL: Illegal address javax.mail.internet.AddressException: Illegal address in string `` ''
User xxxxx indeed does not exist in our LDAP.
However, this time the NullPointerException did not occur and several subscription mails were sent out.
I already found out that:
-LDAP (or Active directory) users without a mail address assigned to them do not cause problems
-Empty LDAP groups assigned to subscription do not cause problems.