i think the issue is you are connecting to The container database rather than the pluggable database. You need to connect to the service name associated with that pluggable db. Change you connect string to test/test@pdborcl

which needs to be in your tnsnames. Or you can use an ezconnect syntax.

sqlplus test/test@//localhost:1521/pdborcl ( or something similar)

i posted a similar basic example on my blog which you could follow from start to finish which may help explain.

That is why your thread hints at some of the problems people (and I wasn't picking on you) are going to have when they begin to use 12c.

The bigger issue for the enterprise is what architecture they want to use for handling connections of all types. Some orgs aren't going to want to put PDB names into a TNSNAMES file.

One way around that is to use a thin JDBC connection.

Here is a link to a thread that shows the syntax for using a JDBC thin connection string. Thin connections don't use TNSNAMES but the PDB name still needs to have a listener entry but the PDBs will self-register when they are opened.

What's the JDBC thin connection string format for users defined on a 12c pluggable db rather than the parent container?