You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Se...@sita.aero on 2011/02/02 15:46:12 UTC

Axis2/Axiom forceExpand java.lang.Exception

Hello,

I have create a web service client using Axis2. When I am populating my 
request and I do this:

OMElement binaryTokenOMElement = binarySecurityTokenType.getOMElement(new 
QName(ENROLLMENT_NAMESPACE, BINARY_TOKEN_LOCALNAME), OMAbstractFactory.
getOMFactory());
OMText certTextElement = OMAbstractFactory.getOMFactory
().createOMText(binaryTokenOMElement, certificateRequest);
binaryTokenOMElement.addChild(certTextElement);

The call to OMAbstractFactory.getOMFactory().createOMText(...)  throws the 
following exception:

DEBUG Main Thread class 
org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand.forceExpand 
- forceExpand stack
java.lang.Exception: Debug Stack Trace
        at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(
OMSourcedElementImpl.java:248)
        at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.addChild(
OMSourcedElementImpl.java:825)
        at org.apache.axiom.om.impl.llom.OMNodeImpl.<init>(
OMNodeImpl.java:74)
        at org.apache.axiom.om.impl.llom.OMTextImpl.<init>(
OMTextImpl.java:136)
        at org.apache.axiom.om.impl.llom.OMTextImpl.<init>(
OMTextImpl.java:97)
        at 
org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory.createOMText(
OMLinkedListImplFactory.java:206)

Strangely this doens't affect my code and it works as expected but I'd 
like to know why this is happening, and how I can prevent it.

Sean McElroy.



This document is strictly confidential and intended only for use by the addressee unless otherwise stated.  If you are not the intended recipient, please notify the sender immediately and delete it from your system.



Re: Axis2/Axiom forceExpand java.lang.Exception

Posted by Andreas Veithen <an...@gmail.com>.
The exception is actually not thrown. It is only logged at debug
level. I think that this was done to allow developers to determine at
which moment an OMSourcedElement is expanded. You can get rid of the
message by increasing the log level.

Andreas

On Wed, Feb 2, 2011 at 15:46,  <Se...@sita.aero> wrote:
>
> Hello,
>
> I have create a web service client using Axis2. When I am populating my
> request and I do this:
>
> OMElement binaryTokenOMElement = binarySecurityTokenType.getOMElement(new
> QName(ENROLLMENT_NAMESPACE, BINARY_TOKEN_LOCALNAME),
> OMAbstractFactory.getOMFactory());
> OMText certTextElement =
> OMAbstractFactory.getOMFactory().createOMText(binaryTokenOMElement,
> certificateRequest);
> binaryTokenOMElement.addChild(certTextElement);
>
> The call to OMAbstractFactory.getOMFactory().createOMText(...)  throws the
> following exception:
>
> DEBUG Main Thread class
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand.forceExpand -
> forceExpand stack
> java.lang.Exception: Debug Stack Trace
>         at
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:248)
>         at
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.addChild(OMSourcedElementImpl.java:825)
>         at
> org.apache.axiom.om.impl.llom.OMNodeImpl.<init>(OMNodeImpl.java:74)
>         at
> org.apache.axiom.om.impl.llom.OMTextImpl.<init>(OMTextImpl.java:136)
>         at
> org.apache.axiom.om.impl.llom.OMTextImpl.<init>(OMTextImpl.java:97)
>         at
> org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory.createOMText(OMLinkedListImplFactory.java:206)
>
> Strangely this doens't affect my code and it works as expected but I'd like
> to know why this is happening, and how I can prevent it.
>
> Sean McElroy.
>
> This document is strictly confidential and intended only for use by the
> addressee unless otherwise stated. If you are not the intended recipient,
> please notify the sender immediately and delete it from your system.