[ 
https://issues.apache.org/jira/browse/XMLBEANS-328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927264#action_12927264
 ] 

Craig Garrett commented on XMLBEANS-328:
----------------------------------------

I am running into this same issue in XMLBeans 2.5, and it only happens when we 
have several threads processing with XMLBeans at the same time. Radu, could you 
please provide a patch for XMLBeans 2.5?  I may have to try backing out to 
XMLBeans 2.4 so I can use the patch that you posted in Dec 2008. Thanks!

Here's some of the stack traces (we're using Sun JVM 1.6, 64-bit on 64-bit 
Windows Server 2003, running under Tomcat):

java.lang.NullPointerException
        at org.apache.xmlbeans.impl.store.Cur.listRemove(Cur.java:2788)
        at org.apache.xmlbeans.impl.store.Cur.release(Cur.java:2734)
        at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2398)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:158)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:141)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:122)

java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.xmlbeans.impl.store.Cur$Locations.remove(Cur.java:648)
        at org.apache.xmlbeans.impl.store.Cur$Locations.remove(Cur.java:571)
        at org.apache.xmlbeans.impl.store.Cur.pop(Cur.java:772)
        at 
org.apache.xmlbeans.impl.store.Locale.getAllNamespaces(Locale.java:2341)
        at 
org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2307)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.setterHelper(XmlObjectBase.java:1984)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set(XmlObjectBase.java:2062)

java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.xmlbeans.impl.store.Locale.exit(Locale.java:2889)
        at org.apache.xmlbeans.impl.store.Xobj.validate(Xobj.java:1877)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.validate(XmlObjectBase.java:375)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.validate(XmlObjectBase.java:346)

java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.xmlbeans.impl.store.Locale.exit(Locale.java:2889)
        at org.apache.xmlbeans.impl.store.Xobj.invalidate_text(Xobj.java:1796)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set_commit(XmlObjectBase.java:1345)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.setEnumValue(XmlObjectBase.java:1692)

java.lang.ArrayIndexOutOfBoundsException: -1
        at org.apache.xmlbeans.impl.store.Locale.exit(Locale.java:2889)
        at org.apache.xmlbeans.impl.store.Xobj.fetch_text(Xobj.java:1812)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.get_wscanon_text(XmlObjectBase.java:1366)
        at 
org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1303)
        at 
org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx.getEnumValue(JavaStringEnumerationHolderEx.java:60)


> Problems in multi-processor environment
> ---------------------------------------
>
>                 Key: XMLBEANS-328
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-328
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2, Version 2.2.1
>         Environment: At least Win XP and Linux 2.6 with Sun JRE. Intel 
> multi-core processor.
>            Reporter: Pasi Lehtimaki
>            Assignee: Radu Preotiuc-Pietro
>            Priority: Critical
>         Attachments: patch-xmlbeans-2.2.0, patch-XMLBEANS328-2.4.0.patch, 
> xbean.jar
>
>
> Running a strongly threadded Eclipse application using xmlbeans in 
> multi-processor (/multi-core) computer causes frequent crashes in xmlbeans 
> code. 
> Most of the crases happen in Cur.java in form of a NPE: 
> ***************************************************
> java.lang.NullPointerException
>       at org.apache.xmlbeans.impl.store.Cur.listRemove(Cur.java:2783)
>       at org.apache.xmlbeans.impl.store.Locale.getCur(Locale.java:2775)
>       at org.apache.xmlbeans.impl.store.Locale.tempCur(Locale.java:2736)
>       at org.apache.xmlbeans.impl.store.Locale.tempCur(Locale.java:2731)
>       at org.apache.xmlbeans.impl.store.Xobj.tempCur(Xobj.java:348)
>       at org.apache.xmlbeans.impl.store.Xobj.new_cursor(Xobj.java:1810)
>       at 
> org.apache.xmlbeans.impl.values.XmlObjectBase.newCursor(XmlObjectBase.java:250)
>       at 
> org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:424)
>       at 
> org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.java:415)
> ***************************************************
> In some cases the crash happens in Locale.exit():
> ***************************************************
>  Exception occurred: java.lang.ArrayIndexOutOfBoundsException: -1
>                      at 
> org.apache.xmlbeans.impl.store.Locale.exit(Locale.java:2840)
> ***************************************************
> This problem problem occurs in xmlbeans 2.2. and in the latest version in 
> SVN. The problem disappears when I turn the multi-core support off from BIOS 
> and reappears again immediently when I turn it back on. So I believe that 
> this has something to do with threading. Only classes Locale.java and 
> Cur.java seem to be affected. I haven't encountered any exceptions from other 
> classes. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: dev-h...@xmlbeans.apache.org

Reply via email to