-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Problem starting Mapping Editor 3.1beta2
PostPosted: Sun Jan 01, 2006 9:50 pm 
Newbie

Joined: Sun Jan 01, 2006 9:38 pm
Posts: 5
Hope someone can help - I'm trying to get the mapping editor working.

On right clicking on the .hbm.xml file, I only get the three standard editors showing up.

After searching the forums, I suspected I needed to install WTP (although I believe this isn't necessary with the beta2?). In any case, I first installed WTP0.7.1, then tried WTP0.7.1 on a brand new installation of Eclipse, followed by WTP1.0 (the all in one version, so another clean installation of eclipse). No change in behaviour each time.

I've also been using eclipse -clean in case the plugins aren't being picked up.


Any ideas? It looks like a great tool!

I'm Using tools version 3.1 beta 2 and Eclipse 3.1 (standard Eclipse, not MyEclipse), as as I say I've tried both WTP0.7.1 and 1.0.

Many thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 3:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
just use the standard XML editor - that is the one we extend.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 8:24 am 
Newbie

Joined: Sun Jan 01, 2006 9:38 pm
Posts: 5
Hi Max,

Thanks for the help.

So, in the standard editor, what should happen?

Working from the documentation section 4, it looks like I should be given a list of available properties from the reference class?

For me, nothing special seems to be happening - this is what the editor looks like: (this class has a few properties like name etc)

Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 03, 2006 2:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the outline should have a top line with the text "hibernate tools".

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 1:41 pm 
Newbie

Joined: Wed Jan 04, 2006 1:26 pm
Posts: 2
I'm experiencing the same problem reported in this thread. The outline does in fact have the top line that you mentioned. It appears that the XML editor pane is not in sync with the outline. I.E. after changing, saving, and re-opening the source pane of the xml editor, the outline still shows the old values.

btw: the console perspective is very nice.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 2:01 pm 
Newbie

Joined: Sun Jan 01, 2006 9:38 pm
Posts: 5
Hi,

Sorry for not replying earlier, and thanks for the replies.

Yes, I too see "Hibernate Tools" at the top of the outline - is this what I should see?

Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 8:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
do you by chance have more than one xml editor installed ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 8:40 pm 
Newbie

Joined: Sun Jan 01, 2006 9:38 pm
Posts: 5
The very first time I installed Hibernate Tools, I think I had XML Buddy installed. I was suspicious this was causing some problems.

I then got rid of XML Buddy, and nothing changed, so I then went on to work on a completely clean Eclipse installation.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 1:08 am 
Newbie

Joined: Mon Jan 31, 2005 12:21 pm
Posts: 2
i'm with a few people here. i installed the Hib tools by the book, i can see the database, mapping files and class properties in teh Hibernate Console View, but when I edit the Mapping file, i don't get any auto-complete suggestions


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 3:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I have seen this stuff being caused by a couple of things:

1. Having other xml editors installed which breaks the WTP XML Editor (such as XML Buddy)

2. Not having a proper declared xml declaration in the hbm.xml.

3. Not doing it in a java project

4. Having some weird mix-match of WTP versions

Let me know if one of the above fits into your problem.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 5:36 pm 
Newbie

Joined: Fri Sep 12, 2003 4:01 pm
Posts: 19
A few other things I've seen go wrong:

Sometimes when you first create the mapping file, Eclipse doesn't recognize it as a Hibernate file (i.e. no "Hibernate Tools" over in the outline view). Recognition finally occurs after the file is closed and re-opened.

If the associated class doesn't exist, content assist won't work for property names. I think in this case there ought to be an error marker on the name attribute of the class tag.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 3:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
first part is caused by the nature of how content types works in eclipse - it needs the <hibernate-mapping> tag to "activate" on...In the future i'll probably add a "New hbm.xml" file wizard that avoids this extra step (but until then you can use the basic New Xml file Wizard which should allow yuu to do the same)

The second part is semantic on-the-fly validation of the hbm.xml which will be added in upcoming releases.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 2:05 pm 
Newbie

Joined: Wed Jan 04, 2006 1:26 pm
Posts: 2
"If the associated class doesn't exist, content assist won't work for property names. I think in this case there ought to be an error marker on the name attribute of the class tag."

In may case, the associated class does in fact exist - still no content assist.

I've created a java project and used reveng.xml to generate the java and hbm so I assumed I had the correct mappings.

Is there a sample eclipse java project then you can attach?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 3:47 pm 
Newbie

Joined: Fri Sep 12, 2003 4:01 pm
Posts: 19
Actually I don't think I've ever seen it recognize a new file as a Hibernate file -- I always have to close and re-open it. I can well believe that this is a web tools bug and not a bug in the hibernate tools though.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 07, 2006 3:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
is the source files in a source directory ? (meaning on the build path of the eclipse project)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.