0 Replies Latest reply on Jul 8, 2002 5:04 AM by Kulikoff Kulikoff

    jdbc not bound

    Kulikoff Kulikoff Newbie

      Hi all!
      I have an application that work fine on JBoss 2.4.4 and I am using Interbase 6.0 as a database server.
      Now I am trying to deploy this application on JBoss 3.0.0 and connect to database via firebird driver. I have added firebirdsql.jar to Jboss's /default/lib directory and successfuly deployed firebird-service.xml, but when I start my application I have an error message:
      javax.naming.NameNotFoundException: jdbc not bound.

      Can anybody help me to solve this problem?

      My firebird-service.xml:

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

      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!--FBManager can be used to create and drop databases.
      Drop is especially useful during testing, since it
      assures a clean start next time. -->

      /opt/interbase/test.gdb
      sysdba
      masterkey
      true
      false



      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      <!--more hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Firebird Database Connector


      <config-property>
      <config-property-name>Server</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>localhost</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Port</config-property-name>
      <config-property-type>java.lang.Integer</config-property-type>
      <config-property-value>3050</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Database</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>C:/Projects/IBData.gdb</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>UserName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>sysdba</config-property-value>
      </config-property>
      <config-property>
      <config-property-name>Password</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>masterkey</config-property-value>
      </config-property>


      jdbc/IBData



      <depends optional-attribute-name="ManagedConnectionPool">


      0
      50
      5000
      15
      <!--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
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
      <!-- Include a login module configuration named FirebirdDBRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "FirebirdDBRealm">

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

      </application-policy>

      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.
      -->
      <!--comment out this line if you want component managed security or want
      to use the default values in the ManagedConnectionFactoryProperties -->
      FirebirdDBRealm

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

      java:/TransactionManager





      Java source code :

      InitialContext ic = new InitialContext();
      dataSource = (DataSource) ic.lookup("java:/jdbc/IBData");