facebook

Modifying the Hibernate Configuration File

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

    Mork
    Participant

    Hi,

    I’m working through your “Hibernate QuickStart” demo and I made a mistake in the initial database connection string.

    However, when I go to the Hibernate configuraiton file to “fix this”, you have comments in there NOT TO EDIT IT as it’s part of MyEclipse integration.

    So, how do I fix a port typo, for example, for the database set up (or any other problems) in the Hibernate config file?

    Thanks very much in advance.

    — M

    #232109 Reply

    Riyad Kalla
    Member

    M,
    Can you switch to the configuration view and edit the file? IIRC the reason we stuck that comment in there is to let people know that the configuration file can be regenerated and we didn’t want them making a whole slew of customizations only to have them all thrown out (we can get around this with the Java classes by having 1 abstract and 1 concrete, but with the XML files we rely on the comments).

    #232129 Reply

    Mork
    Participant

    Yes, I can edit the file, but it doesn’t have any effect.

    You can see the problem when you go to the next step of the “Hibernate Quick start” and try to open a connection to the database.

    The connection fails becuase it’s still using what’s in the old Hibernate config file information even though I saved the updaetd Hibernate config file.

    Can you double check how I can successfully update “some” file to fix my stupid typo?

    Thanks again.

    — M

    #232139 Reply

    Riyad Kalla
    Member

    M I’m sorry I don’t have a datasource on this machine handy to connect to right now to reproduce your issues, so I’ll just suggest a few things.

    1) From the DB Explorere perspecive, can you try to edit your connection and adjust the settings?
    2) Try File > New > Hibernate Configuration and try re-adding it specifying the corrected connection settings IF step #1 alone didn’ work.

    #232155 Reply

    Mork
    Participant

    That worked fine. Thanks!!!!

    — M

    #233712 Reply

    jasongg
    Member

    Thanks for the post, I had the same problem with needing to update my hibernate.cfg.xml file. Step number 2 did the trick

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Modifying the Hibernate Configuration File

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