• Post Reply Bookmark Topic Watch Topic
  • New Topic

xerces DOM concurrent access issue  RSS feed

 
vijay bedisa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using axis 1.4 version. Running into trouble with NodeLists. Internally they cache the length and previously accessed position to improve the performance of calls to getLength() and item(i). Invoking these methods from multiple threads (even on different NodeLists) without synchronizing your application code will lead to the exceptions [1] You can't count on the other read operations being thread-safe either.

[1] Caused by: java.lang.NullPointerException
at org.apache.xerces.dom.ParentNode.nodeListGetLength(Unknown Source)
at org.apache.xerces.dom.ParentNode.getLength(Unknown Source)

Below URL explains about this issue:
http://www.mail-archive.com/j-users@xerces.apache.org/msg00536.html

There is a jira id for this issue and resolution of which is invalid. Below is the URL for this jiraid:
http://www.mail-archive.com/j-dev@xerces.apache.org/msg01292.html

Is there any resolution for this issue in any of the latest version of axis jar. Or is there any workaround or resolution for this issue.

Thanks in advance.
Raghav
 
Gipsy Gopinathan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Synchronization is not an option for you?
Also please paste the code snippet , that will help answering your question.
 
vijay bedisa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using the below code snippet in our code which handles the request object used for a webservice call.

Document headerDocumentTemplate = configuration.getHeaderDocumentTemplate();
SOAPHeaderElement headerElement1 = new SOAPHeaderElement(headerDocumentTemplate.getDocumentElement());
header.addChildElement(headerElement1);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!