5 Replies Latest reply on Dec 27, 2001 9:53 PM by yaorong

    URGENT: JAWS can't judge if InterBase table already exists?

    yaorong

      Hi all,

      I use InterBase6.0.1 database and Jboss2.4.3 for Window. The datasource config is as follows:

      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      HRMSDB
      jdbc:interbase://192.168.82.125/d:/webhrms/HRMS.GDB
      SYSDBA
      masterkey


      First I start InterServer as windows2000's service and put InterClient.jar to jboss/lib/ext/. I must add an issue: the InterClient.jar I put into jboss/lib/ext is compiled at jdk1.3 .
      . I encounter a problem when I start the jboss: The database bounding has no problem but the jboss hangs when [Container factory] Deploying:file:/D:/WEBHRMS/JBoss-2.4.3_Tomcat-3.2.3/jboss/tm
      p/deploy/Default/hrms.ear
      [Verifier] Verifying file:/D:/WEBHRMS/JBoss-2.4.3_Tomcat-3.2.3/jboss/tmp/deploy/
      Default/hrms.ear/ejb1004.jar
      [Container factory] Deploying Test

      The Test is the CMP which can deploy if the database is changed to mssqlserver2000 or mysql4.0 for Win and there is only one entity bean. I checked the Jboss2.4.3/jboss/log/server.log and found the jaws can't judge the table already exists or not. Please refer to the follow message I copy from the server.log:
      [JAWS] Initializing JAWS plugin for Test
      [JAWS] Loading standardjaws.xml : file:/D:/WEBHRMS/JBoss-2.4.3_Tomcat-3.2.3/jboss/conf/tomcat/standardjaws.xml
      [JAWS] jar:file:/D:/WEBHRMS/JBoss-2.4.3_Tomcat-3.2.3/jboss/tmp/deploy/Default/hrms.ear/ejb1004.jar!/META-INF/jaws.xml found. Overriding defaults
      [JAWS] Init SQL: CREATE TABLE test (CODE_NAME VARCHAR(255) BINARY,DESC_NAME VARCHAR(255) BINARY)
      [JAWS] Destroy SQL: DROP TABLE test
      [JAWS] Exists SQL: SELECT COUNT(*) FROM test WHERE CODE_NAME=?
      [JAWS] AutoGenerated finders - Home=interface com.ncsi.pa.ejb.eb.TestHome -- LocalHome=null
      [JAWS] Save AutoGenerated findAll public abstract java.util.Collection com.ncsi.pa.ejb.eb.TestHome.findAll() throws java.rmi.RemoteException,javax.ejb.FinderException
      [JAWS] findAll SQL: SELECT CODE_NAME FROM test
      [JAWS] Create SQL: INSERT INTO test (CODE_NAME,DESC_NAME) VALUES (?,?)
      [JAWS] Remove SQL: DELETE FROM test WHERE CODE_NAME=?
      [JAWS] Load SQL: SELECT test.CODE_NAME,test.DESC_NAME FROM test WHERE CODE_NAME=?
      [JAWS] Load SQL: SELECT test.CODE_NAME,test.DESC_NAME FROM test WHERE CODE_NAME=?
      [JAWS] Store SQL: UPDATE test SET CODE_NAME=?,DESC_NAME=? WHERE CODE_NAME=?
      here the server hangs!
      But if I shift datasource to MySSQl 4.0, everything is okey and the next statement in the server.log should be
      [JAWS] Table 'test' already exists
      [Container factory] Begin java:comp/env for EJB: DataSourceFinder
      ......
      ......


      FYI, I can run a simple standalone java class that can connect to the same database and execute sql statement.

      Why? I prefer to use the
      container managed. Is InterBase CMP executable on Jboss2.4.3? I have struggled with this problem for several days! You are so appreciated!

        • 1. Re: URGENT: JAWS can't judge if InterBase table already exis
          mesketh

          G'day,

          I seem to have a similar problem. I've followed the documentation in that I've included the relevant entries in my overriding 'jaws.xml' file to (I thought) tell JAWS not to create my table when deploying. However, when I do deploy, I still get this:

          [16:23:47,821,ContainerFactory] Deploying Role
          [16:23:48,152,ContainerFactory] Deploying WorkArea
          [16:23:48,753,EnterpriseContextCachePolicy] Cache policy scheduler started
          [16:23:49,073,CMP] Table 'WorkArea' already exists
          [16:23:50,064,ContainerManagement] Starting
          [16:23:50,064,ContainerManagement] Started
          [16:23:50,074,ContainerManagement] Starting
          [16:23:50,084,ContainerManagement] Started
          [16:23:50,084,ContainerFactory] Deployed application: file:/C:/tools/jboss-3.0.0
          alpha/deploy/Default/RomanEJB.jar
          [16:23:50,094,J2eeDeployer#Default] J2EE application: file:/C:/tools/jboss-3.0.0
          alpha/deploy/RomanEJB.jar is deployed.

          It's annoying but, doesn't seem to causing me too much trouble since, the SQL call fails anyway.

          cheerz.
          Mark

          • 2. Re: URGENT: JAWS can't judge if InterBase table already exis
            yaorong

            I got it! Just add <create-table>false</create-table> under the table-bean mapping in jaws.xml.

            I havn't enounter your case. Your jdbc driver maybe compiled on jdk1.2. You can download the one for jdk1.3 from http://www.kpi.com.au/interbase/home.jsp

            You can open server.log to check the part about bound database(get DB Connection) first!

            • 3. Re: URGENT: JAWS can't judge if InterBase table already exis
              davidjencks

              The original interclient driver from Borland and I think the one from the site mentioned here throw an exception in the DataBaseMetaData call used to determine if a table exists. The Interclient versions from firebird have this problem fixed and can be used to create tables with JAWS. I don't know if any more recent Borland versions have this problem fixed.

              • 4. Re: URGENT: JAWS can't judge if InterBase table already exis
                mesketh

                I'm not using Interbase I'm using PostgreSQL. I had the <create-table> element in there from the start but, I was getting confused what with "can't find data source" problem (now fixed). I've had to rename all my tables to use lower-case (I mixed) since, that seemed to be causing problems when the PM in JBoss was accessing PG.

                We'll get there... ;)

                Mark

                • 5. Re: URGENT: JAWS can't judge if InterBase table already exis
                  yaorong

                  Hello David,
                  I download http://prdownloads.sourceforge.net/firebird/interclient_201_Win32.zip that released on 2001-11-13, but the problem still exists! Is the InterClient.jar only for FireBird? But I think InterBase and FileBird use the same kernel. Any instructions?