Hi,
I checked in a possible fix under r747972. Please verify.
Thanks,
Raymond
--------------------------------------------------
From: "Kapish Aggarwal" <[email protected]>
Sent: Wednesday, February 25, 2009 12:44 PM
To: <[email protected]>
Subject: Re: EmptyStackException in
org.apache.tuscany.sca.contribution.processor.TuscanyXMLStreamReader
As far as I can tell, nextTag isn't calling next. I have embedded
Tuscany into a server environment (WebSphere) and only hit the error
trying to start composites during the server startup. If the server is
already running, composites can start/stop without error. I've been
able to reproduce it with some frequency with one or two apps, but it
does not happen every time, which is making it difficult to debug. As
far as I can tell, it is not dependent on the composite being read.
Kapish Aggarwal
On Wed, Feb 25, 2009 at 1:37 PM, Raymond Feng <[email protected]> wrote:
Hi,
We push the namespace declarations for the current element on to the
stack
when next() or nextTag() is called. And then pop them out of the stack
when
the reader leaves an element. It might go out of sequence in this case.
Maybe you can check if nextTag() calls next() in your case.
Thanks,
Raymond
--------------------------------------------------
From: "Kapish Aggarwal" <[email protected]>
Sent: Wednesday, February 25, 2009 8:33 AM
To: <[email protected]>
Subject: EmptyStackException in
org.apache.tuscany.sca.contribution.processor.TuscanyXMLStreamReader
I have hit an unusual EmptyStackException in TuscanyXMLStreamReader. I
am having problems debugging the issue since any actions I take to
gather further information seems to resolve the problem (connecting a
debugger, attempting to produce more detailed logs from execution).
The following is the relevant stack trace I am hitting. My guess,
since I can't reliably recreate the problem, is that there is a timing
issue with multiple threads using the same stack, but can't seem to
verify it. Does anyone familiar with the code have some thoughts?
Kapish Aggarwal
java.util.EmptyStackException
at java.util.Stack.pop(Stack.java:80)
at
org.apache.tuscany.sca.contribution.processor.TuscanyXMLStreamReader.popContext(TuscanyXMLStreamReader.java:73)
at
org.apache.tuscany.sca.contribution.processor.TuscanyXMLStreamReader.next(TuscanyXMLStreamReader.java:85)
at
org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader.next(ValidatingXMLStreamReader.java:148)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.read(CompositeProcessor.java:598)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.read(CompositeProcessor.java:91)
at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.read(DefaultStAXArtifactProcessorExtensionPoint.java:360)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.read(ExtensibleStAXArtifactProcessor.java:152)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.read(CompositeDocumentProcessor.java:151)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.read(CompositeDocumentProcessor.java:118)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.read(CompositeDocumentProcessor.java:57)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.read(ExtensibleURLArtifactProcessor.java:96)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processReadPhase(ContributionServiceImpl.java:536)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:387)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:189)