1 Reply Latest reply on Dec 27, 2002 2:25 PM by Mauricio De Diana

    Communication link failure when deploying CMP

    Mauricio De Diana Newbie

      Hi all,

      I found some posts on this at this forum, but none of the solutions solved the problem.
      When I´m deploying a CMP, I get this error:

      14:31:21,243 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=local/br/org/teste/ejb/InventoryBeanCMP,service=EJB
      org.jboss.deployment.DeploymentException: Error while checking if table aleady exists; - nested throwable: (java.sql.SQLException: Communication link failure: java.io.IOException)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.tableExists(JDBCStartCommand.java:211)
      Hi all,

      I found some posts on this at this forum, but none of the solutions solved the problem.
      When I´m deploying a CMP, I get this error:

      14:31:21,243 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=local/br/org/teste/ejb/InventoryBeanCMP,service=EJB
      org.jboss.deployment.DeploymentException: Error while checking if table aleady exists; - nested throwable: (java.sql.SQLException: Communication link failure: java.io.IOException)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.tableExists(JDBCStartCommand.java:211)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:140)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:84)

      .
      .
      .

      My DataSource configuration is:
      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=CmpBmpTestDS">
      <attribute name="JndiName">jdbc/CmpBmpTestDS</attribute>
      <attribute name="ManagedConnectionFactoryProperties">
      <properties>
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://@MYSQL.HOST@:3306/@MYSQL.DB@</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <config-property name="UserName" type="java.lang.String">@MYSQL.USER@</config-property>
      <config-property name="Password" type="java.lang.String">@MYSQL.PASSWORD@</config-property>
      </properties>
      </attribute>
      </mbean>
      </depends>

      I have this in jboss.xml:
      <resource-managers>
      <resource-manager>
      <res-name>jdbc/@MYSQL_DS@</res-name>
      <res-jndi-name>java:/jdbc/@MYSQL_DS@</res-jndi-name>
      </resource-manager>
      </resource-managers>

      This in jbosscmp-jdbc.xml (deployed in the jar):
      <jbosscmp-jdbc>
      <defaults>
      <datasource>java:/jdbc/@MYSQL_DS@</datasource>
      <datasource-mapping>mySQL</datasource-mapping>
      .
      .
      .
      </defaults>
      </jbosscmp-jdbc>

      And this in ejb-jar.xml (is it necessary?):
      <resource-ref>
      <res-ref-name>jdbc/@MYSQL_DS@</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      Any hints?

      Thanks,

      Dediana