Do you use GlassFish's connection pool ? If so, can you provide the
connection pool configuration ?
I also see related bugs in MySQL Driver :
http://bugs.mysql.com/bug.php?id=37645
http://bugs.mysql.com/bug.php?id=38699
http://bugs.mysql.com/bug.php?id=35489
Seems like the bugs are fixed as part of 5.1.6 nightly builds, but you
are using 5.1.7 which ideally should have the fixes. Can you try posting
the query in MySQL forum ?
Thanks,
-Jagadish
On Sat, 2009-02-21 at 14:53 +0200, Elad Mallel wrote:
> Hey everyone,
>
>
>
> I’m using Glassfish v2.1 with Hibernate against a MySQL database on
> Windows XP. I’m using the 5.1.7 version of the MySQL JDBC library.
>
> I’m having trouble performing the simplest task of selecting an object
> from the database.
>
> The exception I get is this:
>
> Caused by: java.lang.IllegalArgumentException: null source
>
> at java.util.EventObject.<init>(EventObject.java:38)
>
> at javax.sql.StatementEvent.<init>(StatementEvent.java:39)
>
> at
> com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
>
> at
> org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:534)
>
> at
> org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:269)
>
> at
> org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:285)
>
> at
> org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
>
> at org.hibernate.loader.Loader.doQuery(Loader.java:726)
>
> at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>
> at org.hibernate.loader.Loader.doList(Loader.java:2220)
>
> at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
>
> at org.hibernate.loader.Loader.list(Loader.java:2099)
>
> at
> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>
> at
> org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
>
> at
> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>
> at
> org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
>
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>
> at
> org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:81)
>
> at
> application.ApplicationManagerBean.createApplicationResponse(ApplicationManagerBean.java:30)
>
> ... 56 more
>
>
>
>
>
> It’s important to mention that if I run the exact same code on
> Glassfish 2ur1, it works perfectly.
>
>
>
> Can anyone tell me what’s up with this? Is this a known issue? When
> will a solution be available?
>
>
>
> Thanks,
>
> Elad.
>
>