NullPointerException in SVUtil.java

6 views
Skip to first unread message

Dave Butz

unread,
May 27, 2010, 3:23:59 PM5/27/10
to sarasvati-wf-users
Hi Paul

I've executed the TestHibLoad.java code and recieved a
NullPointerException. I haven't edited the code, just used your
sourcecode.

I think the addWithPrerequisites Method should not be called if the
parameter externalPD is null!

What do you mean?

Exception in thread "main" java.lang.NullPointerException
at
com.googlecode.sarasvati.util.SvUtil.addWithPrerequisites(SvUtil.java:
186)
at
com.googlecode.sarasvati.util.SvUtil.addWithPrerequisites(SvUtil.java:
191)
at com.googlecode.sarasvati.util.SvUtil.getSorted(SvUtil.java:175)
at
com.googlecode.sarasvati.load.GraphLoaderImpl.loadNewAndChanged(GraphLoaderImpl.java:
228)
at
com.googlecode.sarasvati.example.hib.TestHibLoad.main(TestHibLoad.java:
82)

Thanks
Dave

Paul Lorenz

unread,
May 27, 2010, 5:47:50 PM5/27/10
to sarasvati...@googlegroups.com
I can't tell if def is null, or if getExternals() is returning null. If def is null, that implies that we're missing a dependency, and that we should probably exit out with a load exception... I'll try to do some more digging on this tonight.

cheers,
Paul


--
You received this message because you are subscribed to the Google Groups "sarasvati-wf-users" group.
To post to this group, send email to sarasvati...@googlegroups.com.
To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sarasvati-wf-users?hl=en.


Paul Lorenz

unread,
May 27, 2010, 11:14:07 PM5/27/10
to sarasvati...@googlegroups.com
Hi Dave,
  I added Issue 61 to track this issue. Trunk has been updated to throw a nicer exception with explanatory test if a referenced external could not be found.

This leaves the question of why the external you're referencing can't be found, but hopefully with this patch it will either become clear or make it clear that there's another bug to fix. Let me know if this helps.

Cheers,
Paul

On Thu, May 27, 2010 at 3:23 PM, Dave Butz <butz...@gmail.com> wrote:

Dave Butz

unread,
May 30, 2010, 6:58:00 AM5/30/10
to sarasvati-wf-users
Hi Paul
Sorry for late answering. But here is the new result:

Exception in thread "main"
com.googlecode.sarasvati.load.SarasvatiLoadException: While loading
process definition "three-deep", could not find referenced external
with name="two-deep" and process-definition="two-deep".
at
com.googlecode.sarasvati.util.SvUtil.addWithPrerequisites(SvUtil.java:
193)
at com.googlecode.sarasvati.util.SvUtil.getSorted(SvUtil.java:176)
at
com.googlecode.sarasvati.load.GraphLoaderImpl.loadNewAndChanged(GraphLoaderImpl.java:
228)
at
com.googlecode.sarasvati.example.hib.TestHibLoad.main(TestHibLoad.java:
82)

I've got it. There is the two-deep.wf.xml ProcessDefinition missing in
your /common/test-wf folder. In order to get three-deep.wf.xml working
you need to add the two-deep.wf.xml into source control.

Otherwise I will remove the three-deep.wf.xml.

Thanks
Dave
> > sarasvati-wf-us...@googlegroups.com<sarasvati-wf-users%2Bunsubs cr...@googlegroups.com>
> > .

Paul Lorenz

unread,
May 30, 2010, 10:51:01 AM5/30/10
to sarasvati...@googlegroups.com
Hi Dave,
   Not sure why it's missing in your checkout, but two-deep.wf.xml is there in source control: http://code.google.com/p/sarasvati/source/browse/common/test-wf/two-deep.wf.xml

Cheers,
Paul

To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.

Dave Butz

unread,
May 30, 2010, 11:08:10 AM5/30/10
to sarasvati-wf-users
Definitely my fault, sorry. The next time I will check this before I
write to you.
I also dont know why it doesn't exist but I did now a fully recursive
get and everything is fine now.

On 30 Mai, 16:51, Paul Lorenz <plor...@gmail.com> wrote:
> Hi Dave,
>    Not sure why it's missing in your checkout, but two-deep.wf.xml is there
> in source control:http://code.google.com/p/sarasvati/source/browse/common/test-wf/two-d...
>
> Cheers,
> Paul
>
>
>
> On Sun, May 30, 2010 at 6:58 AM, Dave Butz <butzd...@gmail.com> wrote:
> > Hi Paul
> > Sorry for late answering. But here is the new result:
>
> > Exception in thread "main"
> > com.googlecode.sarasvati.load.SarasvatiLoadException: While loading
> > process definition "three-deep", could not find referenced external
> > with name="two-deep" and process-definition="two-deep".
> >         at
> > com.googlecode.sarasvati.util.SvUtil.addWithPrerequisites(SvUtil.java:
> > 193)
> >        at com.googlecode.sarasvati.util.SvUtil.getSorted(SvUtil.java:176)
> >         at
>
> > > > sarasvati-wf-us...@googlegroups.com<sarasvati-wf-users%2Bunsubs cr...@googlegroups.com><sarasvati-wf-users%2Bunsubs
Reply all
Reply to author
Forward
0 new messages