Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error with attribute in apache nifi?

avatar
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

avatar
Master 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-...

View solution in original post

2 REPLIES 2

avatar
Master 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-...

avatar
Contributor

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