2016-03-02 13:29 GMT+00:00 Steve Lyle <[email protected]>:

>
> Gunnar!  Again, I've given you *everything *nHibernate reports on the
> error.  Do you need a live, real-time, firsthand demo?
> You know this.  Like anything else nHibernate code, at execution, runs
> into a problem, catches it, and throws a message.
> In this case "*NHibernate.MappingException*' with "Could not compile the
> mapping document".  Search the code for references to those literals in
> context of AddFile()
>

Did you read my reply? Because I did just that: "searched the code for
references" and as I told you the code proves there would be an
InnerException that explains in further detail what the cause is.

The code is here:
https://github.com/nhibernate/nhibernate-core/blob/master/src/NHibernate/Cfg/Configuration.cs#L529



>
> *What it really turned out to be.*
> AddFile() ~ can't find the file ~ no matter where I put it or what value I
> pass into AddFile(). ~ This by definition is a bug.  Thing I can't figure
> out is if it is because of IIS security.
> This should not be true given the context of my running this in VStudio
> and on my local workstation AND that Configure(<file name>) does not have
> the same issue trying to access <file name>.
>

I don't remember the exact semantics, but if you give a full absolute (and
correct) path to AddFile() and it still can't read the file, then yeah
something with file access permissions could be involved.



> In terms of error reporting "Could not find file" would be more clear and
> the code of AddFile() should be quite capable of discerning "I cannot find
> the file" -v- "I could not compile the file [because I can't find it]".
> I'll bet "could not compile" is a defacto catch all, which is never going
> to be of real help because there isn't any real troubleshooting depth
> beyond the defacto.
>

In my other reply I've already shown you the NHibernate code that throws
the exception. If you had used ToString() on the exception (which includes
InnerException), you would have gotten a message similar to:
"Could not compile mapping document "...."  -> File not found"
Where the latter part is the detailed information coming from the inner
exception.


/Oskar

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to