EmptyStackException
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 47
- Joined: Thu Jun 19, 2014 3:55 pm
EmptyStackException
Hi,
we are using the Eclipse Oxygen Author in Version 15.2.
I use this method:
I get a EmptyStackException sometimes.
Best regards,
Denis
we are using the Eclipse Oxygen Author in Version 15.2.
I use this method:
Code: Select all
whatPossibleValuesHasAttributeContext = authorSchemaManager
.createWhatPossibleValuesHasAttributeContext(
authorElement, attributeAtIndex);
Code: Select all
at java.util.Stack.peek(Stack.java:85)
at java.util.Stack.pop(Stack.java:67)
at ro.sync.ecss.contentcompletion.b.e(Unknown Source)
at ro.sync.ecss.strictediting.k.createWhatPossibleValuesHasAttributeContext(Unknown Source)
at de.kgucms.kgu.tps.client.oxygen.integration.adapter.AuthorNodePropertySource.handleAlreadyDeclaredAttributes(AuthorNodePropertySource.java:480)
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
KGU Consulting GmbH
http://www.kgu-consulting.com
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: EmptyStackException
Hi Denis,
Could you add some logging like System.err.println(String.valueOf(authorElement)) to see for what element this fails?
Also, the node for which you call the method should always be a part of the current document (so you should not call the method for a node located in an AuthorDocumentFragment for example).
Regards,
Radu
Could you add some logging like System.err.println(String.valueOf(authorElement)) to see for what element this fails?
Also, the node for which you call the method should always be a part of the current document (so you should not call the method for a node located in an AuthorDocumentFragment for example).
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 47
- Joined: Thu Jun 19, 2014 3:55 pm
Re: EmptyStackException
Hi Radu,
the error.println get this information
The method works often without a problem, but sometimes I get the exception and I do not see the difference between the element which throws the exception and the elements, which not.
Best regards,
Denis
the error.println get this information
Code: Select all
<#reference href="file:path/To/Reference" ,> (3678, 3678)
Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
KGU Consulting GmbH
http://www.kgu-consulting.com
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: EmptyStackException
Post by alex_jitianu »
Hello Denis,
My colleague Radu is currently away on a conference so I will try to help you while he's not here.
This node is a reference not so you are probably inside a conref-ed content. I tried the same scenario and I didn't get an exception. This exception can happen if this node is not part of the document, if it comes from an AuthorDocumentFragment (like my colleague Radu also said). To test that you can use something like this:
If you are not seeing all the elements up to the root, then you are in a fragment and you can't use this API for such nodes.
Also, you don't really need schema information for such a reference node. You most likely need it for its parent element, the one that has the conref attribute. These references nodes are transparent for the code that queries the schema, but just to see if it's any different, could you try something like this and see if you still get the exception?
Best regards,
Alex
My colleague Radu is currently away on a conference so I will try to help you while he's not here.
This node is a reference not so you are probably inside a conref-ed content. I tried the same scenario and I didn't get an exception. This exception can happen if this node is not part of the document, if it comes from an AuthorDocumentFragment (like my colleague Radu also said). To test that you can use something like this:
Code: Select all
while (node != null) {
System.out.println("Node " + node);
node = node.getParent();
}
Also, you don't really need schema information for such a reference node. You most likely need it for its parent element, the one that has the conref attribute. These references nodes are transparent for the code that queries the schema, but just to see if it's any different, could you try something like this and see if you still get the exception?
Code: Select all
if (authorElement.getType() == AuthorNode.NODE_TYPE_REFERENCE) {
authorElement = authorElement.getParent();
}
whatPossibleValuesHasAttributeContext = authorSchemaManager
.createWhatPossibleValuesHasAttributeContext(
authorElement, attributeAtIndex);
Alex
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service