Several issues jumped out at me, which may not be related to the problem, but should be fixed regardless. (You didn't mention which line the exception occurs in, and which object is null).
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
This should be done once in initialization code, not repeatedly every time the page is shown.
conn.setAutoCommit(false);
For a single insert you do not need to use a transaction. Either the insert succeeds or it fails (in which case you'll get an exception) - no need for a transaction.
if (citycode == "" || citycode == null)
if (usernames == userName)
(multiple occurrences)
You should test for null first, and then perform other tests. Also, strings are compared using the "equals" method, not using "==" (which compares equality of object references, not equality of objects). So this code should read