You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Shawn McKinney (JIRA)" <ji...@apache.org> on 2017/09/17 14:57:03 UTC

[jira] [Created] (FC-227) Exclude xml-apis from LDAP api

Shawn McKinney created FC-227:
---------------------------------

             Summary: Exclude xml-apis from LDAP api
                 Key: FC-227
                 URL: https://issues.apache.org/jira/browse/FC-227
             Project: FORTRESS
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: Shawn McKinney
            Assignee: Shawn McKinney
             Fix For: 2.0.1


As reported to dev mailing list need to add an exclusion to xml-apis to fix a classloader problem in tomcat when security manger is enabled.

Here excerpt :

The ldap api has a dependency on xml-apis jar.  I can verify this by running mvn dependency:tree

[INFO] |  |     +- org.apache.directory.api:api-all:jar:1.0.0:compile
[INFO] |  |     |  +- xml-apis:xml-apis:jar:1.0.b2:compile

Which causes trouble when the Fortress Realm is runnning inside tomcat with java security manager enabled.  Here's the exception reported in tomcat logs:

Caused by: javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.SAXParserFactory cannot be found

I can work around it by adding an exclusion to the fortress core's pom file:

   <dependency>
     <groupId>org.apache.directory.api</groupId>
     <artifactId>api-all</artifactId>
     <version>${version.api.all}</version>
     <type>jar</type>
     <exclusions>
       <exclusion>
         <groupId>xml-apis</groupId>
         <artifactId>xml-apis</artifactId>
       </exclusion>
     </exclusions>
   </dependency>

It's worth noting this issue first appeared when running tomcat with -security enabled.  Not sure if others using the api have experienced similar difficulties in Tomcat.  




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)