2 Replies Latest reply on Oct 9, 2003 3:15 AM by Darran Lofthouse

    noclassdefferror on deploying

    jdijkmeijer Newbie

      Hi i constructed an ejb, with an ejb.create method with a few strings as arguments. All works really fine.
      Getting really reckless I made another ejbCreate method this time with a strutsform object (generated from xdoclet) as argument. (Thought it would be really nice just to pass in a strutsform). However the deployer jboss 3.2.1 does not like the strutsform, and complains that it cant find it. Now thats a lie! The complete subclassed actionformclass is in the jar. Double checked it, no typos.
      Does anybody has a hint on this issue.
      I also remember someone telling me that it was not wise to pass an actionformclass as argument to an ejbcreate. Is this well remembered and why?
      thnx in advance.

        • 1. Re: noclassdefferror on deploying
          jdijkmeijer Newbie

          One more thing..
          The error I get is:

          and below the proof that my jar does contain the mentioned class:

          -rw-r--r-- 546 8-Oct-2003 18:49:12 org/spuyt/interfaces/Subject.class
          -rw-r--r-- 701 8-Oct-2003 18:49:12 org/spuyt/interfaces/SubjectHome.class
          -rw-r--r-- 999 8-Oct-2003 18:49:14 org/spuyt/web/akties/SubjectListAction.class
          -rw-r--r-- 3705 8-Oct-2003 18:49:12 org/spuyt/web/akties/TestFinder.class
          -rw-r--r-- 2701 8-Oct-2003 18:49:12 org/spuyt/web/forms/SubjectFullForm.class
          -rw-r--r-- 1800 8-Oct-2003 18:49:14
          -rw-r--r-- 701 8-Oct-2003 18:49:12

          • 2. Re: noclassdefferror on deploying
            Darran Lofthouse Master

            The reason that it is bad practice to be passing an action form class into the ejbCreate method is because your persistence layer should not need to be aware of anything in the presentation layer.

            In addition to this it is recommended in a few places that you only pass the minimum number of data items into ejbCreate and then set the remaining values using the exposed set methods.

            Also have you considered using a session bean in front of the entity beans? That would make it a lot easier in the future to completely change the client that is accessing your beans.