Unable to connect to pluggable database using TNS but EZCONNECT is OK
The problem is the TNS name which contains a leading whitespace. 

For example:

[Whitespace]ORCLPDB =
  (DESCRIPTION =
...


As we know, the @ in connection string should immediately followed by the TNS name we can't have whitespace in front of a TNS name.