Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Failed to compile nifi-opcua-service while 'mvn clean install'

Explorer

Hi All,

I follow the instruction given at https://github.com/hashmapinc/nifi-opcua-bundle and I get stuck in the step 'mvn clean install' due to the error below. May I know anyone have to the issue?

[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /kafkalog12/nifi/opc/nifi-opcua-bundle/nifi-opcua-bundle/nifi-opcua-service/src/main/java/com/hashmapinc/tempus/processors/StandardOPCUAService.java:[320,73] error: incompatible types: byte[] cannot be converted to ByteString [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] nifi-opcua ........................................ SUCCESS [ 0.963 s] [INFO] opc-deploy-local .................................. SUCCESS [ 0.706 s] [INFO] nifi-opcua-bundle ................................. SUCCESS [ 0.032 s] [INFO] nifi-opcua-service-api ............................ SUCCESS [ 0.665 s] [INFO] nifi-opcua-service ................................ FAILURE [ 1.016 s] [INFO] nifi-opcua-bundle-processors ...................... SKIPPED [INFO] nifi-opcua-bundle-nar ............................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.651 s [INFO] Finished at: 2017-11-22T12:38:26+00:00 [INFO] Final Memory: 37M/1579M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project nifi-opcua-service: Compilation failure [ERROR] /kafkalog12/nifi/opc/nifi-opcua-bundle/nifi-opcua-bundle/nifi-opcua-service/src/main/java/com/hashmapinc/tempus/processors/StandardOPCUAService.java:[320,73] error: incompatible types: byte[] cannot be converted to ByteString [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :nifi-opcua-service

3 REPLIES 3

Super Mentor

@SIOKEK YIM

This is a compile time error (a code level error inside class "StandardOPCUAService.java" line 320)

[ERROR] /kafkalog12/nifi/opc/nifi-opcua-bundle/nifi-opcua-bundle/nifi-opcua-service/src/main/java/com/hashmapinc/tempus/processors/StandardOPCUAService.java:[320,73]
 error: incompatible types: byte[] cannot be converted to ByteString 

.

Please check the line 320 of the "StandardOPCUAService.java" and verify if it is changed (OR) it might be possible that you might be building a different version of this git repo which might have a slightly different code for the mentioned line.

Unfortunately in the mentioned git repo link i do not see which exact tag / branch you are building so can not tell exactly where the code might have changed.

Explorer

@Jay Kumar SenSharma

Thanks for replied. I’m using Apache Maven 3.2.1 & Java version: 1.8.0_101. I had changed pom.xml's system path version from opc-ua-stack-1.03.340.0-SNAPSHOT.jar to opc-ua-stack-1.03.342.1-SNAPSHOT.jar due to the OPCFoundation stack verison is /UA-Java/target/opc-ua-stack-1.03.342.1-SNAPSHOT.jar.

Seeing ed3766 posted (URL)

42721-capture.pngBut I think the changes had updated to the git repo and I had try copy & pasted the codes to StandardOPCUAService.java and same error occur.

Either I have to modify the codes or get the owner's answer about this issue but is there any alternative way to add opcua into NiFi as per mentioned here URL ?

Thanks for your support 🙂

New Contributor

I have the same problem as SIOKEK YIM.

Error message:

C:\Users\libertywalk\Downloads\nifi-opcua-bundle_hasmap\nifi-opcua-bundle\nifi-opcua-service\src\main\java\com\hashmapinc\tempus\processors\StandardOPCUAService.java:[320,73] error: incompatible types: byte[] cannot be converted to ByteString <br>

mvn -version output:

Maven home: C:\Users\krennd\apache-maven-3.5.2-bin\apache-maven-3.5.2\bin\..
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_162\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"

OPC Foundation Stack version: I tried it with both

opc-ua-stack-1.03.341.0-SNAPSHOT and opc-ua-stack-1.03.342.1-SNAPSHOT

Repo branch: master

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.