[ 
https://issues.apache.org/jira/browse/NIFI-12213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774243#comment-17774243
 ] 

David Handermann commented on NIFI-12213:
-----------------------------------------

Thanks [~mosermw], the pull request looks good and I will plan on merging 
pending successful builds.

The {{nifi-standard-services-api-nar}} bundles {{{}nifi-utils{}}}, so most 
modules had it in the class path at runtime, but a few don't as you found. 
Those two modules were an oversight on my part with the restructuring. Some 
modules had direct dependencies on nifi-utils, others had transitive 
dependencies. The transitive dependencies worked when nifi-utils had the 
default {{compile}} scope, but with the addition of the {{{}nifi-bom{}}}, it is 
now necessary to declare {{nifi-utils}} explicitly. This should be better going 
forward, as it surfaces direct dependencies versus relying on implicit 
relationships.

Thanks again for the quick turnaround!

> Since nifi-bom was introduced, using LdapUserGroupProvider causes NiFi to 
> fail to start
> ---------------------------------------------------------------------------------------
>
>                 Key: NIFI-12213
>                 URL: https://issues.apache.org/jira/browse/NIFI-12213
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Michael W Moser
>            Assignee: Michael W Moser
>            Priority: Major
>             Fix For: 2.latest
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I built the main branch and tried to use the LdapUserGroupProvider in 
> authorizers.xml.  I get a ClassNotFoundException looking for FormatUtils in 
> nifi-utils.jar.  The nifi-bom marks nifi-utils as provided by 
> nifi-standard-services-api-nar but nifi-ldap-iaa-providers-nar doesn't depend 
> on nifi-standard-services-api-nar.
> {noformat}
> Caused by: java.lang.NoClassDefFoundError: org/apache/nifi/util/FormatUtils
>     at 
> org.apache.nifi.ldap.tenants.LdapUserGroupProvider.setTimeout(LdapUserGroupProvider.java:824)
>     at 
> org.apache.nifi.ldap.tenants.LdapUserGroupProvider.onConfigured(LdapUserGroupProvider.java:166)
>     at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:580)
>     at 
> org.apache.nifi.authorization.UserGroupProviderInvocationHandler.invoke(UserGroupProviderInvocationHandler.java:38)
>     at jdk.proxy5/jdk.proxy5.$Proxy59.onConfigured(Unknown Source)
>     at 
> org.apache.nifi.authorization.AuthorizerFactoryBean.loadProviderProperties(AuthorizerFactoryBean.java:198)
>     at 
> org.apache.nifi.authorization.AuthorizerFactoryBean.getObject(AuthorizerFactoryBean.java:167)
>     at 
> org.apache.nifi.authorization.AuthorizerFactoryBean.getObject(AuthorizerFactoryBean.java:71)
>     at 
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
>     ... 106 common frames omitted
> Caused by: java.lang.ClassNotFoundException: org.apache.nifi.util.FormatUtils
>     at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
>     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
>     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
>     ... 116 common frames omitted
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to