If you try to executeQuery() on statement e.g.: SELECT MAX(num) FROM nums
And the table "nums" is not exists, the SQLException is thrown in FBConnection - line: 1191 and next command: activeStatements.add(stmt); wont proceed. The problem is, that then the GarbageCollector tries to finalize the uncreated Object and calls method: "void notifyStatementClosed(FBStatement stmt)", which loggs: "log.warn("Specified statement was not created by this connection: " + stmt);" because the uncreated PreparedStatement throws exception before and was not added to the collection: "activeStatements".
Finalization is called when the ancestor constructor of java.lang.Object has ended successfully, refer here: https://stackoverflow.com/questions/14483279/can-finalize-be-called-after-a-constructor-throws-an-exception
Your algorithm simply does not count with the fact that if the exception is throwed in the constructor, the statement will be closed too. (Then the warn appears.)
Thank you for solving :)