[jira] Created: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

View: New views
5 Messages — Rating Filter:   Alert me  

[jira] Created: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler
-----------------------------------------------------------------------------------------------------

                 Key: JAXEN-199
                 URL: http://jira.codehaus.org/browse/JAXEN-199
             Project: jaxen
          Issue Type: Bug
          Components: saxpath
    Affects Versions: 1.1
         Environment: Windows
            Reporter: Agnes Freese
             Fix For: 1.1


Following exception occurs intermittently:

Uncaught exception
java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler does not
implement the requested interface org.jaxen.saxpath.XPathHandler
        at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
 
The line is:

        getXPathHandler().startXPath();
in XPathReader.parse.

We have debugged a similar error in other code previously.  The error is caused by the throws clauses not matching between the implementation and the interface (JaxenHandler implementing XPathHandler).  In the particular call the startXPath method is defined by the interface to throw a SAXPathException and the implementation throws no exception.  It appears all of the methods in JaxenHandler are inconsistent either throwing nothing or throwing a JaxenException.
Even though this is an intermittant issue it should be corrected.  Once it appears there seems to be a tendency for the user to see it many times over.  The user has to restart their application before they can resume what they are working on.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JAXEN-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166227#action_166227 ]

Brian Ewins commented on JAXEN-199:
-----------------------------------

That exception isn't caused by what you describe. If it was, you'd see it all the time - its very common to have code like this. For example, look at ByteArrayInputStream's read methods versus the ones in InputStream. You might /appear/ to resolve the situation by adding the throws clause and recompiling, but more likely it was just the act of a fresh compile that fixed the bug.

The exception is caused by loading incompatible versions of a class; in other words, a different version of jaxen, or one compiled with a different version of javac. You don't describe the specific environment in which you saw this problem, but I'm 99% certain you're looking at an appserver which has more than one copy of jaxen (or saxpath) sitting around, and some lack of isolation in your classloaders is causing your grief.

A common cause of this exception (for all kinds of code) used to be the work directory in tomcat needing cleaned out.

> IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JAXEN-199
>                 URL: http://jira.codehaus.org/browse/JAXEN-199
>             Project: jaxen
>          Issue Type: Bug
>          Components: saxpath
>    Affects Versions: 1.1
>         Environment: Windows
>            Reporter: Agnes Freese
>             Fix For: 1.1
>
>
> Following exception occurs intermittently:
> Uncaught exception
> java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler does not
> implement the requested interface org.jaxen.saxpath.XPathHandler
>         at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
>  
> The line is:
>         getXPathHandler().startXPath();
> in XPathReader.parse.
> We have debugged a similar error in other code previously.  The error is caused by the throws clauses not matching between the implementation and the interface (JaxenHandler implementing XPathHandler).  In the particular call the startXPath method is defined by the interface to throw a SAXPathException and the implementation throws no exception.  It appears all of the methods in JaxenHandler are inconsistent either throwing nothing or throwing a JaxenException.
> Even though this is an intermittant issue it should be corrected.  Once it appears there seems to be a tendency for the user to see it many times over.  The user has to restart their application before they can resume what they are working on.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JAXEN-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166273#action_166273 ]

Agnes Freese commented on JAXEN-199:
------------------------------------

We are absolutely, positively, 100% sure that this is the cause of the problem.  There is only one jaxen library in the classpath.  

We have debugged the same problem within our internal code and once the throws clauses were fixed that issue has not been seen in over a year.  This is the reason for the exception.

It may be that people have been coding in this way and it works..  most of the time.  But there appears to be some problem that comes up intermittently when the interface throws clause does not match the implementation.  It took us a long time to track the issue we had in our code down.

If it is not fixed within the jaxen code we will have to fix it externally.  It absolutely is the probem.

> IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JAXEN-199
>                 URL: http://jira.codehaus.org/browse/JAXEN-199
>             Project: jaxen
>          Issue Type: Bug
>          Components: saxpath
>    Affects Versions: 1.1
>         Environment: Windows
>            Reporter: Agnes Freese
>             Fix For: 1.1
>
>
> Following exception occurs intermittently:
> Uncaught exception
> java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler does not
> implement the requested interface org.jaxen.saxpath.XPathHandler
>         at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
>  
> The line is:
>         getXPathHandler().startXPath();
> in XPathReader.parse.
> We have debugged a similar error in other code previously.  The error is caused by the throws clauses not matching between the implementation and the interface (JaxenHandler implementing XPathHandler).  In the particular call the startXPath method is defined by the interface to throw a SAXPathException and the implementation throws no exception.  It appears all of the methods in JaxenHandler are inconsistent either throwing nothing or throwing a JaxenException.
> Even though this is an intermittant issue it should be corrected.  Once it appears there seems to be a tendency for the user to see it many times over.  The user has to restart their application before they can resume what they are working on.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JAXEN-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166284#action_166284 ]

Brian Ewins commented on JAXEN-199:
-----------------------------------

I'm not convinced. That throws clause was removed after the tag V11_BETA_8. You will get this exception if you have a version of jaxen from before that tag with the current jaxen.

Note that jaxen may not simply be called jaxen-VERSION.jar. Other xml libraries bundle jaxen /in their jar/. IIRC this has been the case in the past for dom4j and maybe xom (Elliotte, can you remember the details of this one?). I know that around the time of that tag, dom4j were discussing unbundling jaxen, which makes me suspicious that that is the culprit.

> IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JAXEN-199
>                 URL: http://jira.codehaus.org/browse/JAXEN-199
>             Project: jaxen
>          Issue Type: Bug
>          Components: saxpath
>    Affects Versions: 1.1
>         Environment: Windows
>            Reporter: Agnes Freese
>             Fix For: 1.1
>
>
> Following exception occurs intermittently:
> Uncaught exception
> java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler does not
> implement the requested interface org.jaxen.saxpath.XPathHandler
>         at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
>  
> The line is:
>         getXPathHandler().startXPath();
> in XPathReader.parse.
> We have debugged a similar error in other code previously.  The error is caused by the throws clauses not matching between the implementation and the interface (JaxenHandler implementing XPathHandler).  In the particular call the startXPath method is defined by the interface to throw a SAXPathException and the implementation throws no exception.  It appears all of the methods in JaxenHandler are inconsistent either throwing nothing or throwing a JaxenException.
> Even though this is an intermittant issue it should be corrected.  Once it appears there seems to be a tendency for the user to see it many times over.  The user has to restart their application before they can resume what they are working on.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[jira] Commented: (JAXEN-199) IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/JAXEN-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=166388#action_166388 ]

Brian Ewins commented on JAXEN-199:
-----------------------------------

A couple more suspects: findjar.com suggests that jaxen has been bundled in the pxe and groovy-soap projects as well.

> IncompatibleClassChangeError due to throws clauses not matching between JaxenHandler and XPathHandler
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JAXEN-199
>                 URL: http://jira.codehaus.org/browse/JAXEN-199
>             Project: jaxen
>          Issue Type: Bug
>          Components: saxpath
>    Affects Versions: 1.1
>         Environment: Windows
>            Reporter: Agnes Freese
>             Fix For: 1.1
>
>
> Following exception occurs intermittently:
> Uncaught exception
> java.lang.IncompatibleClassChangeError: Class org.jaxen.JaxenHandler does not
> implement the requested interface org.jaxen.saxpath.XPathHandler
>         at org.jaxen.saxpath.base.XPathReader.parse(XPathReader.java:98)
>  
> The line is:
>         getXPathHandler().startXPath();
> in XPathReader.parse.
> We have debugged a similar error in other code previously.  The error is caused by the throws clauses not matching between the implementation and the interface (JaxenHandler implementing XPathHandler).  In the particular call the startXPath method is defined by the interface to throw a SAXPathException and the implementation throws no exception.  It appears all of the methods in JaxenHandler are inconsistent either throwing nothing or throwing a JaxenException.
> Even though this is an intermittant issue it should be corrected.  Once it appears there seems to be a tendency for the user to see it many times over.  The user has to restart their application before they can resume what they are working on.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email