cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: Authentication Framework and BEA
Date Fri, 23 Aug 2002 06:20:06 GMT

> -----Original Message-----
> From:
> []
> Sent: Friday, August 23, 2002 7:48 AM
> To:
> Subject: Authentication Framework and BEA
> Hello,
>   regarding my last post concerning the problem we had, using the Session
> context on
>    BEA, here is what we did to fix the problem.
>   First, we tried what Carsten supposed in his reply, but also using the
> last Xerces version did not
> solve the problem.
> We then looked deeper in the code, to see what caused the problem.
> The exception was thrown in the class in webapps/sesssion/xml
> and there
> in the getFirstNodeFromPath() method, when trying to call
> item.getLocalName().equals(path[startIndex]) == true)......
> We then changed this line to
> item.getNodeName().equals(path[startIndex]) == true)...
> and then it worked.
> Please advise, if this change can have any serious impact on
> something else
> or if we can use it like we have done.
I really begin to "love" the DOM specification...
Ok, the problem is DOM Level 1 vs. DOM Level 2. Cocoon and especially
the portal requires to be namespace aware. The namespace handling
was added to DOM with the Level 2 specification.
In order to have a namespace aware DOM application, you have to use
getLocalName() and not getNodeName() - so this is the reason why
we use getLocalName().

Whether you use DOM Level 1 or Level 2 depends on the DocumentBuilder
you use - and this DocumentBuilder in turn is in most cases defined
by the configured XML parser.

The real bad thing is that if you use DOM Level 1, the getLocalName()
method returns "null" and not the name and then only getNodeName()
can be used.

As I'm not sure if everything in Cocoon will work if you use DOM Level 1
you should try to configure your environment to use DOM Level 2 - This
should be by forcing BEA to use the Xalan 2 - I think there were some
mails in this list describing this procedure.
For running the portal you could as a hack replace every getLocalName()
call with getNodeName(), but I strongly discourage you from doing so.


Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message