0 Replies Latest reply on Jan 20, 2003 9:23 AM by morena

    Problems with compound primary key containing foreign key an

    morena

      Hi everyone,
      I tryed to apply the patch about CMR+CMP field as described in "http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ but I still have problems.

      Waiting for Jboss 4.0 can someone help me?


      My application:
      --------------------------------------------------------------------------------
      -BeanA and BeanB have a One to Many relationship
      -pk1 is primary key of BeanA
      -pk1 and pk2 is the compound primary key of BeanB
      -pk2 in BeanB is also a foreign key which realizes the relation with BeanA
      -Primary key class of BeanA is PkClassA
      -Primary key class of BeanB is PkClassB
      -PkClassB inherits PkClassA


      PkClassA.java
      --------------------------------------------------------------------------------
      public class PkClassA implements java.io.Serializable
      {
      public String pk1;
      public PkClassA() {
      }
      public PkClassA(AnotherKeyImplA k) {
      pk1 = k.getPrimaryKey().toString();
      }
      public PkClassA(String primaryKey) {
      pk1 = primaryKey;
      }
      public boolean equals( Object other )
      {
      if ( other instanceof ClassA )
      {
      PkClassA oKey = ( PkClassA )other;
      return pk1.equals( oKey.pk1 );
      }
      return false;
      }
      public int hashCode()
      {
      return (toString()).hashCode();
      }
      public String toString() {
      return pk1;
      }
      }


      PkClassB.java
      --------------------------------------------------------------------------------
      public class PkClassB extends PkClassA {
      public String pk2;
      public PkClassB() {
      }
      public PkClassB(AlsoAnotherKeyImplB k1, AlsoAnotherKeyImplA k2) {
      super(k1);
      pk2 = k2.getPrimaryKey().toString();
      }
      public PkClassB(String s1, String s2) {
      super(s1);
      this.pk2 = s2;
      }
      public boolean equals( Object other )
      {
      if ( other instanceof PkClassB)
      {
      PkClassB oKey = ( PkClassB )other;
      return super.equals(other) || pk2.equals( oKey.pk2 );
      }
      return false;
      }
      public String toString() {
      return pk1+" - "+pk2;
      }
      }



      ejb-jar.xml
      --------------------------------------------------------------------------------

      <display-name>BeanA</display-name>
      <ejb-name>BeanA</ejb-name>
      BeanAHome
      BeanA
      <ejb-class>BeanABean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>PkClassA</prim-key-class>
      True
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>BeanA</abstract-schema-name>
      <cmp-field>
      no description
      <field-name>a1</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>a2</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>pk1</field-name>
      </cmp-field>


      <display-name>BeanB</display-name>
      <ejb-name>BeanB</ejb-name>
      BeanBHome
      BeanB
      <ejb-class>BeanBBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>PkClassB</prim-key-class>
      True
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>BeanB</abstract-schema-name>
      <cmp-field>
      no description
      <field-name>b1</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>b2</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>pk1</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>pk2</field-name>
      </cmp-field>

      <!-- some finders here defined use pk1 and pk2 fields inside EQB QL -->



      <ejb-relation>
      <ejb-relation-name>BeanA-has-BeanBs</ejb-relation-name>
      <ejb-relationship-role>
      <ejb-relationship-role-name>BeanA-role</ejb-relationship-role-name>
      One
      <relationship-role-source>
      <ejb-name>BeanA</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>beanBsCmr</cmr-field-name>
      <cmr-field-type>java.util.Collection</cmr-field-type>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>BeanB-role</ejb-relationship-role-name>
      Many
      <cascade-delete/>
      <relationship-role-source>
      <ejb-name>BeanB</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>beanACmr</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      </ejb-relation>



      jbosscmp-jdbc.xml
      --------------------------------------------------------------------------------
      <jbosscmp-jdbc>

      java:/DefaultDS
      <datasource-mapping>Hypersonic SQL</datasource-mapping>


      <enterprise-beans>

      <ejb-name>BeanA</ejb-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <table-name>BeanATable</table-name>
      <cmp-field>
      <field-name>a1</field-name>
      <column-name>A1</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>a2</field-name>
      <column-name>A2</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>pk1</field-name>
      <column-name>PK1</column-name>
      </cmp-field>



      <ejb-name>BeanB</ejb-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <table-name>BeanBTable</table-name>

      <cmp-field>
      <field-name>b1</field-name>
      <column-name>B1</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>b2</field-name>
      <column-name>B2</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>pk1</field-name>
      <column-name>PK1</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>pk2</field-name>
      <column-name>PK2</column-name>
      </cmp-field>

      </enterprise-beans>


      <ejb-relation>
      <ejb-relation-name>BeanA-has-BeanBs</ejb-relation-name>
      <foreign-key-mapping/>
      <ejb-relationship-role>
      <ejb-relationship-role-name>BeanA-role</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>pk1</field-name>
      <!-- Here I put the name of the primary key field in BeanA.
      In my implementation it has the same name of
      one part of compound primary key in BeanB because
      PkClassB inherits from PkClassA
      -->
      <column-name>PK2</column-name>
      <!-- Here I put PK2 which is the column in BeanBTable for the foreign key -->
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>BeanB-role</ejb-relationship-role-name>
      <key-fields/>
      </ejb-relationship-role>
      </ejb-relation>

      </jbosscmp-jdbc>


      Table structure created by Jboss (inspected using hsql java DataBaseManager):
      --------------------------------------------------------------------------------
      BEANATABLE
      PK1 (Nullable: false)
      A1
      A2
      PK_BEANATABLE
      Unique: true
      PK1

      BEANBTABLE
      PK1 (Nullable: false)
      PK2 (Nullable: flase)
      B1
      B2
      PK2 (Nullable: true)
      PK_BEANBTABLE
      Unique: true
      PK1
      PK2


      Error from the server caused by my application:
      --------------------------------------------------------------------------------
      java.sql.SQLException: Try to insert null into a non-nullable column in statement [INSERT INTO BEANBBTABLE (PK1, PK2, B1, B2, PK2) VALUES ('44', '43', '1', '2', NULL)]
      at org.hsqldb.Trace.getError(Trace.java:180)
      at org.hsqldb.Result.(Result.java:175)
      at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
      at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
      at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
      at org.hsqldb.jdbcStatement.executeUpdate(jdbcStatement.java:85)
      at org.hsqldb.jdbcPreparedStatement.executeUpdate(jdbcPreparedStatement.java:152)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:199)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:134)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
      at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:731)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:730)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy37.create(Unknown Source)
      .....
      .....
      etc. etc.



      MY QUESTIONS:
      --------------------------------------------------------------------------------------------------
      The application I am trying to deploy on Jboss has been developed and deployed on Weblogic server.
      Having accepted that portability across application servers means painful changes in the xml configuration files, and not only in the vendor xml files but also in the standard ones, I would like not to change the code if not strictly necessary (the application is declared as portable).

      1)To apply the patch the receipt is the following:

      a) "For it to work, your non null cmr fields must also be defined as a cmp field"
      --> this is done because pk2 is a cmp-field for BeanB

      b) "You also have to pass the interface for the relation entity into ejbCreate for each non-nullable field. The patch invokes the getter method on the interface to retrieve the field's value and sets it in the bean instance before the sql insert statement parameters are bound from it"
      --> What does it mean? I understand that I have to add the local interface of BeanA to ejbCreate of BeanB, is it correct?
      I have not defined a local interface for my beans, shall I add a local interface with the same method of the remote one for BeanA? Shall I add also a local-home interface with the same method of the home interface?

      c) The create and the ejbPostCreate remain the same or do I have to add also here the interface parameter?


      2)I have read in the forum that EJB spec requires that in case of bidirectional relationship both beans which are sides of a relation must have a local interface.
      My question is about the definition of bidirectional:

      a)shall I consider bidirectional a relation when in the database both tables have a relationship field or
      b)shall I consider bidirectional a relation when I have two ways to navigate, from one bean to the related one and viceversa?

      In the first case my relation is unidirectional, in the second case it is bidirectional because I have defined two cmr-fields, one for each side. Is this assumption correct?
      If yes it means that I have to define a local interface for both BeanA and BeanB?
      (but in this case why the same xml bean configuration is correct for Weblogic server? Is Weblogic server not so strictly related to EJB spec?)


      3) In the BeanBTable created by Jboss it duplicates PK2 column, the primary key is correctly created with two fields PK1 and PK2, but the foreign key is not present and not associated to any of the two PK2 column.

      a)Shall I expect that the problem of column duplication is solved by the patch?

      b)Shall I expect that the foreign key definition in the table is created using the patch?

      c)The second duplicated column PK2 is created by Jboss with "Nullable: true", why the server error log says "Try to insert null into a non-nullable column in statement"?


      4)Shall I define the <primkey-field> field in ejb-jar?
      I have read on ejb-jar.dtd that this field is not used if primary key maps to a compound key.
      Shall I define this field only for BeanA which maps to a single field?
      I have tried but it seems to me that defining the field does not apparently change the server behaviour.


      5)Is the definition and the xml mapping of the two primary key classes correct? Could be the inheritance in the primary key class a problem? Reading "http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ I should avoid it --> "Don't try to implement any inheritance in your pk classes; it is way more trouble then it is worth."

      Which kind of problems could this cause?


      6) How can I remove server error caused by the application of the patch?

      Before applying the patch I used this version of Jboss: "jboss-3.0.4_tomcat-4.1.12" which did not cause following errors:

      Error from the server after having added the patch (before deploy of my application):
      -------------------------------------------------------------------------------------
      1:01:04,281 ERROR [Engine] HttpConnector httpConnector, io problem:
      java.net.BindException: Address in use: JVM_Bind:8080
      at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.java:980)
      at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1187)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.startService(EmbeddedCatalinaService41.java:254)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:479)
      11:01:04,281 ERROR [EmbeddedCatalinaService41] Starting failed
      LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bind:8080
      at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1209)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.startService(EmbeddedCatalinaService41.java:254)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:479)
      11:01:04,296 WARN [ServiceController] Problem starting service jboss.web:service=EmbeddedCatalina41
      LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bind:8080
      at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1209)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:999)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.startService(EmbeddedCatalinaService41.java:254)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:398)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:148)
      at org.jboss.Main$1.run(Main.java:381)
      at java.lang.Thread.run(Thread.java:479)

      Error from the server after having added the patch (after deploy of my application):
      ------------------------------------------------------------------------------------
      11:02:08,171 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.web:service=EmbeddedCatalina41
      state: FAILED
      I Depend On:
      Depends On Me: LifecycleException: null.open: java.net.BindException: Address in use: JVM_Bind:8080]



      Thank in advance to everyone gives me help.
      Best regards,
      Morena