5 Replies Latest reply on Oct 28, 2014 12:56 PM by Wolf-Dieter Fink

    Ear Deployment Failure Jboss 7.1.1

    Venkat Karra Newbie

      @

      Dear Friends......

      Hope You Are Doing Great!!!!!!!!,

       

      Last couple of days iam struggling for deploying the ear file,this ear file having 3 modules two are ejb and one is web module,the ear file is generating fine,but iam getting the

      following error while the request.i request to all please help me out.iam unable to recognize the error.Here is the Project architecture and xml configuration files.

       

      RISEAR.ear

              |

              |- META-INF

                  |

                  |- application.xml

                  |- jboss-deployment-structure.xml

                  |- persistence.xml

                  |- jboss-app.xml

              |

              |- lib

                  |

                  |- *.jar

              |

              |- RisPersistence-1.0-SNAPSHOT.jar

                  |- com

                      |

                      |- All Class Files

                  |- META-INF

                      |

                      |- jboss.xml

                      |- ejb-jar.xml

                      |- beans.xml

            |

            |- RisServices-1.0-SNAPSHOT.jar

                  |- com

                      |

                      |- All Class Files

                  |- META-INF

                      |

                      |- jboss.xml

                      |- ejb-jar.xml

                      |- beans.xml

            |

            |- RisWeb-1.0-SNAPSHOT.war

                  |- WEB-INF

                  |- classes

                    |

                    |- com

                       |

                       |- .class files

                    |- ApplicationResource.Properties

                    |- struts.xml

                    |- validators.xml

                |- lib

                   |

                   |- *.jar

                   

               |- web.xml

               |- jboss-web

       

       

      Thanks & Regards

      Venkat.

        • 1. Re: Ear Deployment Failure Jboss 7.1.1
          Wolf-Dieter Fink Master

          I can't open the zip file.

          Please check it and provide a bit more informations

          • 2. Re: Ear Deployment Failure Jboss 7.1.1
            Venkat Karra Newbie

            Dear Wolf,

             

            Thank you for your quick response,Iam going to attach a new file which is in winrar format and the lib files names attached as screen shots please have look and provide your needful suggestions.

             

            Thanks & Regards,

            Venkat

            • 3. Re: Ear Deployment Failure Jboss 7.1.1
              Wolf-Dieter Fink Master

              From the Exception it looks like you have the old style EJB-JNDI names used in the application.

              But since AS7 this has been changed according to the EJB specification (unified EJB names).

               

              The Old name is set by default or you have set it with the jboss.xml descriptor

                  RISEAR/ClientServiceEjb/local

              Since AS7 this is automaticaly the name of EAR/Module/BeanName!Full.quallified.View.name, the logfile shows this:

                 RISEAR/RisServices-1.0-SNAPSHOT/ClientServiceEjb!com.saince.agenda.services.client.ClientService

               

              You need to change your internal JNDI names, if you are in the same module or app you can use it like this:

                  app/RisServices-1.0-SNAPSHOT/ClientServiceEjb!com.saince.agenda.services.client.ClientService

                  module/ClientServiceEjb!com.saince.agenda.services.client.ClientService

               

              For more you can find examples in the documentation or the quickstarts

              • 4. Re: Ear Deployment Failure Jboss 7.1.1
                Venkat Karra Newbie

                Dear Wolf,

                 

                Once again Thank you for your quick response,please have a look my ejb session beans ,as of now i didn't set any  EJB-JNDI Name in the application,i hope it talking as default value like the below.The application having around 40 to 50 session beans are there.So that can i make one jboss.xml file for all or can i inject the annotation like eitehr @Local  or @LocalBinding. I request you to please send me the sample jboss.xml based on  my Session Beans.

                 

                18:13:41,087 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-4) JNDI bindings for session bean named ClientServiceEjb in deployment unit subdeployment "RisServices-1.0-SNAPSHOT.jar" of deployment "RISEAR.ear" are as follows:

                 

                    java:global/RISEAR/RisServices-1.0-SNAPSHOT/ClientServiceEjb!com.saince.agenda.services.client.ClientService

                    java:app/RisServices-1.0-SNAPSHOT/ClientServiceEjb!com.saince.agenda.services.client.ClientService

                    java:module/ClientServiceEjb!com.saince.agenda.services.client.ClientService

                    java:global/RISEAR/RisServices-1.0-SNAPSHOT/ClientServiceEjb

                    java:app/RisServices-1.0-SNAPSHOT/ClientServiceEjb

                    java:module/ClientServiceEjb

                 

                 

                package com.saince.agenda.services.client;

                 

                import java.util.Date;

                import java.util.List;

                import java.util.Set;

                 

                import javax.annotation.Resource;

                import javax.annotation.security.PermitAll;

                import javax.annotation.security.RolesAllowed;

                import javax.ejb.EJB;

                import javax.ejb.EJBContext;

                import javax.ejb.Local;

                import javax.ejb.Stateless;

                import javax.persistence.EntityManager;

                import javax.persistence.PersistenceContext;

                 

                import org.jboss.ejb3.annotation.SecurityDomain;

                import com.saince.agenda.persistence.dao.ClinicDao;

                import com.saince.agenda.persistence.enumerations.RefUserRolesEnum;

                 

                @Stateless( )

                @Local( )

                @SecurityDomain( "ris" )

                @RolesAllowed( "Superuser" )

                public class ClientServiceEjb implements ClientService {

                 

                    @PersistenceContext

                    private EntityManager                em;

                 

                    @Resource

                    private EJBContext                    ejbContext;

                 

                    @EJB

                    private ClinicDao                    clinicDao;

                 

                    @EJB

                    protected ReferenceObjectsFactory    referenceObjectsFactory;

                }

                 

                 

                package com.saince.agenda.services.client;

                import java.util.List;

                import com.saince.agenda.persistence.model.Clinic;

                import com.saince.agenda.persistence.model.ClinicAdministrator;

                import com.saince.agenda.persistence.model.ClinicUser;

                import com.saince.agenda.persistence.model.Users;

                import com.saince.agenda.services.exception.ServiceException;

                 

                public interface ClientService {

                    public void save( ClinicAdministrator user, Clinic clinic )

                        throws ServiceException;

                    public void activateClinic() throws ServiceException;

                 

                }

                 

                Thanks & Regards,

                Venkat.

                • 5. Re: Ear Deployment Failure Jboss 7.1.1
                  Wolf-Dieter Fink Master

                  If you don't set @Local or @LocalBinding the interface you implement, here ClientService, will become the Local interface and you can inject it in the same server with @EJB.

                  The jboss.xml file is not longer parsed as since AS7 you need to have jboss-ejb3.xml