--
You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group.
To post to this group, send email to fluent-n...@googlegroups.com.
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.
On Dec 16, 3:50 pm, James Gregory <jagregory....@gmail.com> wrote:
> The NHibernate exceptions actually do contain a lot of information,
> including the types. You just need to know how to read them. As the
> exceptions are actually XML Schema violations, they can take some peculiar
> forms, but once you understand what the schema is they're pretty easy.
Not sure I understand. The NHibernate message (taken from the Alex's
Stack Overflow post) was:
{"(XmlDocument)(3,6): XML validation error: The element 'class' in
namespace 'urn:nhibernate-mapping-2.2' has invalid child element
'property' in namespace 'urn:nhibernate-mapping-2.2'. List of possible
elements expected: 'meta, subselect, cache, synchronize, comment,
tuplizer, id, composite-id' in namespace 'urn:nhibernate-
mapping-2.2'."}
I use an "ExportTo" in my configuration, which saves the XML mapping
files to disk. Are you saying that by examining these files we can
determine which class failed to map?
If so, do we have to scan every file, looking for the one that has a
problem? Or is there some clue in the message thrown by NHibernate
that will tell us which class is failing (to me, all the info in the
message above looks very generic).
I'd love to get a better handle on this, and would appreciate any
light you can shed on the issue.
-Tom
>
>
>
> On Wed, Dec 16, 2009 at 8:47 PM, tbushell <tbush...@bic.com> wrote:
>
> > On Dec 15, 4:29 pm, James Gregory <jagregory....@gmail.com> wrote:
> > > Fluent NHibernate != NHibernate. We're just a layer ontop of NH. Once we
> > > pass off our mappings to NH, there's little we can do. We have plans to
> > put
> > > in a validation layer to try to catch the obvious cases (like missing Id)
> > > before we pass off to NH, but the cryptic exceptions aren't our doing.
>
> > That sounds like a great idea. Automapping is a terrific technology,
> > but, IMO, is being hamstrung by arcane error messages. There have
> > been seveal times in the last few weeks I've been on the verge of
> > chucking it. (Glad I didn't - thanks again to the people on this list
> > who helped me out!)
>
> > One of the biggest problems I see is that there's often no indication
> > of which class or member that is causing the error.
>
> > Would it be worthwhile if several of we Fluent NH users submitted
> > requests to the NH team to put more specific info in their error
> > messages (e.g. which class, which member, etc)?
>
> > -Tom
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Fluent NHibernate" group.
> > To post to this group, send email to fluent-n...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > fluent-nhibern...@googlegroups.com<fluent-nhibernate%2Bunsubscri...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/fluent-nhibernate?hl=en.- Hide quoted text -
>
> - Show quoted text -
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
On Dec 17, 4:18 pm, Paul Batum <paul.ba...@gmail.com> wrote:
> That error is basically saying that you forgot to map an ID. Not very clear
> I know!
Yeah, it's bad on so many levels:
- It lists 8 possible elements that could be missing
- the most common one, Id, is buried near the end of the list
- it doesn't tell you which class is missing the element
> I do think NHibernate could do a better job with its error messages,
Absolutely. I'll probably submit this as a bug to the NHibernate
guys, and see what they say.
> and of course FNH could do some sanity checks to prevent the user from
> getting as far as schema validation with a dodgy mapping.
If FNH just flagged missing Id members, and things it didn't know how
to map, that would go a long way to solving the problem. Easy for me
to say, of course, having no idea of how much work is really
involved... ;-)
-Tom
> > > >http://groups.google.com/group/fluent-nhibernate?hl=en.-Hide quoted
To unsubscribe from this group, send email to fluent-nhibern...@googlegroups.com.
On Dec 19, 9:35 am, Mikael Henriksson <mik...@zoolutions.se> wrote:
> When I switched to log4net and nunit I had no problems what so ever finding
> the source of the issues.
I'm getting the full exception via the VS2008 debugger, so don't think
that's an issue.
Had no luck getting log4net running a few weeks back, but think I have
some better documentation now.
I'll try again - thanks for the suggestion.
-Tom