You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Guoliang Cao <ca...@ispsoft.com> on 2001/05/18 16:27:12 UTC

A long time bug.

I've been getting this error for a long time since I use xalan in EJB.  
The line caused this here is
n = (XPathAPI.selectSingleNode(doc, xpath));
But that doesn't mean only this class or method is throwing the error. 
The problem always exists in
"if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))".

And the weird thing is this only happens to EJB (perhaps only to 
Weblogic, I can't say this because I don't have a chance to try other 
app servers).



//  Exception stack:

java.rmi.RemoteException: EJB Exception: ; nested exception is:
       java.lang.AbstractMethodError
java.lang.AbstractMethodError
       at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
       at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
       at 
org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
       at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
       at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)


//   corresponding code in AxesWalker.java :

  /**
  * Get the next node in document order on the axes.
  *
  * @return the next node in document order on the axes, or null.
  */
  protected Node getNextNode()
  {

   if (m_isFresh)
     m_isFresh = false;

   Node current = this.getCurrentNode();

   if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))     <--- 1051


Re: A long time bug.

Posted by Gary L Peskin <ga...@firstech.com>.
Hmmm.  I'm somewhat at a loss here.  Are you building the input DOM
yourself or are you supplying a Stream to Xalan.  Where does the input
XML come from?  Can you show us your java code that invokes
XPathAPI.selectSingleNode(..)?

Gary


Guoliang Cao wrote:
> 
> I added that line to check environments. But it shows the classpath is
> correct. Here is the output:
> 
> Checking environment...
> #---- BEGIN writeEnvironmentReport($Revision: 1.3 $): Useful properties
> found: ----
> java.version=1.3.0
> #---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
> xerces.jar.apparent.version=xerces.jar potential-ERROR
> present-unknown-version
> xerces.jar.path=C:\upx\manager\core\lib\xerces.jar
> xalan.jar.apparent.version=xalan.jar potential-ERROR present-unknown-version
> xalan.jar.path=C:\upx\manager\core\lib\xalan.jar
> #----- END Listing XML-related jars in: foundclasses.java.class.path -----
> version.JAXP=1.1
> java.ext.dirs=c:\jdk1.3\jre\lib\ext
> version.crimson=not-present
> java.class.path=\upx\manager\core\conf;\upx\manager\core\lib\xerces.jar;\upx\manager\core\lib\xalan.
> jar;\upx\manager\core\lib\j2ee.jar;\bea\wlserver6.0\lib\weblogic_sp.jar;\bea\wlserver6.0\lib\weblogi
> c.jar;\bea\wlserver6.0\lib\ejb20.jar;\upx\manager\core\lib\log.jar;\upx\manager\core\lib\ldap.jar;\b
> ea\wlserver6.0\config\mydomain\serverclasses;\bea\wlserver6.0\config\mydomain\applications\upx-core-
> ejb.jar;\bea\wlserver6.0;\upx\manager\core\lib\flux.jar;\upx\manager\core\lib\classes12.zip;
> version.xerces=Xerces 1.3.1
> sun.boot.class.path=c:\jdk1.3\jre\lib\rt.jar;c:\jdk1.3\jre\lib\i18n.jar;c:\jdk1.3\jre\lib\sunrsasign
> .jar;c:\jdk1.3\jre\classes
> version.DOM.draftlevel=2.0fd
> version.xalan2=Xalan;Java;2.1.0;
> version.DOM=2.0
> version.xalan1=not-present
> #----- END writeEnvironmentReport: Useful properties found: -----
> # YAHOO! Your environment seems to be OK.
> 
>   java.rmi.RemoteException: EJB Exception: ; nested exception is:
>        java.lang.AbstractMethodError
> java.lang.AbstractMethodError
>        at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
>        at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
>        at
> org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
>        at ............
> 
> ps: xalan.jar and xerces.jar are compiled from the latest source.
> 
> > This is caused by having an older version of the DOM classes in your
> > classpath ahead of xerces.jar.  To see the classpath in effect when the
> > EJB is running insert a call to EnvironmentCheck
> > (http://xml.apache.org/websrc/cvsweb.cgi/~checkout~/xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java?rev=1.3)
> >
> > like this:
> >
> >   boolean environmentOK = (new
> > EnvironmentCheck()).checkEnvironment(yourPrintWriter);
> >
> > Be sure to insert the call immediately before the transform.  This will
> > show you your classpath and you should be able to identify the older
> > version of the DOM classes that are causing this problem.
> >
> > HTH,
> > Gary
> >
> >
> > Guoliang Cao wrote:
> >
> >> I've been getting this error for a long time since I use xalan in EJB.
> >> The line caused this here is
> >> n = (XPathAPI.selectSingleNode(doc, xpath));
> >> But that doesn't mean only this class or method is throwing the error.
> >> The problem always exists in
> >> "if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))".
> >>
> >> And the weird thing is this only happens to EJB (perhaps only to
> >> Weblogic, I can't say this because I don't have a chance to try other
> >> app servers).
> >>
> >> //  Exception stack:
> >>
> >> java.rmi.RemoteException: EJB Exception: ; nested exception is:
> >>        java.lang.AbstractMethodError
> >> java.lang.AbstractMethodError
> >>        at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
> >>        at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
> >>        at
> >> org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
> >>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
> >>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
> >>
> >> //   corresponding code in AxesWalker.java :
> >>
> >>   /**
> >>   * Get the next node in document order on the axes.
> >>   *
> >>   * @return the next node in document order on the axes, or null.
> >>   */
> >>   protected Node getNextNode()
> >>   {
> >>
> >>    if (m_isFresh)
> >>      m_isFresh = false;
> >>
> >>    Node current = this.getCurrentNode();
> >>
> >>    if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))     <--- 1051
> >

