Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » Plain Java Application Constructor Parameter is null(POJO constructor Null Parameter)
Plain Java Application Constructor Parameter is null [message #742621] Thu, 20 October 2011 17:06 Go to next message
Vikram Kodak is currently offline Vikram KodakFriend
Messages: 72
Registered: October 2011
Member
In an Stardust process model, why would my POJO constructor parameter be null.
Re: Plain Java Application Constructor Parameter is null [message #742622 is a reply to message #742621] Thu, 20 October 2011 17:07 Go to previous messageGo to next message
Vikram Kodak is currently offline Vikram KodakFriend
Messages: 72
Registered: October 2011
Member
Did you configure two IN-data-mappings of the same kind. Probably by accident. Are they both configured to inject the structured data into the constructor?
Re: Plain Java Application Constructor Parameter is null [message #742624 is a reply to message #742622] Thu, 20 October 2011 17:08 Go to previous messageGo to next message
Vikram Kodak is currently offline Vikram KodakFriend
Messages: 72
Registered: October 2011
Member
The reason why the constructor parameter is NULL is that the data object has not been initialized in the process. Stardust tries to handle the space for data objects economically and any object that has never been used simply does not exist in the database.
When being consumed (as an IN-mapping, for example) without having been created before (e.g. as an OUT-mapping in a prior activity) then the object simply is NULL. Only primitives like long or boolean are automatically initiated to their defaults by Java.

If you had expected to receive an empty Map in your code, you should simply guard your constructor by checking for NULL and instantiating the Map if needed.
Re: Plain Java Application Constructor Parameter is null [message #742626 is a reply to message #742624] Thu, 20 October 2011 17:09 Go to previous message
Vikram Kodak is currently offline Vikram KodakFriend
Messages: 72
Registered: October 2011
Member
Yes !!
Thanks.
I made the change and it worked.
Previous Topic:Identifying the slowest non-interactive (automatic) activity instance using SQL
Next Topic:Identify which button click initiated 'complete' method call of backing bean
Goto Forum:
  


Current Time: Tue Apr 16 20:07:43 GMT 2024

Powered by FUDForum. Page generated in 0.02425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top