[Persistence, JBoss/CMP, Hibernate, Database] - JBoss LRUCache failure
by sveerpal
Application is hosted on JBoss server and uses Hibernate caching.
i got very strange error and could not launch the application after that, I had to restart the server finally. It was related to prepared statement cache. The error log was
[22-01-2008 13:08:04.150] [67934313] [STDOUT] [INFO ] [TP-Processor9] 22-Jan-2008 13:08.04 ERROR {NDC=} java.lang.IllegalStateException: Attempt to put a new cache entry on a full cache
java.lang.IllegalStateException: Attempt to put a new cache entry on a full cache
at org.jboss.util.LRUCachePolicy$LRUList.promote(LRUCachePolicy.java:304)
at org.jboss.util.LRUCachePolicy.get(LRUCachePolicy.java:128)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:295)
at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:172)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at org.springframework.orm.hibernate3.HibernateTemplate$35.doInHibernate(HibernateTemplate.java:979)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:969)
at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:962)
prepared statement cahce size is configured to be 25 in datasource configurations, is increasing the size solution of this, but as per LRU even if the cache is full new entry should replace the least recently used entry of the cache. Please suggest....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123387#4123387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123387
18 years, 4 months
Embeddable EJB 3.0
by Kent Larsson
Hi all,
I have some problems setting up the JBoss Embeddable EJB 3.0 container
( http://docs.jboss.org/ejb3/embedded/embedded.html ) to use for unit
testing during development. Could someone please tell me exactly what
files i need in my build path? And I assume these files come with the
JBoss download?
I have tried googling and reading the above referenced page, without
any luck. Any help would be greatly appreciated!
And as a side note. What do you think of the embeddable container? Do
you use it for unit testing your session beans?
Thank you for your time reading this post.
Best regards,
Kent
18 years, 4 months