Skip to main content

Problem with Glassfish 2.1, Hibernate and MySQL on Windows XP

1 reply [Last post]
Anonymous

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.(EventObject.java:38)

at javax.sql.StatementEvent.(StatementEvent.java:39)

at
com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4Prepa
redStatementWrapper.java:70)

at
org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.ja
va: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.ja
va: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(ApplicationMana
gerBean.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.

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jagadish Prasath Ramu

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.(EventObject.java:38)
>
> at javax.sql.StatementEvent.(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.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net