juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Pryce (JIRA)" <juddi-...@ws.apache.org>
Subject [jira] Commented: (JUDDI-375) Null Pointer Exception in SubscriptionNotifier
Date Wed, 10 Mar 2010 16:15:27 GMT

    [ https://issues.apache.org/jira/browse/JUDDI-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843610#action_12843610

Adam Pryce commented on JUDDI-375:

To reproduce you could use a debugger to hold the subscription such that the if statement
is false. For production the issue is seen under load and it is easiest to see on an old machine
or you might be able to limit the JVM that tomcat runs on. I am not able to provide you with
the data I am testing with here.
When it comes down to it there is an "if" statement at line 144 which, if false, will always
result in a NPE at line 87. That "if" statement makes sense, so if you have it you need some
check so you don't break out of the subscription loop and fail to run the other subscriptions.

> Null Pointer Exception in SubscriptionNotifier
> ----------------------------------------------
>                 Key: JUDDI-375
>                 URL: https://issues.apache.org/jira/browse/JUDDI-375
>             Project: jUDDI
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.0.1
>         Environment: org.apache.juddi.subscription.SubscriptionNotifier
> When load becomes significant and the notifier falls behind.
>            Reporter: Adam Pryce
>            Assignee: Kurt T Stam
>            Priority: Minor
> When the load becomes significant it is possible for the following if statement at line
144 to resolve to false resulting in a null pointer being returned
> 144:		if (subscription.getLastNotified()==null || nextDesiredNotificationDate.after(startPoint)
&& nextDesiredNotificationDate.before(endPoint)) {
> If this if statement is sensible then there needs to be a null pointer check around line
87 to avoid NullPointerException. I could see something like this:
> 86:	GetSubscriptionResults getSubscriptionResults = buildGetSubscriptionResults(subscription,
new Date(scheduledExecutionTime()));
>         if(getSubscriptionResults == null)
>             continue;              
> 87:	getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
> I apologize that I cannot test and commit this change through subversion. I put priority
to minor since the NPE seems to have relatively little impact in the long term, but in the
short term all remaining subscriptions are skipped.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message