1 Reply Latest reply on Sep 16, 2003 4:12 AM by 3004

    MappingInfoNotFoundException with field numeric type

    3004
      CREATE TABLE EMP (
      EMPID INTEGER NOT NULL,
      NAME VARCHAR(190),
      DEPT INTEGER,
      SALARY NUMERIC(8,2));
      But when I run com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool
      there are errors :
      0 INFO [main] kodo.MetaData - Parsing metadata resource
      "file:/D:/package.mapping".
      1054 INFO [main] kodo.MetaData - Parsing metadata resource
      "file:/D:/classes/package.jdo".
      1435 INFO [main] kodo.MetaData - Generating metadata for type "class
      Emp".
      2338 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> open:
      jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
      2629 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> close
      2760 INFO [main] jdbc.JDBC - Using dictionary class
      "com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary"
      (Firebird _/WI-V6.3.0.3815 Firebird 1.5 Release Candidate 6 ,firebirdsql
      jca/jdbc resource adapter 0.1).

      3964 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> open:
      jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
      3964 INFO [main] jdbc.Schema - Generating tables for schema name "null",
      table name "EMP".
      4014 INFO [main] jdbc.Schema - Generating column information for table
      "EMP".
      4014 INFO [main] jdbc.Schema - Generating primary key information for
      table "EMP".
      4044 INFO [main] jdbc.Schema - Generating foreign key information for
      table "EMP".
      4094 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> close

      4144 WARN [main] kodo.MetaData - The "column" attribute/extension for
      field "Emp.salary" names a column whose type is not compatible with the
      type of the field.

      com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoNotFoundException: Could
      not obtain a valid mapping for "Emp.salary". This could indicate that
      mapping information couldnt be found, or that it was invalid. Check the
      log for possible details.
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:360)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:941)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.resolve(ClassMapping.java:883)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMappings(ClassMapping.java:813)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapField(ImportTool.java:236)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:85)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
      at
      com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
      Exception in thread "main"

      But when SALARY have type float, there is no error. I use Firebird 1.5
      Database and InterbaseDictionary (all the file are generated automatically
      by RerverseMapping from database). My configuration file :

      com.solarmetric.kodo.impl.jdbc.DBDictionaryClass=com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary
      com.solarmetric.kodo.impl.jdbc.DictionaryClass=com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary
      javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
      javax.jdo.option.ConnectionDriverName=org.firebirdsql.jdbc.FBDriver
      javax.jdo.option.ConnectionUserName=sysdba
      javax.jdo.option.ConnectionPassword=masterkey
      javax.jdo.option.ConnectionURL=jdbc\:firebirdsql\:localhost/3050\:D\:/t1.gdb








        • 1. Re: MappingInfoNotFoundException with field numeric type
          3004
          Firebird is not a supported database, so it might be giving back
          metadata in some exotic and unexpected way.

          I recommend that you generate a schema.xml file and change the type of the
          field in that file.

          See:

          http://docs.solarmetric.com/manual.html#ref_guide_pc_reverse

          In article <bk3otj$65n$1@solarmetric.netmar.com>, abc wrote:
          CREATE TABLE EMP (
          EMPID INTEGER NOT NULL,
          NAME VARCHAR(190),
          DEPT INTEGER,
          SALARY NUMERIC(8,2));
          But when I run com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool
          there are errors :
          0 INFO [main] kodo.MetaData - Parsing metadata resource
          "file:/D:/package.mapping".
          1054 INFO [main] kodo.MetaData - Parsing metadata resource
          "file:/D:/classes/package.jdo".
          1435 INFO [main] kodo.MetaData - Generating metadata for type "class
          Emp".
          2338 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> open:
          jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
          2629 INFO [main] jdbc.JDBC - <t 24622029, conn 29194312> close
          2760 INFO [main] jdbc.JDBC - Using dictionary class
          "com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary"
          (Firebird _/WI-V6.3.0.3815 Firebird 1.5 Release Candidate 6 ,firebirdsql
          jca/jdbc resource adapter 0.1).

          3964 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> open:
          jdbc:firebirdsql:localhost/3050:D:/t1.gdb (sysdba)
          3964 INFO [main] jdbc.Schema - Generating tables for schema name "null",
          table name "EMP".
          4014 INFO [main] jdbc.Schema - Generating column information for table
          "EMP".
          4014 INFO [main] jdbc.Schema - Generating primary key information for
          table "EMP".
          4044 INFO [main] jdbc.Schema - Generating foreign key information for
          table "EMP".
          4094 INFO [main] jdbc.JDBC - <t 24622029, conn 11918020> close

          4144 WARN [main] kodo.MetaData - The "column" attribute/extension for
          field "Emp.salary" names a column whose type is not compatible with the
          type of the field.

          com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoNotFoundException: Could
          not obtain a valid mapping for "Emp.salary". This could indicate that
          mapping information couldnt be found, or that it was invalid. Check the
          log for possible details.
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:360)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:941)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.resolve(ClassMapping.java:883)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping.getFieldMappings(ClassMapping.java:813)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapField(ImportTool.java:236)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:85)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
          at
          com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
          Exception in thread "main"

          But when SALARY have type float, there is no error. I use Firebird 1.5
          Database and InterbaseDictionary (all the file are generated automatically
          by RerverseMapping from database). My configuration file :

          com.solarmetric.kodo.impl.jdbc.DBDictionaryClass=com.solarmetric.rd.kodo.impl.jdbc.schema.dict.InterbaseDictionary
          com.solarmetric.kodo.impl.jdbc.DictionaryClass=com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary
          javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
          javax.jdo.option.ConnectionDriverName=org.firebirdsql.jdbc.FBDriver
          javax.jdo.option.ConnectionUserName=sysdba
          javax.jdo.option.ConnectionPassword=masterkey
          javax.jdo.option.ConnectionURL=jdbc\:firebirdsql\:localhost/3050\:D\:/t1.gdb







          --
          Marc Prud'hommeaux marc@solarmetric.com
          SolarMetric Inc. http://www.solarmetric.com