JiBX
  1. JiBX
  2. JIBX-376

java.lang.IllegalStateException: No way to handle type java.lang.Object

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Not A Bug
    • Affects Version/s: JiBX 1.2.2
    • Fix Version/s: None
    • Component/s: BindGen
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I am using JIBX to convert from Java to XML and back to Java.

      I am starting from Code.

      But when I use BindGen on my code to generate the binding I am getting the following exception -
      java.lang.IllegalStateException: No way to handle type java.lang.Object.

      It seems that BindGen is not able to handle declaration in code like -
      java.lang.Object myObj = null;

      This seems to be a major issue as the code will have such statements in lot of java files and this failure will mean that we will not be able to use JIBX.

        Activity

        Hide
        Vipul Bahuguna added a comment -

        Has anyone else also faced this issue? Is there any work around available for this problem?

        Show
        Vipul Bahuguna added a comment - Has anyone else also faced this issue? Is there any work around available for this problem?
        Hide
        Dennis Sosnoski added a comment -

        There's no way for BindGen to know the actual type of something typed java.lang.Object based only on the code, and therefore no way to create a binding or schema representation which accurately matches the data - but you can do this with customizations. See the <value> customization details at http://jibx.sourceforge.net/fromcode/bindgen-customs.html You might also want to look through the examples (which include a sample of customizing the type of items in a java.util.List instance), and perhaps the developerWorks tutorial at https://www.ibm.com/developerworks/java/tutorials/j-jibx1/ for a better understanding of how BindGen works.

        Show
        Dennis Sosnoski added a comment - There's no way for BindGen to know the actual type of something typed java.lang.Object based only on the code, and therefore no way to create a binding or schema representation which accurately matches the data - but you can do this with customizations. See the <value> customization details at http://jibx.sourceforge.net/fromcode/bindgen-customs.html You might also want to look through the examples (which include a sample of customizing the type of items in a java.util.List instance), and perhaps the developerWorks tutorial at https://www.ibm.com/developerworks/java/tutorials/j-jibx1/ for a better understanding of how BindGen works.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Vipul Bahuguna
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: