0 Replies Latest reply on Nov 11, 2004 8:02 PM by shiraz memon

    Fail to connect with firebird database using jboss 4

    shiraz memon Newbie

      Hello
      I am encountering with the problem and that problem eat up my one week. i am not able to run the program appropriately instead i have followed the instructions. What i am doing is that i have developed the session bean which makes connection with firebird database.

      I have configured firebird file which is shown as follows:

      <?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 -->
       <!-- ==================================================================== -->
      
      <connection-factories>
      
       <!--FBManager can be used to create and drop databases.
       Drop is especially useful during testing, since it
       assures a clean start next time. -->
       <mbean code="org.firebirdsql.management.FBManager" name="jboss.jca:service=FirebirdManager">
       <attribute name="FileName">D:/Program Files/Firebird/Firebird_1_5/examples/TAX.FDB</attribute>
       <attribute name="UserName">sysdba</attribute>
       <attribute name="Password">sa</attribute>
       <attribute name="CreateOnStart">true</attribute>
       <attribute name="DropOnStop">false</attribute>
       </mbean>
      
       <tx-connection-factory>
      
       <jndi-name>FirebirdDS</jndi-name>
      
       <xa-transaction/>
      
       <rar-name>firebirdsql.rar</rar-name>
      
       <adapter-display-name>Firebird Database Connector</adapter-display-name>
      
       <config-property name="Database" type="java.lang.String">localhost/3050:D:/Program Files/Firebird/Firebird_1_5/examples/TAX.FDB</config-property>
      
       <user-name>sysdba</user-name>
      
       <password>sa</password>
      
       <!--additional properties. only use one way of setting tx isolation, please
       <config-property name="TransactionIsolation"></config-property>
       <config-property name="TransactionIsolationName">TRANSACTION_READ_COMMITTED</config-property>
       <config-property name="BlobBufferLength"></config-property>
       <config-property name="Encoding">UNICODE_FSS</config-property>
       -->
      
       <min-pool-size>0</min-pool-size>
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       -->
      
       <!-- sql to call on an existing pooled connection when it is obtained from pool
       <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
       -->
      
       </tx-connection-factory>
      
      </connection-factories>


      i have deployed firebird-ds.xml and firebirdsql.jar files together in server default deploy folder.
      Now i have coded one session bean with files (QueryDB.java, QueryDBBean.java, QueryHome.java, jboss.xml and ejb-jar.xml) which simply makes connection with firebird database and run one simple query.

      Code for the above mentioned files are as follows:

      QueryDBHome.java
      package day09;
      
      import java.rmi.RemoteException;
      import javax.ejb.*;
      
      /**
       * @author Administrator
       *
       * TODO To change the template for this generated type comment go to
       * Window - Preferences - Java - Code Style - Code Templates
       */
      public interface QueryDBHome extends EJBHome {
       QueryDB create() throws CreateException, RemoteException;
      
      }


      QueryDB.java
      package day09;
      
      import java.util.*;
      import javax.ejb.*;
      import java.rmi.RemoteException;
      
      /*
       EnrollmentCart is the remote interface for enrollment cart
       stateful session bean.
       */
      public interface QueryDB extends EJBObject
      {
       public void initDB() throws RemoteException;
       public void doDDL() throws RemoteException;
       public void getMetaData() throws RemoteException;
       public void helloWorld() throws RemoteException;
      }


      QueryDBBean.java

      package day09;
      
      import java.util.*;
      import javax.ejb.*;
      import javax.naming.*;
      import java.sql.*;
      
      /**
       * QueryDBEJB is stateless session bean to query database properties
       */
      
      public class QueryDBBean implements SessionBean {
       public void initDB(){
       try {
       System.out.println("\nDay 9: Demonstrate the use of JDBC...\n");
       System.out.println("initDB: Get initial context from the JNDI service...");
       ctx = new InitialContext();
       System.out.println("Lookup the DataSource as configured by administrator...");
       ds = (javax.sql.DataSource)ctx.lookup ("java:comp/env/jdbc/styejbDB");
       System.out.println("Getting a Connection from the pool...");
       conn = ds.getConnection();
       System.out.println("Connection is obtained...");
       } catch (Exception e) {
       System.out.println("Exception was thrown: " + e.getMessage());
       } finally {
       try {
       if (stmt != null)
       stmt.close();
       if (conn != null)
       conn.close();
       } catch (SQLException sqle) {
       System.out.println("SQLException during close(): " + sqle.getMessage());
       }
       }
       }
      
       public void doDDL(){
      
       System.out.println("Run some DDL statements:");
       try{
       if (ctx == null)
       initDB();
       conn = ds.getConnection();
       stmt = conn.createStatement();
       try {
       System.out.println("Trying to drop table DAY09_STUDENTS...");
       stmt.execute("DROP TABLE DAY09_STUDENTS");
       } catch (SQLException e) {
       System.out.println("Table DAY09_STUDENTS already exists.");
       }
       stmt.execute("CREATE TABLE DAY09_STUDENTS (student_id varchar(12),"+
       "first_name varchar(15),"+
       "last_name varchar(15),"+
       "address varchar(64))");
       System.out.println("Table DAY09_STUDENTS is created...");
      
       System.out.println("Run some DML statements:");
       stmt.executeUpdate("INSERT into DAY09_STUDENTS values " +
       "('1', 'LILLIAN', 'GHALY', '15 DIAMOND ST, BOSTON, MA')");
       stmt.executeUpdate("INSERT into DAY09_STUDENTS values " +
       "('2', 'DOUG','ZANDER','11 ORANGE AVE, SACRAMENTO, CA' )");
       stmt.executeUpdate("INSERT into DAY09_STUDENTS values " +
       "('3', 'SAM','LE', '12 APPLEBEE RD, LOS ANGELES, CA' )");
       stmt.executeUpdate("DELETE from DAY09_STUDENTS where student_id = '2'");
       rs = stmt.executeQuery("SELECT * from DAY09_STUDENTS");
       // Get some Metadata about result set
       System.out.println("Query ResultSet Metadata:");
       rsmd = rs.getMetaData();
       cn = rsmd.getColumnCount();
       for (i=1; i<= cn ; i++) {
       if (i>1) System.out.print(", ");
       System.out.print(rsmd.getColumnLabel(i));
       }
       System.out.println("");
       while (rs.next()) {
       for (i=1; i<= cn ; i++) {
       if (i>1) System.out.print(", ");
       System.out.print(rs.getString(i));
       }
       System.out.println("");
       }
       } catch (Exception e) {
       System.out.println("Exception was thrown: " + e.getMessage());
       } finally {
       try {
       if (stmt != null)
       stmt.close();
       if (conn != null)
       conn.close();
       } catch (SQLException sqle) {
       System.out.println("SQLException during close(): " + sqle.getMessage());
       }
       }
      
       }
       public void helloWorld(){
       try{
       System.out.println("Hello world method called");
       }
       catch(Exception e){
       System.out.println("Exception was thrown: " + e.getMessage());
       }
       }
       public void getMetaData() {
       // Get some Metadata about database
      
       System.out.println("Query Database Metadata:");
       try{
       if (ctx == null)
       initDB();
       conn = ds.getConnection();
       dbmd = conn.getMetaData();
       System.out.println(" Product Name: " + dbmd.getDatabaseProductName());
       System.out.println(" Driver Name: " + dbmd.getDriverName());
       rs = dbmd.getSchemas();
       System.out.println("Database Schemas:");
       rsmd = rs.getMetaData();
       cn = rsmd.getColumnCount();
       for (i=1; i<= cn ; i++) {
       if (i>1) System.out.print(", ");
       System.out.print(rsmd.getColumnLabel(i));
       }
       System.out.println("");
       while (rs.next()) {
       for (i=1; i<= cn ; i++) {
       if (i>1) System.out.print(", ");
       System.out.print(rs.getString(i));
       if (schema == null)
       schema = new StringBuffer(rs.getString(i));
       }
       System.out.println("");
       }
       String[] types = {"TABLE"};
       if ( schema == null ) {
       schema = new StringBuffer("TABLE_SCHEM");
       }
       System.out.println("Printing all Data Tables for Schema: " + schema);
       rs = dbmd.getTables(null, schema.toString(), null, types);
       String ostr = "";
       while (rs.next()){
       ostr = "";
       String tableName = rs.getString("TABLE_NAME");
       System.out.println("Table Name: " + tableName);
      
       ResultSet rsc = dbmd.getColumns(null,null,tableName,"%");
       rsmd = rsc.getMetaData();
       cn = rsmd.getColumnCount();
       for (i=1; i<= cn ; i++) {
       if (i>1) ostr += ", ";
       ostr += rsmd.getColumnLabel(i);
       }
       ostr += "\n";
       while (rsc.next()) {
       for (i=1; i<= cn ; i++) {
       if (i>1) ostr += ", ";
       ostr += rsc.getString(i);
       }
       ostr += "\n";
       }
       System.out.print(ostr);
       }
      
       } catch (Exception e) {
       System.out.println("Exception was thrown: " + e.getMessage());
       } finally {
       try {
       if (conn != null)
       conn.close();
       } catch (SQLException sqle) {
       System.out.println("SQLException during close(): " + sqle.getMessage());
       }
       }
       }
      
       public void setSessionContext(SessionContext ctx) {this.bctx = ctx;}
       public void ejbCreate() throws CreateException {System.out.println("ejbCreate()");}
       public void ejbRemove() {System.out.println("ejbRemove()");}
       public void ejbActivate() {System.out.println("ejbActivate()");}
       public void ejbPassivate() {System.out.println("ejbPassivate()");}
      
      
       private SessionContext bctx;
       private Context ctx = null;
       private StringBuffer schema = null;
       private javax.sql.DataSource ds = null;
       private java.sql.Connection conn = null;
       private java.sql.Statement stmt = null;
       private java.sql.ResultSet rs = null;
       private java.sql.ResultSetMetaData rsmd = null;
       private java.sql.DatabaseMetaData dbmd = null;
       private int cn, i;
      
      }


      And there is one other file called Client.java
      /*
       * Created on Nov 11, 2004
       *
       * TODO To change the template for this generated file go to
       * Window - Preferences - Java - Code Style - Code Templates
       */
      
      /**
       * @author Administrator
       *
       * TODO To change the template for this generated type comment go to
       * Window - Preferences - Java - Code Style - Code Templates
       */
      import java.util.*;
      import java.rmi.*;
      import java.io.*;
      import javax.naming.*;
      import javax.ejb.*;
      import day09.*;
      
      public class Client {
      
       public static void main(String[] args) {
       Context initialContext = null;
       QueryDBHome qdbHome = null;
       QueryDB qdb = null;
      
       System.out.print("\nDay 9: Demonstration the use of JDBC...\n ");
       try
       {
       System.out.print("Looking up the QueryDB home via JNDI.\n");
       initialContext = new InitialContext();
       Object object = initialContext.lookup("day09/QueryDBHome");
       qdbHome = (QueryDBHome)
       javax.rmi.PortableRemoteObject.narrow(object, QueryDBHome.class);
      
       System.out.print("Creating an Query DB.\n");
       qdb = (QueryDB) qdbHome.create();
       qdb.initDB();
       System.out.print("Called init db.\n");
       qdb.doDDL();
       System.out.print("Called doDDL DB.\n");
       qdb.getMetaData();
       System.out.print("Called getMetaData DB.\n");
       qdb.helloWorld();
       }catch ( Exception e){
       e.printStackTrace();
       }
       }
      }
      


      When i run the client i see the following result

      Day 9: Demonstration the use of JDBC...
      Looking up the QueryDB home via JNDI.
      Creating an Query DB.
      Called init db.
      Called doDDL DB.
      Called getMetaData DB.


      And on the server side i see the following result when i run the client

      2004-11-12 01:37:43,625 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
      MBeans waiting for other MBeans:
      ObjectName: jboss.jca:service=TxCM,name=FirebirdDS
       state: CREATED
       I Depend On: jboss.jca:service=ManagedConnectionPool,name=FirebirdDS
       jboss.jca:service=CachedConnectionManager
       jboss:service=TransactionManager
      
       Depends On Me: jboss.jca:service=ConnectionFactoryBinding,name=FirebirdDS
      
      ObjectName: jboss.jca:service=ManagedConnectionPool,name=FirebirdDS
       state: CREATED
       I Depend On: jboss.jca:service=ManagedConnectionFactory,name=FirebirdDS
      
       Depends On Me: jboss.jca:service=TxCM,name=FirebirdDS
      
      ObjectName: jboss.jca:service=ManagedConnectionFactory,name=FirebirdDS
       state: FAILED
       I Depend On: jboss.jca:service=RARDeployment,name='firebirdsql.rar'
      
       Depends On Me: jboss.jca:service=ManagedConnectionPool,name=FirebirdDS
      org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment! jboss.jca:service=RARDeployment,name='firebirdsql.rar'; - nested throwable: (org.jboss.deployment.DeploymentException: ConnectionDefinition 'null' not found in rar 'firebirdsql.rar')
      ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=FirebirdDS
       state: CREATED
       I Depend On: jboss.jca:service=TxCM,name=FirebirdDS
      
       Depends On Me:
      
      MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
      ObjectName: jboss.jca:service=ManagedConnectionFactory,name=FirebirdDS
       state: FAILED
       I Depend On: jboss.jca:service=RARDeployment,name='firebirdsql.rar'
      
       Depends On Me: jboss.jca:service=ManagedConnectionPool,name=FirebirdDS
      org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment! jboss.jca:service=RARDeployment,name='firebirdsql.rar'; - nested throwable: (org.jboss.deployment.DeploymentException: ConnectionDefinition 'null' not found in rar 'firebirdsql.rar')
      
      2004-11-12 01:37:43,625 DEBUG [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Notified that enabled: true
      2004-11-12 01:37:43,703 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
      2004-11-12 01:37:43,703 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController][type= org.jboss.system.ServiceMBean.start][message=]
      2004-11-12 01:37:43,703 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.deployment:type=DeploymentScanner,flavor=URL dependent components: []
      2004-11-12 01:37:43,703 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceDeployer][type=org.jboss.deployment.SubDeployer.start][message=]
      2004-11-12 01:37:43,750 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,750 DEBUG [org.jboss.management.j2ee.ServiceModule] postRegister(), parent: jboss.management.local:j2eeType=J2EEServer,name=Local
      2004-11-12 01:37:43,750 DEBUG [org.jboss.management.j2ee.ServiceModule] Created JSR-77 ServiceModule, name: jboss-service.xml
      2004-11-12 01:37:43,750 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Created ServiceModule: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,765 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,765 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,765 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.management.local:j2eeType=J2EEDomain,name=Manager, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,781 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,781 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,781 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.aop:service=AspectManager, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,781 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,781 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,796 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.aop:service=AspectDeployer, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,796 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,796 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,796 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.system:type=Log4jService,service=Logging, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,812 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,812 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,812 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.rmi:type=RMIClassLoader, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,812 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,812 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,812 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=WebService, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,828 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,828 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,828 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=Naming, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,828 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,828 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,828 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=JNDIView, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,843 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,843 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,843 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=EJBTimerService, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,843 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,843 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,859 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=EJBTimerServiceRetryPolicy, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,859 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,859 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,859 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.security:service=SecurityConfig, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,875 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,875 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,875 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.security:service=XMLLoginConfig, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,875 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,875 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,875 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.security:service=JaasSecurityManager, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,890 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,890 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,890 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=XidFactory, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,890 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,890 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,890 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=TransactionManager, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,906 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,906 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,906 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=ClientUserTransaction, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,953 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,953 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,953 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=proxyFactory,target=ClientUserTransactionFactory, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,953 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,953 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,953 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=proxyFactory,target=ClientUserTransaction, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,968 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,968 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,968 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=invoker,type=jrmp, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,984 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,984 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,984 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=invoker,type=local, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,984 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:43,984 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:43,984 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss:service=invoker,type=pooled, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,000 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,000 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,000 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.ejb:service=EJBDeployer, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,000 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,000 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,000 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.j2ee:service=EARDeployer, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,015 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,015 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,031 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.scripts:service=BSHDeployer, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,031 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,031 DEBUG [org.jboss.management.j2ee.MBean] postRegister(), parent: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,031 DEBUG [org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name: jboss.deployment:type=DeploymentScanner,flavor=URL, SAR Module: jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=jboss-service.xml
      2004-11-12 01:37:44,046 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: jboss-service.xml
      2004-11-12 01:37:44,046 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/JBoss/server/default/conf/jboss-service.xml
      2004-11-12 01:37:44,078 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.0RC1 (build: CVSTag=JBoss_4_0_0_RC1 date=200407202112)] Started in 1m:11s:328ms
      2004-11-12 01:37:44,078 INFO [org.jboss.web.tomcat.tc5.Tomcat5] Saw org.jboss.system.server.started notification, starting connectors
      2004-11-12 01:37:44,125 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,171 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,187 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,218 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
      2004-11-12 01:37:44,343 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,437 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,437 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,453 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,484 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,515 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,546 INFO [org.apache.jk.common.ChannelSocket] JK2: ajp13 listening on /0.0.0.0:8009
      2004-11-12 01:37:44,546 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,546 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,593 INFO [org.apache.jk.server.JkMain] Jk running ID=0 time=0/140 config=null
      2004-11-12 01:37:44,640 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:37:44,703 DEBUG [org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService] It's for me: javax.management.MBeanServerNotification[source=JMImplementation:type=MBeanServerDelegate][type=JMX.mbean.registered][message=], handback:2147483647
      2004-11-12 01:40:24,140 INFO [STDOUT] ejbCreate()
      2004-11-12 01:40:24,625 INFO [STDOUT]
      Day 9: Demonstrate the use of JDBC...
      2004-11-12 01:40:24,656 INFO [STDOUT] initDB: Get initial context from the JNDI service...
      2004-11-12 01:40:24,687 INFO [STDOUT] Lookup the DataSource as configured by administrator...
      2004-11-12 01:40:24,687 INFO [STDOUT] Exception was thrown: Could not dereference object
      2004-11-12 01:40:24,703 INFO [STDOUT] Run some DDL statements:
      2004-11-12 01:40:24,703 INFO [STDOUT] Exception was thrown: null
      2004-11-12 01:40:24,718 INFO [STDOUT] Query Database Metadata:
      2004-11-12 01:40:24,718 INFO [STDOUT] Exception was thrown: null
      2004-11-12 01:40:24,718 INFO [STDOUT] Hello world method called.


      Well! i cannot judge whats the problem with my code or may be the deployment problem.

      Hope i ll get the solution of this problem :)

      Thanks in advance
      have fun
      ishq