The error is caused by your attempt to register PL/SQL type instead of SQL type. The PL/SQL type name, including package name, has 41 characters (
HZ_CUSTOMER_ACCOUNTS_PUB.account_rec_type). Oracle does not expect you to register PL/SQL type and therefore it only parses the schema name (APPS) out, and expects the rest to be the SQL type name (I'm just guessing here). Identifiers in Oracle (except in Java stored procedures) are limited to 30 characters in length, and the type name you're trying to register is longer than that, but
only because it contains two identifiers instead of the (expected) one.
If you create and register the SQL type, it's name will be limited to 30 characters and this error will not occur, since the package name won't be part of the fully qualified type name.
Admittedly, the error message is a bit misleading, but I've already said you twice it cannot work with package-defined types....