0 Replies Latest reply on Sep 26, 2002 12:04 PM by vbatista

    Firebird - Long mapping error

      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:

      <java-type>java.lang.Long</java-type>
      <jdbc-type>BIGINT</jdbc-type>
      <sql-type>NUMERIC(18,0)</sql-type>


      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:

      <java-type>java.lang.Long</java-type>
      <jdbc-type>BIGINT</jdbc-type>
      <sql-type>DOUBLE PRECISION</sql-type>



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

      Thanks in advance,
      Victor Batista