facebook

HQL Editor not able to read mapping files.

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #264882 Reply

    nvmurali
    Member

    I’m using SPRING + Hibernate.

    I take it MyEclipse cannot read an application-data.xml file and pick up where the hibernate mapping files are.

    So, I used MyEclipse Hibernate Configuration File Wizard to create a hibernate.cfg.xml file adding in all the hbm files I have.

    When I try to get to the HQL Editor view, MyEclipse complains that it cannot read the mapping file. The mapping file is present and there are no errors.

    Please help!

    #264883 Reply

    nvmurali
    Member

    The exact message is “Could not read mappings from resource <filename>”. I tried removing the offending file, and it just moved on to the next one. So any help in this regard would be very much appreciated.

    #264892 Reply

    Haris Peco
    Member

    nvmurali,

    Could you send your hibernate.cfg.xml and one hbm.xml.
    It is possible that you have wrong mapping in cfg.xml, for example if you have :

    <mapping resource=”com/genuitec/test/A.hbm.xml” />

    A.hbm.xml have to be in package com.genuitec.test in your source folder.

    It is possible that your hbm.xml is invalid as well.

    Regards

    #264916 Reply

    Brian Fernandes
    Moderator

    Please also note that MyEclipse can read HibernateSessionFactory beans in most Spring configuration files, so creating a separate hibernate.cfg.xml file for your project was not really required.

    Whatever configuration file you choose, Spring or Hibernate, please ensure that Project > Properties > MyEclipse-Hibernate > Active Configuration File points to it.
    As Peco suggested above, you probably have incorrect paths specified in your configuration file.

    #266889 Reply

    vgbpowertech
    Member

    Had the same problem after I moved from MyEclipse 5.1 to 5.5 M1.

    The HQL-Editor from 5.1 worked fine. After the update, I got the same error as mentioned above.
    The setting of the hibernate.cfg was correct – the path of the mappings too. It´s an system already in productive use. After I changed it to another file and reselected the original one it worked as before. Because in effect I didn´t really change any setting I assume a little bug here…

    Then another problem appeared: he didn´t find the Oracle-driver. The contents of the user-library was lost. Reconfigured the user-library and now it works as it should…

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: HQL Editor not able to read mapping files.

You must be logged in to post in the forum log in