Re: A long time bug.

Posted by Guoliang Cao <ca...@ispsoft.com>.
I added that line to check environments. But it shows the classpath is 
correct. Here is the output:

Checking environment...
#---- BEGIN writeEnvironmentReport($Revision: 1.3 $): Useful properties 
found: ----
java.version=1.3.0
#---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
xerces.jar.apparent.version=xerces.jar potential-ERROR 
present-unknown-version
xerces.jar.path=C:\upx\manager\core\lib\xerces.jar
xalan.jar.apparent.version=xalan.jar potential-ERROR present-unknown-version
xalan.jar.path=C:\upx\manager\core\lib\xalan.jar
#----- END Listing XML-related jars in: foundclasses.java.class.path -----
version.JAXP=1.1
java.ext.dirs=c:\jdk1.3\jre\lib\ext
version.crimson=not-present
java.class.path=\upx\manager\core\conf;\upx\manager\core\lib\xerces.jar;\upx\manager\core\lib\xalan.
jar;\upx\manager\core\lib\j2ee.jar;\bea\wlserver6.0\lib\weblogic_sp.jar;\bea\wlserver6.0\lib\weblogi
c.jar;\bea\wlserver6.0\lib\ejb20.jar;\upx\manager\core\lib\log.jar;\upx\manager\core\lib\ldap.jar;\b
ea\wlserver6.0\config\mydomain\serverclasses;\bea\wlserver6.0\config\mydomain\applications\upx-core-
ejb.jar;\bea\wlserver6.0;\upx\manager\core\lib\flux.jar;\upx\manager\core\lib\classes12.zip;
version.xerces=Xerces 1.3.1
sun.boot.class.path=c:\jdk1.3\jre\lib\rt.jar;c:\jdk1.3\jre\lib\i18n.jar;c:\jdk1.3\jre\lib\sunrsasign
.jar;c:\jdk1.3\jre\classes
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;2.1.0;
version.DOM=2.0
version.xalan1=not-present
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.


  java.rmi.RemoteException: EJB Exception: ; nested exception is:
       java.lang.AbstractMethodError
java.lang.AbstractMethodError
       at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
       at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
       at 
org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
       at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
       at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
       at ............


ps: xalan.jar and xerces.jar are compiled from the latest source. 


> This is caused by having an older version of the DOM classes in your
> classpath ahead of xerces.jar.  To see the classpath in effect when the
> EJB is running insert a call to EnvironmentCheck
> (http://xml.apache.org/websrc/cvsweb.cgi/~checkout~/xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java?rev=1.3)
> 
> like this:
> 
>   boolean environmentOK = (new
> EnvironmentCheck()).checkEnvironment(yourPrintWriter);
> 
> Be sure to insert the call immediately before the transform.  This will
> show you your classpath and you should be able to identify the older
> version of the DOM classes that are causing this problem.
> 
> HTH,
> Gary
>  
> 
> Guoliang Cao wrote:
> 
>> I've been getting this error for a long time since I use xalan in EJB.
>> The line caused this here is
>> n = (XPathAPI.selectSingleNode(doc, xpath));
>> But that doesn't mean only this class or method is throwing the error.
>> The problem always exists in
>> "if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))".
>> 
>> And the weird thing is this only happens to EJB (perhaps only to
>> Weblogic, I can't say this because I don't have a chance to try other
>> app servers).
>> 
>> //  Exception stack:
>> 
>> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>>        java.lang.AbstractMethodError
>> java.lang.AbstractMethodError
>>        at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
>>        at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
>>        at
>> org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
>>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
>>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
>> 
>> //   corresponding code in AxesWalker.java :
>> 
>>   /**
>>   * Get the next node in document order on the axes.
>>   *
>>   * @return the next node in document order on the axes, or null.
>>   */
>>   protected Node getNextNode()
>>   {
>> 
>>    if (m_isFresh)
>>      m_isFresh = false;
>> 
>>    Node current = this.getCurrentNode();
>> 
>>    if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))     <--- 1051
> 


Re: A long time bug.

Posted by Gary L Peskin <ga...@firstech.com>.
This is caused by having an older version of the DOM classes in your
classpath ahead of xerces.jar.  To see the classpath in effect when the
EJB is running insert a call to EnvironmentCheck
(http://xml.apache.org/websrc/cvsweb.cgi/~checkout~/xml-xalan/java/src/org/apache/xalan/xslt/EnvironmentCheck.java?rev=1.3)

like this:

  boolean environmentOK = (new
EnvironmentCheck()).checkEnvironment(yourPrintWriter);

Be sure to insert the call immediately before the transform.  This will
show you your classpath and you should be able to identify the older
version of the DOM classes that are causing this problem.

HTH,
Gary
 

Guoliang Cao wrote:
> 
> I've been getting this error for a long time since I use xalan in EJB.
> The line caused this here is
> n = (XPathAPI.selectSingleNode(doc, xpath));
> But that doesn't mean only this class or method is throwing the error.
> The problem always exists in
> "if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))".
> 
> And the weird thing is this only happens to EJB (perhaps only to
> Weblogic, I can't say this because I don't have a chance to try other
> app servers).
> 
> //  Exception stack:
> 
> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>        java.lang.AbstractMethodError
> java.lang.AbstractMethodError
>        at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:1051)
>        at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:1137)
>        at
> org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)
>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:123)
>        at org.apache.xpath.XPathAPI.selectSingleNode(XPathAPI.java:100)
> 
> //   corresponding code in AxesWalker.java :
> 
>   /**
>   * Get the next node in document order on the axes.
>   *
>   * @return the next node in document order on the axes, or null.
>   */
>   protected Node getNextNode()
>   {
> 
>    if (m_isFresh)
>      m_isFresh = false;
> 
>    Node current = this.getCurrentNode();
> 
>    if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))     <--- 1051