-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: UnsupportedOperationException after long idle time
PostPosted: Mon Sep 20, 2004 2:27 am 
Newbie

Joined: Fri Jan 23, 2004 3:54 am
Posts: 5
Hi i'm useing hibernate version 2 in a webapp runbning in Tomcat on FreeBSD.

After a long idle time of the app. (24 hours) I get
java.lang.UnsupportedOperationException: The user must supply a JDBC connection
java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:262)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3155)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3138)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:699)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:180)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128)
at net.sf.hibernate.loader.Loader.list(Loader.java:918)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:983)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1473)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1452)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1444)


This is triggered by: session.find(hibernatequery); where hibernatequery is a String with a hibernate QL-statement. When the user asks (via the GUI of the webapp) for the info inmediately after the exception is not thrown anymore and it works just fine.

So it seems that after hibernate has some startup-problems. Can anybodey tell me what I must do to keep hibernate 'awake'? Is there a setting that prevents the problem above?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 20, 2004 2:50 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
which pool are you using?

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 20, 2004 3:46 am 
Newbie

Joined: Fri Jan 23, 2004 3:54 am
Posts: 5
Hmm, I'm not quite sure what you mean with 'pool' but:

In my hibernate.properties I've got the following settings:

hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=org.gjt.mm.mysql.Driver
hibernate.connection.url jdbc:mysql://mysql0.lan/lalala
hibernate.connection.username lalalalaName
hibernate.connection.password lalalalaPW
hibernate.connection.pool_size=10
hibernate.statement_cache.size=100
hibernate.show_sql false
hibernate.use_outer_join true
hibernate.connection.autoReconnect true
hibernate.connection.autoReconnectForPools true
hibernate.connection.is-connection-validation-required true

(the lalala's are not really there ;) )

mysql-connector-java-3.0.6-stable-bin.jar is used to connect to the MySQL-database.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.