Using Saxon 6.5 in Eclipse 3.4 [message #331127] |
Tue, 26 August 2008 13:01  |
Eclipse User |
|
|
|
Hello,
I want to write an plugin that uses Saxon 6.5 (for historical reasons) to
perform XML transformations.
That for I've includes saxon.jar into my plugin classpath and added the
following VM argument inside my product.configuration file. (RCP App)
-Djavax.xml.transform.TransformerFactory=com.icl.saxon.Trans formerFactoryImpl
When creating the fransformer factory:
TransformerFactory transFact = TransformerFactory.newInstance();
I get a exception:
java.lang.ClassCastException: com.icl.saxon.TransformerFactoryImpl cannot
be cast to javax.xml.transform.TransformerFactory
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
This it good for some point because it tells me that the system tries to
use saxon, but bad for another because it does not work :(
When trying:
TransformerFactoryImpl transFact =
(TransformerFactoryImpl)TransformerFactory.newInstance();
I get the following exception:
java.lang.ClassCastException: com.icl.saxon.TransformerFactoryImpl cannot
be cast to javax.xml.transform.TransformerFactory
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
The 'normal' way is the first approach (TransformerFactory transFact =
TransformerFactory.newInstance();). This one works perfectly fine when
ever not beeing executed inside an eclipse plugin!
Any suggestions regarding this strange behaviour?
Thank,
Jan
This
|
|
|
Re: Using Saxon 6.5 in Eclipse 3.4 [message #331140 is a reply to message #331127] |
Tue, 26 August 2008 15:04   |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Jan Kohnert wrote:
> Hello,
>
> I want to write an plugin that uses Saxon 6.5 (for historical reasons)
> to perform XML transformations. That for I've includes saxon.jar into my
> plugin classpath and added the following VM argument inside my
> product.configuration file. (RCP App)
> -Djavax.xml.transform.TransformerFactory=com.icl.saxon.Trans formerFactoryImpl
>
>
> When creating the fransformer factory:
> TransformerFactory transFact = TransformerFactory.newInstance();
>
> I get a exception:
> java.lang.ClassCastException: com.icl.saxon.TransformerFactoryImpl
> cannot be cast to javax.xml.transform.TransformerFactory
> at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
>
> This it good for some point because it tells me that the system tries to
> use saxon, but bad for another because it does not work :(
>
> When trying:
> TransformerFactoryImpl transFact =
> (TransformerFactoryImpl)TransformerFactory.newInstance();
>
> I get the following exception:
> java.lang.ClassCastException: com.icl.saxon.TransformerFactoryImpl
> cannot be cast to javax.xml.transform.TransformerFactory
> at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
>
> The 'normal' way is the first approach (TransformerFactory transFact =
> TransformerFactory.newInstance();). This one works perfectly fine when
> ever not beeing executed inside an eclipse plugin!
> Any suggestions regarding this strange behaviour?
>
> Thank,
> Jan
>
>
> This
Have you tried using a fully qualified name for TransformerFactory? It
looks like it is picking up a class of the same name from a different
package.
--
Derek
|
|
|
|
Powered by
FUDForum. Page generated in 0.03983 seconds