Skip to content

Tag: java

hibernate or oracle support for timelines?

We have a requirement for persisting, using Hibernate, versioned Java objects into an Oracle database such that each version has a valid-from and valid-until timestamp. This is so we can query for objects as-at a specific time. Does Hibernate or Oracle 11g (or anything else) provide anything that would simpli…

URL decoding: UnsupportedEncodingException in Java

What I understand from the documentation is that UnsupportedEncodingException can only be thrown if I specify a wrong encoding as the second parameter to URLDecoder.decode(String, String) method. Is it so? I need to know cases where this exception can be thrown. Basically, I have this code segment in one of m…

opencsv in java ignores backslash in a field value

I am reading a csv file using opencsv. I am ignoring the first line of; the csv file is tab separated with some values enclosed in double quotes. The problem occurs when I read the values of a column that has the ” character, this is stripped out of the value. For example in original file: It becomes as…

Java heap space in a looped function

Hi I have a java application that is processing a number of records from a database. Now after processing about a 160 of these the java runs throws a “OutOfMemoryError: Java heap space”. Due to this I updated the entire function in order to only process 150 records at one go, which works fine when…