You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Gregory M. Foreman (Jira)" <ji...@apache.org> on 2022/01/03 19:44:00 UTC

[jira] [Commented] (NIFI-9525) RPM build does not produce working Nifi

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

Gregory M. Foreman commented on NIFI-9525:
------------------------------------------

The lib directories differ between the maven build and the rpm package.  The nifi-assembly pom contains a number of include/exclude package statements to assemble the lib directory for the rpm.  I replaced the existing mapping for the lib directory with the entry below and it ran fine:


{code:XML}
<mapping>
 <directory>/opt/nifi/nifi-${project.version}/lib</directory>
 <sources>
   <source>
     <location>${project.build.directory}/nifi-${project.version}-bin/nifi-${project.version}/lib</location>
   </source>
 </sources>
</mapping>
{code}

Is this an option?  Or are the include/exclude approach used for a specific reason?

> RPM build does not produce working Nifi
> ---------------------------------------
>
>                 Key: NIFI-9525
>                 URL: https://issues.apache.org/jira/browse/NIFI-9525
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.15.1
>         Environment: Centos 7
>            Reporter: Gregory M. Foreman
>            Priority: Major
>
> Maven RPM build fails to produce an operational Nifi installation.
>  
> ====
>  
>  
> {code:bash}
> $ mvn -version
> Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
> Maven home: /opt/maven
> Java version: 1.8.0_312, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.el7_9.x86_64/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.10.0-1160.49.1.el7.x86_64", arch: "amd64", family: "unix"
> $ mvn clean install -Prpm -DskipTests
> $ yum localinstall nifi-assembly/target/rpm/nifi-bin/RPMS/noarch/nifi-1.15.1-1.el7.noarch.rpm
> $ /opt/nifi/nifi-1.15.1/bin/nifi.sh start
> nifi.sh: JAVA_HOME not set; results may vary
> Java home: 
> NiFi home: /opt/nifi/nifi-1.15.1
> Bootstrap Config File: /opt/nifi/nifi-1.15.1/conf/bootstrap.conf
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/nifi/security/util/TlsConfiguration
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
> 	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> 	at org.apache.nifi.bootstrap.util.SecureNiFiConfigUtil.configureSecureNiFiProperties(SecureNiFiConfigUtil.java:124)
> 	at org.apache.nifi.bootstrap.RunNiFi.start(RunNiFi.java:1247)
> 	at org.apache.nifi.bootstrap.RunNiFi.main(RunNiFi.java:289)
> Caused by: java.lang.ClassNotFoundException: org.apache.nifi.security.util.TlsConfiguration
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> 	... 15 more
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)