JBoss 6 - Deploy ejb in war packaging

后端 未结 1 1122
日久生厌
日久生厌 2021-01-06 11:50

I am trying to use the new EJB3.1 feature where one can deploy an EJB packaged within a .war file.

I am using Maven 2.2.1 to package the EJB module and then dropping

相关标签:
1条回答
  • 2021-01-06 11:59

    I found the problem on this one. My web.xml was 2.4 version:

    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">
    

    However, for EJBs to be deployed in war packages, it needs to be 3.0 at least:

    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
          version="3.0">
    

    This was mainly due to the fact that I was creating my war module with a J2EE Maven archetype.

    0 讨论(0)
提交回复
热议问题