Skip to main content
Summary Trying to send a null string in Orbix 6.3 java results in null pointer exception
Article Number 13694
Environment All Supported Operating Systems Orbix Java Runtime Orbix 6.3.3
Question/Problem Description Trying to send a null string in Orbix 6.3 java results in null pointer exception
Orbix process throws NPE despite of setting plugins:codeset:interop_allow_null_strings to true in order to allow null strings to be marshaled
Unable to marshal null strings for bounded string IDL definitions
Detailed exception is:

 

11:59:12 10/07/2009 [_it_orb_id_1@florast/135.21.52.72] (IT_POA:103) W - native exception caught during dispatch by SampleCorbaServerServer_poa : java.lang.NullPointerException
at SampleCorbaServer.EventDateHelper.write(EventDateHelper.java:100)
at SampleCorbaServer.EventDateListHelper.write(EventDateListHelper.java:86)
at SampleCorbaServer.EventSvcPOA._getDates_static(EventSvcPOA.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at SampleCorbaServer.EventSvcPOA._invoke(EventSvcPOA.java:29)
at com.iona.corba.poa.SimpleRequestInterceptor.dispatch_request(Unknown Source)
at com.iona.corba.poa.SimpleRequestInterceptor.invoke(Unknown Source)
at com.iona.corba.poa.AsynchRequestItem.execute(Unknown Source)
at com.iona.corba.art.workqueue.ManualWorkQueueImpl.do_one_job(Unknown Source)
at com.iona.corba.art.workqueue.ManualWorkQueueImpl.do_work(Unknown Source)
at com.iona.corba.art.artimpl.ORBDelegate.run(Unknown Source)
at com.iona.corba.art.artimpl.ORBImpl.run(Unknown Source)
at test.SampleCorbaServerServer.main(SampleCorbaServerServer.java:127)
Clarifying Information
Error Message
Defect/Enhancement Number ORB-1674
Cause There is a problem in the implementation of the plugins:codeset:interop_allow_null_strings variable. Even if the variable is set to true, passing bounded IDL string definitions will cause an Orbix 6.3 java application to throw a null pointer exception in the IDL generated code
Resolution None at this time

There are two possible workarounds to this problem:

1) Make a change in the java code to return or send empty strings ("") as opposed to null strings

 

2) Make a change in the IDL contract to remove length restrictions for bounded strings
Workaround
Notes
Attachment
Created date: 06 September 2011
Last Modified: 13 February 2013
Last Published: 23 June 2012
First Published date: 09 September 2011

#KnowledgeDocs
#Orbix