1 Reply Latest reply on Sep 18, 2002 12:38 AM by David Jencks

    Deployment Exception: java:jdbc not bound

    shaikaman Newbie

      Hi all,

      My application prev. deployed on j2ee, now i'm porting
      it to jboss 3.0.2.

      Now, I'm having problems in connecting to database(mysql)

      These are the steps I followed to deploy:

      1. Modified and copied mysql-service to /deploy directory
      2. Modified login-config in /conf
      3. Modified ejb-jar.xml(created using j2ee's deploytool) and
      provided jndi name for the beans in <ejb-name> tag to avoid
      4. Modified datasource name in standardjaws.xml under /conf
      5. Modified datasource name in standardjbosscmp-jdbc.xml under /conf
      6. Created jbosscmp-jdbc.xml

      I created jar file whose contents are:

      After copying this jar file to the deploy directoy:
      The application gets deployed with the following errors:


      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee.service=EJB, jndiName=Vulcan.ShopperInfoHomeEB
      state: FAILED
      I Depend On :
      Depends on Me: org.jboss.deployment.DeploymentException: java:jdbc not bound..


      I found that all these beans are of CMP type and follows EJB1.1 specification.

      So..now how to rectify this problem and connect to database.

      I'm struck for a long time now.

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->

      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->

      <!-- Include a login module configuration named MySqlDbRealm.
      Update your login-conf.xml, here is an example for a

      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">yourprincipal</module-option>
      <module-option name = "userName">yourusername</module-option>
      <module-option name = "password">yourpassword</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>


      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.

      <!--uncomment out this line if you are using the MySqlDbRealm above


      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">root</config-property>
      <config-property name="Password" type="java.lang.String"></config-property>

      <!--Below here are advanced properties -->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper

      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->

      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports

      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      <!--make the rar deploy! hack till better deployment-->

      ---- end of mysql-service.xml

      ---login - congif.xml
      <application-policy name = "MySqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
      flag = "required">
      <module-option name = "principal"></module-option>
      <module-option name = "userName">root</module-option>
      <module-option name = "password"></module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=jdbc/VulcanDBJNDI</module-option>


      ---------end of l-c.xml