Q-: I'm getting a "Namespace not supported by
SAXParser" exception - what's
wrong?
Q-: I'm getting a an error about my stylesheet missing
the xsl:version
attribute - what's wrong?
*Q-: My DOMSource can't be built/transformed - what's
wrong?
A: Make sure you have a namespace-aware parser
configured. Some parsers
support namespaces by default, some you have to ask
for support. Try
adding something like the second line here:
javax.xml.parsers.SAXParserFactory factory =
javax.xml.parsers.SAXParserFactory.newInstance();
factory.setNamespaceAware(true); // Xerces needs
this set
Q:<[EMAIL PROTECTED]>
I am getting an error message that I think is due to a
class conflict
between XALAN & TOMCAT. Running the xalan servlet
example generates an
error:
java.lang.NoSuchMethodError
at
org.apache.xpath.DOM2Helper.getLocalNameOfNode(DOM2Helper.java:326)
...
A: <[EMAIL PROTECTED]>
If using Tomcat < 4.0 then put the Xalan classes in
the tomcat.[bat|sh]
CLASSPATH definition BEFORE xml.jar
*Q: I'm getting an unusual error relating to DOM
classes, SAX classes,
javax.xml.* classes - what's wrong?
NOTE: A number of seemingly odd NoSuchMethod or other
exceptions can be due
to classpath ordering issues. Many products include
their own copies of
the org.w3c.dom.*, org.xml.sax.*, and javax.xml.*
standard packages, some
of which may be outdated or incompatible. Xalan
relies on finding the
versions of these packages either in xalan.jar or
xerces.jar, so a number
of problems can be solved by either putting
xalan.jar/xerces.jar earlier or
first on the CLASSPATH, and by searching your
classpath or extensions
directory for other jars that might include these
standard packages -
especially versions of jaxp.jar, parser.jar, xml.jar,
crimson.jar.
* NOTE-ALSO: Remember, if it works standalone, but
doesn't work in your
[server|servlet|jsp page|etc] then it is most likely a
configuration
problem with your server, and not a Xalan problem.
* NOTE-ALSO: If using any JDK 1.2+ or higher, you must
also check your
/lib/ext or extensions directory for copies of the
above files, since they
are 'magically' included in the beginning of your
classpath. To get rid of
files in your extensions directory, you must delete
them or move them out
of the directory - simply renaming them will *not*
work (maybe: rename the
extension to not be .jar, but I haven't tested this).
Scott Boag added: "Go to the JDK 1.2+'s lib\ext
directory. Remove
crimson.jar, and any other jar
that may have JAXP interfaces. lib\ext is a "magic"
directory that loads
all the jars in there in front of the classpath. So
you don't see them,
and the *only* solution is physical removal.
This whole thing with the lib\ext directory has
generated more email, and
confused users, more than any other issue. Through no
fault of either
Xerces or Xalan, from what I can tell.
Users who are upset about this as I am should write a
note to Sun asking
them to fix the lib\ext mechanism. This is totally
broken."
=====
<eof msg="This is not my regular email account"
humor="This is not Shane's actual brain today" />
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/