I had this problem beginning in FME 2018 32-bit and thought it was related to the JVM memory issue, but I upgraded to 2019.2 and I'm still having a problem connecting to oracle databases intermittently.
Here's one case: I have an sde reader (non-legacy) that is set up using a path to an sde connection file. I go to import a second feature type to the same reader and I get an error:
Unable to connect to Oracle database, because the database environment could not be initialized.
If I manually type the featureclass that I want to add into the dialogue, it actually just loads up, but I can't browse the Table List to pick it.
Another case is in the oracle non-spatial connection that I'm using with a sqlexecutor or sqlcreator. Sometimes I can create and test a sql string just fine; other times I get the same error:
Unable to connect to Oracle database, because the database environment could not be initialized.
If I completely close FME and reopen, sometimes it works again. Sometimes I try rebooting my machine so all various applications that are making oracle connections (ArcMap, ArcGIS Pro, SQL Developer) are completely disconnected.
But I haven't been able to dial in on either an exact set of repro steps or a reliable fix. Anyone have any ideas? Note that under certain circumstances I have to use 32-bit, so a suggestion to just use 64-bit won't work for my situation.