No problem, so many people ask about arbitrary length strings, I'm used to that being the reason.
Can you post your Oracle code? I'd like to see exactly what you're trying to do. Chances are if the regular API didn't work and the Oracle-specific code did, you're likely to be unable to find a better solution. One thing I will say is that having a Java application that is truly portable to any database is nearly impossible, especially in JDBC. While Object-Relational mapping tools can shield you from a lot, its non-trivial to have an application whose SQL text is fully portable. In your example, someone would have to re-write the stored procedure for a different database which having done, is not easy.
I don't like database-specific extensions either to be honest, but if it makes your code work and you don't have any actual plans to switch databases, they can be overlooked. The best advice I can say is isolate such issues so that you know where they are, such as putting them in a single class and/or using a interface/factory
pattern so you could swap a new class in for a different database down the road without affecting the rest of the application.