Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error with attribute in apache nifi?

Solved Go to solution

Error with attribute in apache nifi?

New Contributor

Hello good morning,

I am using the PutTCP processor, and through an attribute I want to update the port number to use.

The problem is I got the error:

java. lang. NumberFormatException: For input string:""

I think the problem is that the attribute comes as a string and what is expected is a number.

So in the putTCP processor, change the port value as follows:

Before: ${port}

After: ${port:toNumber()}

But it still doesn't work.

Can someone please help me with the problem.

Greetings

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error with attribute in apache nifi?

Super Guru
@Lanic

For NiFi version 1.1.0.2.1.1.0-2

Put Tcp processor port property doesn't support for Expression language

45467-puttcp.png

But the issue got fixed in new versions..

NiFi 1.4:-

45469-nifi14.png

Make sure does your NiFi version supports for Expression language for port property or not, if not then you need to hard code the port property value.

Refer to the below Community thread on listen TCP Processor

https://community.hortonworks.com/questions/140765/nifi-expression-language-support-for-port-number-...

2 REPLIES 2

Re: Error with attribute in apache nifi?

Super Guru
@Lanic

For NiFi version 1.1.0.2.1.1.0-2

Put Tcp processor port property doesn't support for Expression language

45467-puttcp.png

But the issue got fixed in new versions..

NiFi 1.4:-

45469-nifi14.png

Make sure does your NiFi version supports for Expression language for port property or not, if not then you need to hard code the port property value.

Refer to the below Community thread on listen TCP Processor

https://community.hortonworks.com/questions/140765/nifi-expression-language-support-for-port-number-...

Re: Error with attribute in apache nifi?

New Contributor

Thank you very much for your help, I didn't consider the expression support.

Don't have an account?
Coming from Hortonworks? Activate your account here