facebook

Editor for hibernate.cfg.xml rewrites good files wrong.

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

    dtbullock
    Member

    This is an example of a Hibernate configuration file which uses a JNDI lookup to obtain a datasoure. Switching to the MyEclipse special view for this XML file, and touching any one value in the editor puts in some empty tags that cause Hibernate to try and instantiate its own data-source, using (among other things) a null JDBC URL. MyEclipse ought not to do this.

    
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
    <!-- Generated by MyEclipse Hibernate Tools. -->
    <hibernate-configuration>
    
        <session-factory>
    
            <property name="connection.datasource">
                java:comp/env/jdbc/accessreg
            </property>
            <property name="show_sql">false</property>
            <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    
            <mapping resource="accessreg/hibernate/Accessreg.hbm.xml"></mapping>
    
        </session-factory>
    
    </hibernate-configuration>
    

    Sorry, not tested against the latest milestone, and no time at present.

    #242161 Reply

    Riyad Kalla
    Member

    Thank you for the report, we will test it.

    #242304 Reply

    Brian Fernandes
    Moderator

    DTBullock,
    I tried to replicate your issue but failed.

    I used the config that you pasted in your comment verbatim and then edited some of the JNDI fields and added a few properties and mapping – all this in the Configuration page, I assume this is what you were talking about? The editor didn’t insert any JDBC fields, and it wiped off the JNDI configuration only when I used the “Use JDBC Driver” toggle button.

    Since I could not replicate the issue, could you please follow all the instructions here: Posting Guidelines
    That’ll help get to the bottom of this asap.

    Best,
    Brian.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Editor for hibernate.cfg.xml rewrites good files wrong.

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