Deserializer producing nulls instead of objects

I'm using JAX RPC RI and generating my client code using the java service code, not the wsdl. In one of my test calls, I'm trying to return a custom object. One of the members of that object is an ArrayList of another type of custom object. Once the object is deserialized, the ArrayList is empty. I've also tried replacing the ArrayList with a regular array, and in that case I end up with an array of the correct length, but with all the elements null. I've snooped on the SOAP traffic (using a cool tool: http://capescience.capeclear.com/articles/using_nettool/) and the XML being returned from the service looks correct. The object looks thusly:
class ComplexA {
ArrayList _listOfBs;
public ArrayList getListOfBs() {
return _listOfBs;
public void setListOfBs( ArrayList list ) {
_listOfBs = list;
class ComplexB {
... more members
Both classes follow all the rules of JavaBeans. Also, I can correctly pass ComplexB objects. It's only when they're inside an ArrayList inside ComplexA that they get lost. I've looked at the code generated by wscompile and it looks OK. I really wish they would release the JAX RPC source. Unfortunately, I haven't been able to boil this problem down to a simple code example. Most things work, just this one problem does not.
One other thing: Running this through the debugger, I can see that the ComplexBs get constructed during deserialization, so something is breaking down when they are supposed to be added to a new ArrayList.

OK, I figured out what was going wrong. Part of it was the way I was testing the deserialization. Part of it was how deserialization is done.
I had assumed that when the deserializer called my setFoo( ArrayList ) method, that the List would already be populated, so I was printing the size of the list to stdout from inside setFoo and if it was 0, I was assuming it had failed. The trouble is that the deserializer does the following instead:
ArrayList newFoo = new ArrayList();
newComplexA.setFoo( newFoo );
newFoo.add( ...first item in list... );
newFoo.add( ...second item in list... );
In other words, it populates the array after it passes it to you. That's OK as long as you are saving a reference to that array. But I was using the array as a convenient way to pass the contents of my object and my setter was reading the array and populating an internal variable based on that. So when the deserializer post-populated the array, I missed out on those changes.

Similar Messages

  • Can't yet deserialize non-null Objects

    "Can't yet deserialize non-null Objects"
    This is the error that I get when calling a Web Service Producer - not a single hint ion what is wrong and why. :)
    This is a RPC Web Service and all the input params are of type xsd:anyType...
    May be a hint from somebody?
    Thx,
    Eugene.

    Well may be it's me or the soapUI. :) It seems that the soapUI that I have 3.0.1 (Ubuntu 9.10) does not seem to know how to pass xsd:anyType... I still get errors though :D, but none related to "null" or "non-null" if I build a Java Code Client!
    Thx,
    Eugene.

  • How do i get rid of type error null is an object on my iphone ? It keeps popping up on my yahoo, please help ?

    How do i get rid of type error null is an object on my iphone ? It keeps popping up on my yahoo, its driving me mad, please help.

    That's probably a Javascript error in what Yahoo is producing. Contact Yahoo and inform them of the problem.

  • Discoverer report showing null instead blank

    hi,
    I am running report from discoverer and it is showing null instead blank, do I need to check some thing in pref.txt file in oracle 9i
    regards
    kumar

    hi,
    I am running report from discoverer and it is showing null instead blank, do I need to check some thing in pref.txt file in oracle 9i
    regards
    kumar

  • Discoverer 10.1.2.55.26 Viewer Shows NULL instead of Blank

    Hello All,
    we recently installed Discoverer 10.1.2.55.26 and applied cumulative patches(CM4). we migrated 9.04 version reports to Discoverer 10g(10.1.2.55.26).
    On all the Reports, we see NULL instead of Blank spaces in the data in the viewer. How can we change all of the reports to show blank space instead of NULL.
    Please share your experience and thoughts on this Issue
    Thank you
    Chandu Ambati

    Thank you Tamir,
    Before i try on the big bang approach. I tried changing the worksheet options for one of the worksheet that shows NULL.
    I changed from NULL to blank space and saved the workbook.
    we use Oracle Portal to show these workbooks as Portal Views. Portal View was showing NULL before the change, and after changing the worksheet options and saving it, i refreshed the portal view and it started showing Blank instead of NULL. Works fine for that day.
    The next Day again it started showing NULL.
    Do u think are we missing any step?
    Thanks again for your help.
    Chandu Ambati

  • Showing 0 or Null instead of blank in rpt?

    Hi,
    I created a report in the below fomat :
    -------- Col1, Col 2, Col 3
    Row1 - 12, 1, 01
    Row2 - 11, , 94,
    Rown - 23, 34,
    As per the condition defined I am not getting any value under col2-row2 and col3-rown...It is diaplayed as blank in the rpt.
    I would like to show 0 or Null instead of blank. How can I achieve this?
    Thanks....VK
    Edited by: 793773 on Sep 29, 2010 11:22 PM
    Edited by: 793773 on Sep 29, 2010 11:24 PM

    Yup I achieved it using IFNULL function. Below syntax I used.
    IFNULL(FILTER("- Quantity"."Total Quantity" USING (Product.TEXT_0 = 'Day')),0)
    Regards....VK

  • Reading a CSV file and producing an array of objects

    Hi everybody,
    I am writing an application which will read a cvs file and produce an array of objects.
    Can any body help me to solve this problem?
    Thanks
    Finny

    Hello,
    Have you tried this link?
    http://ostermiller.org/utils/CSV.html

  • What is the use of setting null values to Objects?

    What is the use of setting null values to Objects?
    regards,
    namanc

    It's more of a safety trap within java to handle the "programmers are still humans" exception.
    String myname;
    // print what???? Forgot to initialize the name!
    System.out.println(myname);Java will complain about myname not being initialized. It won't when you do this:
    String myname = null;
    // allright, your name is null
    System.out.println(myname);In the second case you are showing to java that you know what you are doing.

  • CreateQueueConnection produce null

    Hi all,
    I've been having trouble with my codes. The codes is like below. The purpose of this code is to established a connection with a JMS server, so I can retrieve messages in the queue.
    The problem is, createQueueConnection always produce null. I have no idea why this is happening. This code is working in the 10.21.75.114 server, or in another server (10.21.75.131), but not in my machine (172.30.202.58). I've tried connecting to the server using telnet and it works.
    I know that it's probably a network problem, but is there any possibility of a library or code problem?
    import javax.jms.JMSException;
    import javax.jms.JMSSecurityException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.Queue;
    import javax.jms.QueueConnection;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.QueueReceiver;
    import javax.jms.QueueSession;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Hashtable;
    public class TesterJava implements MessageListener {
         private static QueueConnectionFactory qConnFactory;
    private static InitialContext initContext;
         private QueueConnection qConn;
    private QueueReceiver qReceiver;
    private Queue queue;
    public TesterJava () {
              super();
         public void open () throws NamingException, JMSException, JMSSecurityException {
         System.out.println ("qConnFactory "+ qConnFactory);
         if (qConnFactory != null)     
                   qConn = qConnFactory.createQueueConnection();
              //System.out.println(qConn);
         public void onMessage (Message msg) {
    private InitialContext getInitialContext () throws NamingException {
              Hashtable env = new Hashtable ();
              System.out.println (Context.INITIAL_CONTEXT_FACTORY);
              System.out.println (Context.PROVIDER_URL);     
              env.put (Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              env.put (Context.PROVIDER_URL, "t3://10.21.75.114:6543");
              return new InitialContext (env);     
    private void openContext () throws NamingException, JMSException {
              if (initContext==null) {
         initContext = getInitialContext();
         System.out.println(initContext);
    if (qConnFactory==null) {
                   qConnFactory = (QueueConnectionFactory)initContext.lookup("amdocs.ChangeOTAParamsJMSFactory");
                   System.out.println ("qconnFact: "+ qConnFactory);
    private void closeContext () throws NamingException {
              initContext.close ();
         private void close () throws JMSException{
              qConn.close ();          
         public static void main (String[] args) {
              TesterJava tester = new TesterJava();
         try {     
              tester.openContext();
              tester.open();
              tester.close();
              tester.closeContext();
              catch (Exception e)
                   e.printStackTrace();
    }

    Hi all,
    I've been having trouble with my codes. The codes is like below. The purpose of this code is to established a connection with a JMS server, so I can retrieve messages in the queue.
    The problem is, createQueueConnection always produce null. I have no idea why this is happening. This code is working in the 10.21.75.114 server, or in another server (10.21.75.131), but not in my machine (172.30.202.58). I've tried connecting to the server using telnet and it works.
    I know that it's probably a network problem, but is there any possibility of a library or code problem?
    import javax.jms.JMSException;
    import javax.jms.JMSSecurityException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.Queue;
    import javax.jms.QueueConnection;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.QueueReceiver;
    import javax.jms.QueueSession;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Hashtable;
    public class TesterJava implements MessageListener {
         private static QueueConnectionFactory qConnFactory;
    private static InitialContext initContext;
         private QueueConnection qConn;
    private QueueReceiver qReceiver;
    private Queue queue;
    public TesterJava () {
              super();
         public void open () throws NamingException, JMSException, JMSSecurityException {
         System.out.println ("qConnFactory "+ qConnFactory);
         if (qConnFactory != null)     
                   qConn = qConnFactory.createQueueConnection();
              //System.out.println(qConn);
         public void onMessage (Message msg) {
    private InitialContext getInitialContext () throws NamingException {
              Hashtable env = new Hashtable ();
              System.out.println (Context.INITIAL_CONTEXT_FACTORY);
              System.out.println (Context.PROVIDER_URL);     
              env.put (Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              env.put (Context.PROVIDER_URL, "t3://10.21.75.114:6543");
              return new InitialContext (env);     
    private void openContext () throws NamingException, JMSException {
              if (initContext==null) {
         initContext = getInitialContext();
         System.out.println(initContext);
    if (qConnFactory==null) {
                   qConnFactory = (QueueConnectionFactory)initContext.lookup("amdocs.ChangeOTAParamsJMSFactory");
                   System.out.println ("qconnFact: "+ qConnFactory);
    private void closeContext () throws NamingException {
              initContext.close ();
         private void close () throws JMSException{
              qConn.close ();          
         public static void main (String[] args) {
              TesterJava tester = new TesterJava();
         try {     
              tester.openContext();
              tester.open();
              tester.close();
              tester.closeContext();
              catch (Exception e)
                   e.printStackTrace();
    }

  • Click produces menus instead of desired action.  Menu can be cleared using esc key, but additional clicks produce more menus until I hit the lucky click that yields the desired action.

    Magic mouse & trackpad "clicks" produce menus instead of desired actions. Menus can be cleared using esc key, but additional clicks usually produce menus until I hit the magic click that initiates the desired action.  How can I deactivate the menus that appear?

    Sounds like your left click is set to right click. Read this: http://magicmousehelp.com/change-primary-click-magic-mouse/

  • 'style is null not an object' error in cmssitemanager.js

    
    Hi,
    I have registered js files using customaction tag in element.xml file for Custom master page,
    Now when I am trying to upload an image to a list (where image field is a publishing field, and here the master page is
    default V4.master page), am getting the following error.
    I have followed the following blog, but did not get any result.
    http://www.bradcurtis.com/sharepoint-2010-jquery-compatibility-errors-cmssitemanager-js/
    This is very urgent for me.
    Thanks in advance !
    Soumya Das

    Hi,
    According to your post, my understanding is that you got the 'style is null not an object' error in cmssitemanager.js.
    Please make sure you add the Script reference to the Master Page correctly. You can refer to:
    SharePoint 2010 Custom Master Page Tips and Tricks -> JavaScript and StyleSheet Reference
    Please make sure you use the no conflict JavaScript correctly. You can right after including the library:
    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script>
    <script>jQuery.noConflict();</script>
    Here is a similar thread for your reference:
    http://stackoverflow.com/questions/8249256/ie-error-style-is-null-or-not-an-object-lightbox-resize-js
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Is it necessary to null any unused objects?

    Hi folks,
    I have heard people said to null and not to null the unused objects both. To be honest, I really notice nulling the objects will help to reclaim the memory from the unused objects. Please tell me if I am doing it wrong, thanks!
    Billy

    evebill8 wrote:
    I have heard people said to null and not to null the unused objects both. 'objects' are not set to 'null'. References to objects can be set to 'null' . When a reference goes out of scope then the referenced object becomes eligible for garbage collection if there are no other references to it.
    References should be declared in the shortest scope possible that way they exist for the shortest time possible and cannot be responsible for stopping an object being garbage collected.
    To be honest, I really notice nulling the objects will help to reclaim the memory from the unused objects. Please tell me if I am doing it wrong, thanks!If you "notice nulling the objects will help to reclaim the memory from the unused objects" then the chances are you have declared the references in too wide a scope. How do you know that it makes a difference in your programs? What measurements have you made?
    There are some situations when you need to set references to null but they are few and far between. Just make the scope of a reference as small as possible.

  • WAD - Tab Strips - document.getElementById(...)  is null or no object

    Hello to everybody,
    i  have a problem with the wad, i would like to create a tab strip, i have copied the HTML Coding from another blog. When i started the Query i alway receive the message "document.getElementById(...) ist Null oder kein Object". What can i do ? I have the IE 6.0 on my system.
    Thanks for any help
    Detlev
    Coding:

    Hi,
    It has nothing to do with IE 6.0. Javascript is not written within function like function set_actual_tab(). Can you please paste the code here.
    Regards,
    Mona

  • Basic Table UI produces null pointer exception

    Hi,
    I am developing a software that heavily uses JTables with Jlabels rendered as its cells. The software works well except that it sometimes produces a NullPointerException like:
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setValueIsAdjusting(BasicTableUI.java:481)
    at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.adjustFocusAndSelection(BasicTableUI.java:521)
    at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mouseReleased(BasicTableUI.java:536)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    My problem is that I couldn't find where this exception is taking place and it sometimes makes the application stop.
    many thanks

    Hi Kris,
    I'm just down the M4 in Eton Wick ;)
    It would be helpful to know which of the lines is throwing the NPE.
    A suggestion for you as well. Instead of coding:
    if (someValue.equals("VALUEA"))which could throw an NPE if someValue is null, do this instead:
    if ("VALUEA".equals(someValue))That's probably not your issue, but something I often flag up in a code review.
    Best,
    john

  • SSRS 2012: How to get a "Select All" that returns NULL instead of an actual list of all values from a multi-select parameter?

    I have a multi-select parameter that can have a list of thousands of entries. In general, the user will pick a few entries from the list or "Select All". If they check "Select All", I would much prefer that I get a NULL or an empty string
    instead of a list of all values. Is there any way to do that?
    In experimenting with a work-around, I tried putting an "All" label with a null value in the list, but it is ignored (does not display in the drop-down). If I use an empty string for the value, my "All" entry does get displayed, but so
    does "Select All", which is confusing. Is there a way to suppress "Select All"?
    - Mark

    I adapted the following from a workaround posted by JNeo on 4/16/2010 at 11:14 AM at
    http://connect.microsoft.com/SQLServer/feedback/details/249227/multi-value-select-all-parameter-in-reporting-services
    To get a null value instead of the full list of all values when "Select All" is chosen:
    1) Add a multi-value parameter "MyParam" that lists the values to choose.
    2) Add a DataSet "ParamCount" identical to the one used by "MyParam", except that it returns a single column named [Count] that is a COUNT(*) of the same data
    3) Add a parameter "MyParamCount", set it to hidden and internal, then set the default value to 'Get values from a query', choosing "ParamCount" for the Dataset and the one [Count] column for the Value field.
    4) Change the parameter for the main report DataSet so that instead of using [@MyParam], it uses this expression:
    =IIF(Parameters!MyParam.Count =
    Parameters!ParamCount.Value, Nothing, Join(Parameters!MyParam.Value, ","))

Maybe you are looking for

  • Using NULL and NOT NULL in prompted filters

    Dear all, While trying to grap the concept of prompted filters in sap bo web intelligence, I had a question whether why we cannot use NULL and NOT NULL while creating a prompted filters in our report.

  • Why a field with javascript formula is not displaying result on .pdf form

    I have created a .pdf form from an exel file. I have assigned java script formula such as if (QtyRow1 > 0) { QtyRow1, €UPRow1;}else{€TotalPriceRow1="";} Problem is, result is not displayed on form. What should I do? J'ai créer un formulaire en format

  • Eclipse on solaris 10 x86

    Can anyone be kind enough to tell me how to launch eclipse on my solaris. I am running "eclipse -vm /usr/bin/java" command but it is not doing anything.

  • JVM crash in netbeans 5.0 using JPDA

    It happens almost all the time when I use netbeans 5.0 (jdk1.5.0_06-b05) attaching a remote java process with jpda. And the hotspot err file looks like below. I am not sure if this is due to Windows XP upgrade by the IT guys of my company. Thanks alo

  • CS4: lost layer?

    I have recently upgraded form CS3 to CS4 Fireworks. I have a photoshop psd file with quite a few laywers showing th edesign of a web page I want to build. It includes a few layers for some drop down menus. When I open the file in Fireworks CS#, I can