4 Replies Latest reply on Jun 15, 2005 2:37 PM by 3004

    Error when trying to run PetShop in Eclipse.

    3004
      I plugged Kodo into Eclipse, got everything to compile, and thought I was
      home-free until I tried to run the example:
      ------------------
      1265 INFO [main] kodo.jdbc.JDBC - Using dictionary class
      "kodo.jdbc.sql.HSQLDictionary".
      1765 INFO [main] kodo.MetaData - Parsing metadata resource
      "file:/C:/MBower/My%20Documents/src/eclipse_workspace/PetShop/Animal.mapping".
      2140 INFO [main] kodo.jdbc.Schema - Reading table information for
      schema name "null", table name "ANIMAL".
      kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
      in the mapping for type "Animal" does not exist.[Animal
      [kodo.jdbc.meta.BaseClassMapping]]
           at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
           at
      kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
           at
      kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
           at
      kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
           at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
           at
      kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
           at
      kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
           at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
           at PetShop.<init>(PetShop.java:47)
           at PetShop.main(PetShop.java:180)
      ---------------------------

      As best I can decipher, it is either choking in the space in the directory
      name for "My Documents" or cannot find the table "ANIMAL" in the mapping
      file:

      The file "animal.mapping" reads:
      ----------------
      <?xml version="1.0" encoding="UTF-8"?>
      <mapping>
      <package name="">
      <class name="Animal">
      <jdbc-class-map type="base" pk-column="JDOID" table="ANIMAL"/>
      <jdbc-version-ind type="version-number" column="JDOVERSION"/>
      <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
      <field name="price">
      <jdbc-field-map type="value" column="PRICE"/>
      </field>
      <field name="type">
      <jdbc-field-map type="value" column="TYPE0"/>
      </field>
      </class>
      </package>
      </mapping>
      ------------------

      which appears to define the "ANIMAL" table.

      Confused,
      Mark







        • 1. Re: Error when trying to run PetShop in Eclipse.
          3004
          Mark-

          The problem is that the "ANIMAL" table cannot be found. The database
          should be initialized by running the Kodo->Refresh Mappings action, as
          described at:

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




          In article <d8fbbb$5te$1@solarmetric.netmar.com>, Mark Bower wrote:
          I plugged Kodo into Eclipse, got everything to compile, and thought I was
          home-free until I tried to run the example:
          ------------------
          1265 INFO [main] kodo.jdbc.JDBC - Using dictionary class
          "kodo.jdbc.sql.HSQLDictionary".
          1765 INFO [main] kodo.MetaData - Parsing metadata resource
          "file:/C:/MBower/My%20Documents/src/eclipse_workspace/PetShop/Animal.mapping".
          2140 INFO [main] kodo.jdbc.Schema - Reading table information for
          schema name "null", table name "ANIMAL".
          kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
          in the mapping for type "Animal" does not exist.[Animal
          [kodo.jdbc.meta.BaseClassMapping]]
               at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
               at
          kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
               at
          kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
               at
          kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
               at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
               at
          kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
               at
          kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
               at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
               at PetShop.<init>(PetShop.java:47)
               at PetShop.main(PetShop.java:180)
          ---------------------------

          As best I can decipher, it is either choking in the space in the directory
          name for "My Documents" or cannot find the table "ANIMAL" in the mapping
          file:

          The file "animal.mapping" reads:
          ----------------
          <?xml version="1.0" encoding="UTF-8"?>
          <mapping>
          <package name="">
          <class name="Animal">
          <jdbc-class-map type="base" pk-column="JDOID" table="ANIMAL"/>
          <jdbc-version-ind type="version-number" column="JDOVERSION"/>
          <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
          <field name="price">
          <jdbc-field-map type="value" column="PRICE"/>
          </field>
          <field name="type">
          <jdbc-field-map type="value" column="TYPE0"/>
          </field>
          </class>
          </package>
          </mapping>
          ------------------

          which appears to define the "ANIMAL" table.

          Confused,
          Mark






          --
          Marc Prud'hommeaux
          SolarMetric Inc.
          • 2. Re: Error when trying to run PetShop in Eclipse.
            3004
            Hi, Marc.

            Thank you for the suggestion. However, I had followed the tutorial
            directions closely, including doing the Kodo->Refresh Mappings. I get:

            <info>-Using dictionary class "kodo.jdbc.sql.HSQLDictionary".
            <info>-Mapping tool running on type "class Animal" with action "refresh".
            <info>-Parsing metadata resource
            "file:C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
            <info>-Reading table information for schema name "null", table name "ANIMAL".
            <info>-Recording mapping and schema changes.
            <info>-Reading table information for schema name "null", table name "null".
            <info>-Reading table information for schema name "null", table name
            "JDO_SEQUENCE".
            <info>-Writing to file
            "C:\MBower\MyDocuments\src\eclipse_workspace\PetShop\Animal.mapping".


            When I then try Run->Run, I still get:

            889 INFO [main] kodo.jdbc.JDBC - Using dictionary class
            "kodo.jdbc.sql.HSQLDictionary".
            1341 INFO [main] kodo.MetaData - Parsing metadata resource
            "file:/C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
            1497 INFO [main] kodo.jdbc.Schema - Reading table information for
            schema name "null", table name "ANIMAL".
            kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
            in the mapping for type "Animal" does not exist.[Animal
            [kodo.jdbc.meta.BaseClassMapping]]
                 at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                 at
            kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                 at
            kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                 at
            kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                 at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                 at
            kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                 at
            kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                 at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                 at PetShop.<init>(PetShop.java:46)
                 at PetShop.main(PetShop.java:179)
            Exception in thread "main"


            I can see from the error trace that it still is not finding the table
            "ANIMAL", even though it appears that it found the table during the
            Refresh Mappings.

            Thank you,
            Mark






            Marc Prud'hommeaux wrote:
            Mark-
            The problem is that the "ANIMAL" table cannot be found. The database
            should be initialized by running the Kodo->Refresh Mappings action, as
            described at:
            http://docs.solarmetric.com/manual.html#eclipse_integration
            In article <d8fbbb$5te$1@solarmetric.netmar.com>, Mark Bower wrote:
            I plugged Kodo into Eclipse, got everything to compile, and thought I was
            home-free until I tried to run the example:
            ------------------
            1265 INFO [main] kodo.jdbc.JDBC - Using dictionary class
            "kodo.jdbc.sql.HSQLDictionary".
            1765 INFO [main] kodo.MetaData - Parsing metadata resource
            "file:/C:/MBower/My%20Documents/src/eclipse_workspace/PetShop/Animal.mapping".
            2140 INFO [main] kodo.jdbc.Schema - Reading table information for
            schema name "null", table name "ANIMAL".
            kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
            in the mapping for type "Animal" does not exist.[Animal
            [kodo.jdbc.meta.BaseClassMapping]]
                 at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                 at
            kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                 at
            kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                 at
            kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                 at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                 at
            kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                 at
            kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                 at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                 at PetShop.<init>(PetShop.java:47)
                 at PetShop.main(PetShop.java:180)
            ---------------------------

            As best I can decipher, it is either choking in the space in the directory
            name for "My Documents" or cannot find the table "ANIMAL" in the mapping
            file:

            The file "animal.mapping" reads:
            ----------------
            <?xml version="1.0" encoding="UTF-8"?>
            <mapping>
            <package name="">
            <class name="Animal">
            <jdbc-class-map type="base" pk-column="JDOID" table="ANIMAL"/>
            <jdbc-version-ind type="version-number" column="JDOVERSION"/>
            <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
            <field name="price">
            <jdbc-field-map type="value" column="PRICE"/>
            </field>
            <field name="type">
            <jdbc-field-map type="value" column="TYPE0"/>
            </field>
            </class>
            </package>
            </mapping>
            ------------------

            which appears to define the "ANIMAL" table.

            Confused,
            Mark






            --
            Marc Prud'hommeaux
            SolarMetric Inc.
            • 3. Re: Error when trying to run PetShop in Eclipse.
              3004
              Mark
              My guess is that you are not using an absolute URL. You should
              configure Kodo Preference page -as well as- petshop.properties to use
              the same absolute URL:

              javax.jdo.option.ConnectionURL: jdbc:hsqldb:C:/MBower/mydatabase

              Mark Bower wrote:
              Hi, Marc.

              Thank you for the suggestion. However, I had followed the tutorial
              directions closely, including doing the Kodo->Refresh Mappings. I get:

              <info>-Using dictionary class "kodo.jdbc.sql.HSQLDictionary".
              <info>-Mapping tool running on type "class Animal" with action "refresh".
              <info>-Parsing metadata resource
              "file:C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
              <info>-Reading table information for schema name "null", table name "ANIMAL".
              <info>-Recording mapping and schema changes.
              <info>-Reading table information for schema name "null", table name "null".
              <info>-Reading table information for schema name "null", table name
              "JDO_SEQUENCE".
              <info>-Writing to file
              "C:\MBower\MyDocuments\src\eclipse_workspace\PetShop\Animal.mapping".


              When I then try Run->Run, I still get:

              889 INFO [main] kodo.jdbc.JDBC - Using dictionary class
              "kodo.jdbc.sql.HSQLDictionary".
              1341 INFO [main] kodo.MetaData - Parsing metadata resource
              "file:/C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
              1497 INFO [main] kodo.jdbc.Schema - Reading table information for
              schema name "null", table name "ANIMAL".
              kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
              in the mapping for type "Animal" does not exist.[Animal
              [kodo.jdbc.meta.BaseClassMapping]]
                   at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                   at
              kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                   at
              kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                   at
              kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                   at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                   at
              kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                   at
              kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                   at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                   at PetShop.<init>(PetShop.java:46)
                   at PetShop.main(PetShop.java:179)
              Exception in thread "main"


              I can see from the error trace that it still is not finding the table
              "ANIMAL", even though it appears that it found the table during the
              Refresh Mappings.

              Thank you,
              Mark






              Marc Prud'hommeaux wrote:

              Mark-
              The problem is that the "ANIMAL" table cannot be found. The database
              should be initialized by running the Kodo->Refresh Mappings action, as
              described at:
              http://docs.solarmetric.com/manual.html#eclipse_integration
              In article <d8fbbb$5te$1@solarmetric.netmar.com>, Mark Bower wrote:
              I plugged Kodo into Eclipse, got everything to compile, and thought I was
              home-free until I tried to run the example:
              ------------------
              1265 INFO [main] kodo.jdbc.JDBC - Using dictionary class
              "kodo.jdbc.sql.HSQLDictionary".
              1765 INFO [main] kodo.MetaData - Parsing metadata resource
              "file:/C:/MBower/My%20Documents/src/eclipse_workspace/PetShop/Animal.mapping".
              2140 INFO [main] kodo.jdbc.Schema - Reading table information for
              schema name "null", table name "ANIMAL".
              kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
              in the mapping for type "Animal" does not exist.[Animal
              [kodo.jdbc.meta.BaseClassMapping]]
                   at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                   at
              kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                   at
              kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                   at
              kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                   at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                   at
              kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                   at
              kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                   at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                   at PetShop.<init>(PetShop.java:47)
                   at PetShop.main(PetShop.java:180)
              ---------------------------

              As best I can decipher, it is either choking in the space in the directory
              name for "My Documents" or cannot find the table "ANIMAL" in the mapping
              file:

              The file "animal.mapping" reads:
              ----------------
              <?xml version="1.0" encoding="UTF-8"?>
              <mapping>
              <package name="">
              <class name="Animal">
              <jdbc-class-map type="base" pk-column="JDOID" table="ANIMAL"/>
              <jdbc-version-ind type="version-number" column="JDOVERSION"/>
              <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
              <field name="price">
              <jdbc-field-map type="value" column="PRICE"/>
              </field>
              <field name="type">
              <jdbc-field-map type="value" column="TYPE0"/>
              </field>
              </class>
              </package>
              </mapping>
              ------------------

              which appears to define the "ANIMAL" table.

              Confused,
              Mark






              --
              Marc Prud'hommeaux
              SolarMetric Inc.
              --
              Steve Kim
              skim@solarmetric.com
              SolarMetric Inc.
              http://www.solarmetric.com
              • 4. Re: Error when trying to run PetShop in Eclipse.
                3004
                DING! WIN-NAH!!!!

                I was using the relative URL in both places. Changed both to absolute and
                it fired up without a hitch!

                Thank you!
                Mark


                Stephen Kim wrote:
                Mark
                My guess is that you are not using an absolute URL. You should
                configure Kodo Preference page -as well as- petshop.properties to use
                the same absolute URL:
                javax.jdo.option.ConnectionURL: jdbc:hsqldb:C:/MBower/mydatabase
                Mark Bower wrote:
                Hi, Marc.

                Thank you for the suggestion. However, I had followed the tutorial
                directions closely, including doing the Kodo->Refresh Mappings. I get:

                <info>-Using dictionary class "kodo.jdbc.sql.HSQLDictionary".
                <info>-Mapping tool running on type "class Animal" with action "refresh".
                <info>-Parsing metadata resource
                "file:C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
                <info>-Reading table information for schema name "null", table name
                "ANIMAL".
                <info>-Recording mapping and schema changes.
                <info>-Reading table information for schema name "null", table name "null".
                <info>-Reading table information for schema name "null", table name
                "JDO_SEQUENCE".
                <info>-Writing to file
                "C:MBowerMyDocumentssrceclipse_workspacePetShopAnimal.mapping".


                When I then try Run->Run, I still get:

                889 INFO [main] kodo.jdbc.JDBC - Using dictionary class
                "kodo.jdbc.sql.HSQLDictionary".
                1341 INFO [main] kodo.MetaData - Parsing metadata resource
                "file:/C:/MBower/MyDocuments/src/eclipse_workspace/PetShop/Animal.mapping".
                1497 INFO [main] kodo.jdbc.Schema - Reading table information for
                schema name "null", table name "ANIMAL".
                kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
                in the mapping for type "Animal" does not exist.[Animal
                [kodo.jdbc.meta.BaseClassMapping]]
                     at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                     at
                kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                     at
                kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                     at
                kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                     at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                     at
                kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                     at
                kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                     at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                     at PetShop.<init>(PetShop.java:46)
                     at PetShop.main(PetShop.java:179)
                Exception in thread "main"


                I can see from the error trace that it still is not finding the table
                "ANIMAL", even though it appears that it found the table during the
                Refresh Mappings.

                Thank you,
                Mark






                Marc Prud'hommeaux wrote:

                Mark-
                The problem is that the "ANIMAL" table cannot be found. The database
                should be initialized by running the Kodo->Refresh Mappings action, as
                described at:
                http://docs.solarmetric.com/manual.html#eclipse_integration
                In article <d8fbbb$5te$1@solarmetric.netmar.com>, Mark Bower wrote:
                I plugged Kodo into Eclipse, got everything to compile, and thought I was
                home-free until I tried to run the example:
                ------------------
                1265 INFO [main] kodo.jdbc.JDBC - Using dictionary class
                "kodo.jdbc.sql.HSQLDictionary".
                1765 INFO [main] kodo.MetaData - Parsing metadata resource
                "file:/C:/MBower/My%20Documents/src/eclipse_workspace/PetShop/Animal.mapping".
                >>
                2140 INFO [main] kodo.jdbc.Schema - Reading table information for
                schema name "null", table name "ANIMAL".
                kodo.jdbc.meta.MappingInfoNotFoundException: The table "ANIMAL" specified
                in the mapping for type "Animal" does not exist.[Animal
                [kodo.jdbc.meta.BaseClassMapping]]
                     at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:134)
                     at
                kodo.jdbc.meta.BaseClassMapping.fromMappingInfo(BaseClassMapping.java:170)
                     at
                kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:59)
                >>
                     at
                kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:393)
                >>
                     at
                kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:348)
                     at
                kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:294)
                     at
                kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:271)
                     at kodo.runtime.ExtentImpl.iterator(ExtentImpl.java:109)
                     at PetShop.<init>(PetShop.java:47)
                     at PetShop.main(PetShop.java:180)
                ---------------------------

                As best I can decipher, it is either choking in the space in the directory
                name for "My Documents" or cannot find the table "ANIMAL" in the mapping
                file:

                The file "animal.mapping" reads:
                ----------------
                <?xml version="1.0" encoding="UTF-8"?>
                <mapping>
                <package name="">
                <class name="Animal">
                <jdbc-class-map type="base" pk-column="JDOID" table="ANIMAL"/>
                <jdbc-version-ind type="version-number" column="JDOVERSION"/>
                <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
                <field name="price">
                <jdbc-field-map type="value" column="PRICE"/>
                </field>
                <field name="type">
                <jdbc-field-map type="value" column="TYPE0"/>
                </field>
                </class>
                </package>
                </mapping>
                ------------------

                which appears to define the "ANIMAL" table.

                Confused,
                Mark






                --
                Marc Prud'hommeaux
                SolarMetric Inc.
                --
                Steve Kim
                skim@solarmetric.com
                SolarMetric Inc.
                http://www.solarmetric.com