SQLException: Cannot instantiate a SerialArray with null parameters

Posted on 26-01-2014 14:19 by graham
I have an app that uses JdbcTemplate to perform queries using Postgresql's array_agg function:
getJdbcTemplate().queryForRowSet("SELECT array_agg(name) FROM customer");

The application ran on Tomcat 7 server, Postgres 9.2, Oracle Java 7 on my local computer, and everything worked fine. However, when I deployed it to another machine (Debian 5 Squeeze), I started getting this error while running the array_agg query:
java.sql.SQLException: Cannot instantiate a SerialArray with null parameters

After a lot of research it turned out that my other machine used OpenJDK instead of Oracle's Java. When I changed the default JVM to Oracle's Java 7, the query started working fine.
Comments

 

Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
Email:
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems