Posted: Fri Feb 18, 2005 2:57 pm Post subject: Java Procedure
Acolyte
Joined: 19 Feb 2004 Posts: 73
I am calling a java method to make changes to Environment.Variables
I get the following error:
<com.ibm.broker.plugin.MbRecoverableException class:JNI method:ImbValue::checkValid source:BIPv500 key:2329 >
at com.ibm.broker.plugin.MbElement._getValue(Native Method)
at com.ibm.broker.plugin.MbElement.getValue(MbElement.java:1161)
at mil.dod.dimhrs.wbimb.HistJobRow.<init>(HistJobRow.java:31)
at mil.dod.dimhrs.wbimb.Utility.getJobRows(Utility.java:40)
[BIPv500:2329]BIP2329E: An unexpected NULL value was encountered.
This message will be accompanied with others which will give the higher level context for this error. Look at these other messages to determine the root source of the problem. : Value not valid
My code looks like this:
MbElement someField = element.getFirstElementByPath("SomeField");
setSomeField(String.valueOf(someField.getValue()));
Is this what can be expected if I am accessing part of Environment.Variables that was set through a select on a null valued column?
The BIP2329E you have received in this scenario is because the message tree field you have accessed contains a NULL value. When you make the getValue() call on an MbElement object then this will attempt to retrieve the value of the field you are referencing. However, this could present a potential problem if the value of the field is actually NULL. If the left hand side of your expression cannot receive a NULL then this would cause problems. If there is a possibility that your message tree fields can contain a NULL value, then you should first use getValueState to determine if the field is NULL or not. If this returns you a VALUE_STATE_VALID then it should be safe to retrieve the value using getValue. If the does return this state, then you can assume that the field does not contain a valid value, and is NULL. Hope this helps. _________________ Regards
Craig
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum