Mark Derricutt <[EMAIL PROTECTED]> writes:
> Hi - the other day I post a message about a problem I was getting with
> using Axis inside an Idea plugin.  Havn't had any response so thought
> I'd try again.

I have no idea what Idea is, so this is a long shot...

> Anyone know what the problem here is?  Any idea why I'd be getting a
> ClassCastException?  Thinking it might be conflict in Xerces between
> what I was using standalone, and what Idea uses in its lib directory,
> I copied its version to my app, but it worked, so I have no idea what
> the problem is, anyone able to help?

> 6 [SendTests] ERROR utils.XMLUtils  - Exception:
> java.lang.ClassCastException
>         at
> javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
>         at org.apache.axis.utils.XMLUtils.getDOMFactory(XMLUtils.java:230)

DocumentBuilderFactory creates an object based on som system
property.  If this doesn't implement the excpected interface, you
might get an error like this.  I would check the configuration for
this.  Which xml-parser are you using, have you done anything to the
configuration?

>From the jaxp-javadoc:
http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/docs/api/

--------------------
Obtain a new instance of a DocumentBuilderFactory. This static method
creates a new factory instance. This method uses the following ordered
lookup procedure to determine the DocumentBuilderFactory
implementation class to load: Use the
javax.xml.parsers.DocumentBuilderFactory system property.

 - Use the properties file "lib/jaxp.properties" in the JRE
   directory. This configuration file is in standard
   java.util.Properties format and contains the fully qualified name
   of the implementation class with the key being the system property
   defined above.

 - Use the Services API (as detailed in the JAR specification), if
   available, to determine the classname. The Services API will look
   for a classname in the file
   META-INF/services/javax.xml.parsers.DocumentBuilderFactory in jars
   available to the runtime.

 - Platform default DocumentBuilderFactory instance.
--------------------


Rolf Rander

-- 
tlf: +47 92820227                            (c) 2002 Rolf Rander N�ss
http://www.pvv.org/~rolfn/

In a world without fences, there's no need for Gates.

Reply via email to