4 Replies Latest reply on Feb 2, 2010 6:54 AM by aheino

    Smooks xml-to-java mapping using wizard

      I have installed the JBoss Tools 3.1 version and I am now trying to add Smooks transformation to my JBossESB project.

       

      Using the wizard I am able to create the input task, but when I try to add the Java Class to map against, the"Add Java Bean Instance" dialog does not let me continue even thou I have given the "Bean ID" and selected a class. I created two classes Order and OrderItems.

       

      The dialog just says:  "Java Class must be configured" and there is nothing on the box below.

       

      Am I missing something from the configuration. I tried to follow the instructions by Tom Fennelly in his blog entry

      JBoss Tools Smooks Editor - Progress...

      -Atte

       

        • 1. Re: Smooks xml-to-java mapping using wizard
          bfitzpat

          Hi Atte...

           

          What build of JBT 3.1 are you using? We had some issues that have been resolved in the latest JBT 3.1 CR2 builds.

           

          --Fitz

          1 of 1 people found this helpful
          • 2. Re: Smooks xml-to-java mapping using wizard
            bfitzpat

            Atte, it just occurred to me that this may be due to the fact that your classes don't follow the Java Bean pattern?

             

            Check out http://en.wikipedia.org/wiki/JavaBean for more info about this pattern and see if it helps.

             

            Keep us posted!

            --Fitz

            1 of 1 people found this helpful
            • 3. Re: Smooks xml-to-java mapping using wizard

              Hi Fitz and thanks for your reply!

               

              I'm running the 3.1 CR1 version of the JBT ( 1.3.0.v200912250601M-H198-CR1)

               

              You were correct about me not following the Java Bean Pattern. I was just following the class example from Tom's video and was too lazy to check the actual specs So now I have altered my classes to follow the pattern. (I was missing the default constructor and I also made them serializable.)

               

              But, it's still not working so I'll try to update the JBT to CR2. let's see if that helps.

               

              -Atte

              • 4. Re: Smooks xml-to-java mapping using wizard

                Hi again!

                 

                I finally got it working. I had to change the compiler compliance level to "1.5". Previously I had 1.6 there as it is the default.

                Once changing that setting, everything started to work smoothly.

                 

                Also upgrading the JBT to CR2 was pretty interesting process I actually started clean from a new eclipse installation as upgrading hit the brick wall every time.. Well I'm kinda new to eclipse so it's my fault

                 

                But now my environment is up and running and I can get back to evaluating this great piece of software!

                Thanks for your help and keep up the good work!

                 

                -Atte

                 

                Message was edited by: Atte Heino