manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <>
Subject Re: Enable Authority Connections Logging
Date Mon, 01 Dec 2014 15:24:32 GMT
Hi Joel,

A SQL exception winds up throwing a ManifoldCFException in the JDBC
connectors, as follows:

        if (thr instanceof java.sql.SQLException)
          throw new ManifoldCFException("Exception doing connector query
'"+query+"': "+thr.getMessage(),thr);

This is thrown up the stack through the following connector method:

  public AuthorizationResponse getAuthorizationResponse(String userName)
    throws ManifoldCFException

... which should indeed wind up at line 102 as you describe:

                  catch (ManifoldCFException e)
                    if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
                      throw e;
                    Logging.authorityService.warn("Authority error:
                    response =

The logger in question is authorityService, defined as follows:

    authorityService = newLogger("org.apache.manifoldcf.authorityservice");

... which your properties.xml seems to have set to "DEBUG", more than
enough to capture the warning that should be output.

You should *not* be looking in Tomcat's logs, though -- the place to look
is where logging.ini points to.  If it is one of the example directories,
look under "logs" in that directory.  You may also need to look at the
current working directory of the tomcat process, because it might go into
"logs" underneath that, since the path is relative:



On Mon, Dec 1, 2014 at 10:03 AM, Joel Kempista <>

> Hi all,
> I am working with the JDBC Authority Connection and would like to see
> logging when a SQL error occurs, especially syntax errors. I am running
> ManifoldCF through Apache Tomcat 7 but I see no logging posted to the
> ManifoldCF logs directory or Tomcats own logs. I have configured the
> Properties.xml and see logging when I run the start-agents.bat but not from
> the services deployed to tomcat.
> I tried tuning the logging with properties.xml file and setting an
> Authority Connection to a JDBC where the “Authorization Token Query” has a
> sql syntax error. When I curl the mcf-authority-service/UserACLs I receive
> UNAUTHORIZED for the Auth Connector but when I check the logs I don’t see
> why. I expect to see “Authority error: “ + the sql error message but I
> don’t see any errors.
> Properties.xml
> …
>   <property name="org.apache.manifoldcf.db" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.root" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.misc" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.lock" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.cache" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.keystore" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.perf" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.injest" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.api" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.threads" value="DEBUG"/>
>   <property name="" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.hopcount" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.scheduling" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.authorityservice" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.connectors" value="DEBUG"/>
>   <property name="org.apache.manifoldcf.authorityconnectors"
> value="DEBUG"/>
>   <property name="org.apache.manifoldcf.agents" value="DEBUG"/>
> I don’t need all this logging but ended up turning them on for testing.
> Looking at the ManifoldCF it looks like line 102 on
> branch dev_1x should produce the error message.
> My setup is using the multiprocess-file-example with Apache Tomcat 7.
> Anyone know if I am missing a configuration or a setting to enable logging
> when deployed to Tomcat?
> Thanks,
> Joel

View raw message