You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2017/11/20 13:26:49 UTC

Re: Syncope User Registration in Syncope-2.0.6 - Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl

On 20/11/2017 04:44, Ravindra Singareddy wrote:
>
> Hi All,
>
> I having issue with the User registration in Syncope 2.0.6 using 
> restful api http://localhost:8080/syncope/rest/users?storePassword=true
>
> Receiving following error:
>
> Headers: {connection=[keep-alive], Content-Length=[267], 
> content-type=[application/xml; charset=UTF-8], Date=[Mon, 20 Nov 2017 
> 03:33:44 GMT], Server=[WildFly/10], Vary=[Accept-Encoding], 
> X-Application-Error-Info=[Unknown:ClassNotFoundException: 
> com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl 
> from [Module "deployment.syncope.war:main" from Service Module 
> Loader]], X-Powered-By=[Undertow/1], X-Syncope-Domain=[Master]}
>
> This error is coming from camel running in Wildfly 10.x and which is 
> already explained in 
> https://issues.apache.org/jira/browse/SYNCOPE-738. I have already 
> included syncope-ext-camel-logic-2.0.6.jar file in syncope.war but 
> still getting same error. Here is following camel dependencies added 
>  in the syncope.war file.
>
>   <dependency>
>
> <groupId>org.apache.syncope.ext.camel</groupId>
>
> <artifactId>syncope-ext-camel-rest-cxf</artifactId>
>
> <version>${syncope.version}</version>
>
>         </dependency>
>
>         <dependency>
>
> <groupId>org.apache.syncope.ext.camel</groupId>
>
> <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
>
> <version>${syncope.version}</version>
>
>         </dependency>
>
>               <dependency>
>
> <groupId>org.apache.syncope.ext.camel</groupId>
>
> <artifactId>syncope-ext-camel-logic</artifactId>
>
> <version>${syncope.version}</version>
>
>         </dependency>
>
>         <dependency>
>
> <groupId>org.apache.syncope.ext.camel</groupId>
>
> <artifactId>syncope-ext-camel-provisioning</artifactId>
>
> <version>${syncope.version}</version>
>
>         </dependency>
>
> Any idea, how to resolve this issue?
>

Hi Ravi,
the issue mentioned above (SYNCOPE-738) is related to the Camel 
extension only because the initialization code needs to parse the 
initial routes definition from XML.
This works fine with Wildfly / JBoss.

You are instead getting the same exception because your exchanging XML 
payloads with Syncope REST interface; just set the Accept / Content-Type 
request headers to application/json and all will work fine.

Regards.

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Syncope User Registration in Syncope-2.0.6 - Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl

Posted by Francesco Chicchiriccò <il...@apache.org>.
Nice catch!

I've added it to

https://cwiki.apache.org/confluence/display/SYNCOPE/FAQ#FAQ-WithWildfly10,Igettheerror%22Unknown:ClassNotFoundException:com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl%22

Regards.

On 24/11/2017 06:00, Ravindra Singareddy wrote:
>
> This issue is resolved by adding following entries to 
> wildfly-10.1.0.Final ($JBOSS_HOME/modules/sun/jdk/main/modules.xml)
>
> <path name="com/sun/org/apache/xerces/internal/dom"/>
>
> <path name="com/sun/org/apache/xerces/internal/xni"/>
>
> <path name="com/sun/org/apache/xerces/internal/jaxp"/>
>
> Reference:
>
> https://stackoverflow.com/questions/15684993/class-from-rt-jar-not-found
>
> Thanks
>
> Ravi
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


RE: Syncope User Registration in Syncope-2.0.6 - Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl

Posted by Ravindra Singareddy <si...@hotmail.com>.
This issue is resolved by adding following entries to wildfly-10.1.0.Final  ($JBOSS_HOME/modules/sun/jdk/main/modules.xml)

<path name="com/sun/org/apache/xerces/internal/dom"/>
<path name="com/sun/org/apache/xerces/internal/xni"/>
<path name="com/sun/org/apache/xerces/internal/jaxp"/>

Reference:
https://stackoverflow.com/questions/15684993/class-from-rt-jar-not-found

Thanks

Ravi



RE: Syncope User Registration in Syncope-2.0.6 - Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl

Posted by Ravindra Singareddy <si...@hotmail.com>.
Hi Francesco,
Even after changing content-type to JSON, still getting same error

Response-Code: 500
Encoding: UTF-8
Content-Type: application/json; charset=UTF-8
Headers: {connection=[keep-alive], content-type=[application/json; charset=UTF-8], Date=[Tue, 21 Nov 2017 03:19:18 GMT], Server=[WildFly/10], transfer-encoding=[chunked], Vary=[Accept-Encoding], X-Application-Error-Info=[Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl from [Module "deployment.syncope.war:main" from Service Module Loader]], X-Powered-By=[Undertow/1], X-Syncope-Domain=[Master]}
Payload: {"status":500,"type":"Unknown","elements":["ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl from [Module \"deployment.syncope.war:main\" from Service Module Loader]"]}

I have logged into http://localhost:8080/syncope-console and tried to create the user, still getting same error.

[cid:image003.png@01D3624F.16377CF0]

I am able to validate the user using Syncope rest api but not able to create new user.

Thanks

Ravi

From: Francesco Chicchiriccò<ma...@apache.org>
Sent: Monday, November 20, 2017 8:26 AM
To: user@syncope.apache.org<ma...@syncope.apache.org>
Subject: Re: Syncope User Registration in Syncope-2.0.6 - Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl

On 20/11/2017 04:44, Ravindra Singareddy wrote:
Hi All,
I having issue with the User registration in Syncope 2.0.6 using restful api http://localhost:8080/syncope/rest/users?storePassword=true

Receiving following error:

Headers: {connection=[keep-alive], Content-Length=[267], content-type=[application/xml; charset=UTF-8], Date=[Mon, 20 Nov 2017 03:33:44 GMT], Server=[WildFly/10], Vary=[Accept-Encoding], X-Application-Error-Info=[Unknown:ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl from [Module "deployment.syncope.war:main" from Service Module Loader]], X-Powered-By=[Undertow/1], X-Syncope-Domain=[Master]}

This error is coming from camel running in Wildfly 10.x and which is already explained in https://issues.apache.org/jira/browse/SYNCOPE-738. I have already included syncope-ext-camel-logic-2.0.6.jar file in syncope.war but still getting same error. Here is following camel dependencies added  in the syncope.war file.

  <dependency>
          <groupId>org.apache.syncope.ext.camel</groupId>
          <artifactId>syncope-ext-camel-rest-cxf</artifactId>
          <version>${syncope.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.syncope.ext.camel</groupId>
          <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
          <version>${syncope.version}</version>
        </dependency>
              <dependency>
          <groupId>org.apache.syncope.ext.camel</groupId>
          <artifactId>syncope-ext-camel-logic</artifactId>
          <version>${syncope.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.syncope.ext.camel</groupId>
          <artifactId>syncope-ext-camel-provisioning</artifactId>
          <version>${syncope.version}</version>
        </dependency>


Any idea, how to resolve this issue?

Hi Ravi,
the issue mentioned above (SYNCOPE-738) is related to the Camel extension only because the initialization code needs to parse the initial routes definition from XML.
This works fine with Wildfly / JBoss.

You are instead getting the same exception because your exchanging XML payloads with Syncope REST interface; just set the Accept / Content-Type request headers to application/json and all will work fine.

Regards.

--

Francesco Chicchiriccò



Tirasa - Open Source Excellence

http://www.tirasa.net/



Member at The Apache Software Foundation

Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail

http://home.apache.org/~ilgrosso/