2 Replies Latest reply on Aug 7, 2006 10:30 PM by José Marcos Oliveira de Jesus

    Using Differents jars

    José Marcos Oliveira de Jesus Newbie

      Hello,

      I'd like to deploy my application using a .jar file for the Entity Beans and another one to the Session Beans, but I'm having some problems....

      When, for instance, I call "em.persist(user)", a exception "Unkown Entity: User" is thrown....

      If I put them all in a single .jar file, It works nicely....

      Could you help me ????

      Thanks

      Joseph

        • 1. Re: Using Differents jars
          David Owens Newbie

          Does the application part (without the entity beans) even deploy? If it deploys, it should work, but I'm not exactly sure what you're doing. In general, you should make sure your application jar/war deploys after your persistence jar.

          Hope this helps.

          • 2. Re: Using Differents jars
            José Marcos Oliveira de Jesus Newbie

            Hi,

            Thanks for the reply....

            Let me try to explain what I want to say....

            First, I created a interface.war for the web Interface and a ejb.jar with the entities and session beans within. Then, I packed those two in a .ear file, ok ?
            This worked smoothly.

            But now I want to separate the sessions and the entities in two different .jar files. For instance, a entity.jar and a session.jar. So my .ear file would look like this


            <display-name>ProjetoJM</display-name>

            Entity.jar


            Session.jar



            <web-uri>InterfaceJSF.war</web-uri>
            <context-root>Teste</context-root>





            Doing this, I'm getting exceptions just like tho one I told before.....

            Sorry about my english, but I'm a Brazillian guy and I'm still learning the language....

            Thanks....