You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by mi...@sonynetservices.com on 2002/08/23 07:47:56 UTC

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 XMLUtil.java 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.

Thanx in advance for any help,


miHam



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Authentication Framework and BEA

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: michael_hampel@sonynetservices.com
> [mailto:michael_hampel@sonynetservices.com]
> Sent: Friday, August 23, 2002 7:48 AM
> To: cocoon-users@xml.apache.org
> 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 XMLUtil.java 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.

HTH
Carsten


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>