- This topic has 5 replies, 3 voices, and was last updated 19 years, 2 months ago by jasongg.
-
AuthorPosts
-
MorkParticipantHi,
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
Riyad KallaMemberM,
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).
MorkParticipantYes, 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
Riyad KallaMemberM 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.
MorkParticipantThat worked fine. Thanks!!!!
— M
jasonggMemberThanks for the post, I had the same problem with needing to update my hibernate.cfg.xml file. Step number 2 did the trick
-
AuthorPosts