2 Replies Latest reply on Oct 1, 2002 8:20 AM by vbatista

    Firebird - Long mapping

      Hello!
      I am using tomcat 3.0.0 with bundled tomcat 4.0.3. I am using the database Firebird (Firebird-1.0.0.796) with the driver FirebirdSQL-1.0_RC1. I am using the InterBase mapping which is defined "standardjbosscmp-jdbc.xml" file. I am having problems when I use "long" fields within my CMP entity beans. According to "standardjbosscmp-jdbc.xml", the long mapping is:
      <mapping>
      <java-type>java.lang.Long</java-type>
      <jdbc-type>BIGINT</jdbc-type>
      <sql-type>NUMERIC(18,0)</sql-type>
      </mapping>

      The exception is:
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable:(org.firebirdsql.jdbc.FBSQLException: GDS Exception: org.firebirdsql.gds.GDSException: Dynamic SQL ErrorSQL error code = -817 Metadata update statement is not allowed by the current database SQL dialect 1 null ....

      I have changed "NUMERIC(18,0)" by "DOUBLE PRECISION". I have done this, because I tried to create one table from the "Marathon" client with one column "NUMERIC(18,0)" and on the DB I had the type "Double Precision" for that column.

      My new mapping:
      <mapping>
      <java-type>java.lang.Long</java-type>
      <jdbc-type>BIGINT</jdbc-type>
      <sql-type>DOUBLE PRECISION</sql-type>
      </mapping>


      Can anyone tell me which is the best way to map Longs with Firebird?

      Thanks in advance,
      Victor Batista


        • 1. Re: Firebird - Long mapping
          davidjencks

          Please don't cross post and please do use a dialect 3 database. long is not really supported in dialect 1.

          • 2. Re: Firebird - Long mapping

            Hi!
            I have changed the database dialect from 1 to 3. Now I don't get errors while creating the tables. Although, when I consult the tables structure through the Marathon client, my longs are converted to VARCHAR(250) columns.
            Can any one help me, please.

            Thank in advance,
            Victor Batista