3 Replies Latest reply on Jul 17, 2003 4:59 AM by adrian.brock

    entity bean problem

    tiltedj

      Hi -
      im new to EJB's.. and ive just written my first bean (a BMP entity bean). to test it i wrote a simple jsp that gets an instance of the bean and calls different methods on it depending on the params i pass the jsp. this works exactly as i want it to.

      now im trying to use my EJB within my application by calling on it from a normal javabean. unfortunately i cant get the javabean to compile.. even when using the exact same code to call the EJB and methods. i verified that my ejb jar is in my classpath.

      any ideas what im doing wrong? is there a recommended way to call on my EJB instead of doing it directly from my javabean class? i have a feeling im going about this all wrong.. so if thats the case feel free to school me. =]

      thanks
      Kevin

        • 1. Re: entity bean problem

          You haven't posted the error.
          You are probably missing jboss-j2ee.jar from your classpath?

          Regards,
          Adrian

          • 2. Re: entity bean problem
            tiltedj

            sorry..the specific error is below:

            FavBean.java:57: cannot resolve symbol
            symbol : method getFavoriteAlbums ()
            location: interface org.beatz.ejb.favorites.Favorites
            Object[] ids = fav.getFavoriteAlbums();

            the jspcompiler has no problem compiling my test jsp. could it be a classpath/classloader issue? im still relatively new to JBOSS and very new to EJB.. so im still trying to figure out how my environment should be setup. right now im dropping my favorites.jar into the server/default/deploy directory. ive verified that favorites.jar is in my classpath as well... so the Favorites class (my remote interface) is in my classpath.

            thanks
            Kevin

            • 3. Re: entity bean problem

              You probably have the wrong version of the class
              in your classpath?

              Regards,
              Adrian