Try by removing/exluding (if you have it in you r dependencies) xerces.

On Fri, 2 Dec 2016 at 07:10 Peter Petranik <[email protected]> wrote:

> Hi, I have a same problem after I updated my application from GWT 2.7 to
> 2.8
>
> That is the code that raises the exception:
> DocumentBuilderFactory.newInstance().newDocumentBuilder()
>
> And that is the exception:
> java.lang.ClassCastException:
> org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast
> to org.apache.xerces.xni.parser.XMLParserConfiguration
> at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
> at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
> at
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown
> Source)
> ...
>
> Has somebody already found some solution how to fix that ?
>
> Am Donnerstag, 6. Oktober 2016 09:20:49 UTC+2 schrieb Darren Smith:
>
> Hi,
>
> I am developing a <web-app> that contains within it
>   - a vanilla HttpServlet
>   - a GWT RPC Service implementation (RemoteServiceServlet)
>
> I am currently using [GWT2.8rc1].
>
> Both servlets manipulate XML documents, and hence make calls to the
> following code
> DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance();
> docfactory.setNamespaceAware(true);
>
> DocumentBuilder builder = docfactory.newDocumentBuilder();   // * problem
> here *
>
> When I launch the application in Eclipse, using the embedded
> Jetty container, the vanilla HttpServlet will fail at the line
> DocumentBuilder builder = docfactory.newDocumentBuilder();   // * problem
> here *
>
> The error message is
>   java.lang.ClassCastException:
> org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast
> to org.apache.xerces.xni.parser.XMLParserConfiguration
>
> Having done some research, this exception is typically raised when there
> are several Xerces implementations found on the classpath.
> (I can only see Xerces implementations in gwt-dev and in Eclipse as a
> plugin).
>
>
> For the GWT RPC Service implementation, launched as part of the same
> <web-app>, the XML document processing works fine - i.e. no exception
> raised.
>
> If I comment out in the web.xml file the GWT-RPC servlet defintion, then
> the vanilla HttpServlet will perform the XML document processing without an
> exception.
>
>
> Has anyone encountered similar problems?
>
> Darren Smith.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to