[JBossCache] - Re: Query cache and long query strings
by klaus_erber
Ok sorry, I forgot some informations about the environment:
JBoss-4.0.5.GA ejb3-install (ejb3, Hibernate-3.2.0.GA, JBossCache 1.4.0.SP1)
The persisitence unit:
| <persistence>
|
| <persistence-unit name="pistats">
| <jta-data-source>java:/pistats-ds</jta-data-source>
| <properties>
| <property name="hibernate.dialect"
| value="org.hibernate.dialect.DerbyDialect" />
| <property name="hibernate.hbm2ddl.auto" value="none" />
| <property name="hibernate.generate_statistics" value="true" />
| <property name="hibernate.cache.use_structured_entries" value="false" />
| <property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
|
| <property name="hibernate.treecache.mbean.object_name" value="pistats.db:service=StockEntityCache"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| </properties>
|
| </persistence-unit>
|
| </persistence>
|
Cache config:
| <mbean code="org.jboss.cache.TreeCache"
| name="pistats.db:service=StockEntityCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <attribute name="TransactionManagerLookupClass">
| org.jboss.cache.JBossTransactionManagerLookup
| </attribute>
|
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
|
| <attribute name="CacheMode">LOCAL</attribute>
|
| <attribute name="LockAcquisitionTimeout">30000</attribute>
|
| <attribute name="EvictionPolicyClass">
| org.jboss.cache.eviction.LRUPolicy
| </attribute>
|
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <region name="/_default_"
| policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="maxNodes">1000</attribute>
| <attribute name="timeToLiveSeconds">1800</attribute>
| <attribute name="maxAgeSeconds">3600</attribute>
| </region>
| <region name="/stockdata"
| policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="maxNodes">10000</attribute>
| <attribute name="timeToLiveSeconds">3600</attribute>
| <attribute name="maxAgeSeconds">3600</attribute>
| </region>
| </config>
| </attribute>
|
| </mbean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982391#3982391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982391
19Â years, 6Â months
[JBossCache] - Query cache and long query strings
by klaus_erber
Hello,
we have a problem with to cache queries with long query strings. I normal cache entry looks like this (output from printDetails()):
| /sql: select zoneaggreg0_.zone as zone34_, zoneaggreg0_.site as site34_, zoneaggreg0_.intervalstart as interval3_34_, zoneaggreg0_.entId as entId34_, zoneaggreg0_.intervalType as interval5_34_, zoneaggreg0_.version as version34_, zoneaggreg0_.anzahl as anzahl34_, zoneaggreg0_.intervallaenge as interval8_34_ from stat_zone_aggregate zoneaggreg0_ where zoneaggreg0_.zone=? and zoneaggreg0_.site=? and zoneaggreg0_.entId=?; parameters: ; named parameters: {3=2, 2=2, 1=0}
| item: [11623924548, [Ljava.lang.Object;@1481b9a, [Ljava.lang.Object;@10c2a7a, [Ljava.lang.Object;@1b8e577, [Ljava.lang.Object;@1e0f6df, [Ljava.lang.Object;@6fd685, ...
|
On longer queries, we get following output:
| /sql: select zoneaggreg0_.zone as zone34_, zoneaggreg0_.site as site34_, zoneaggreg0_.intervalstart as interval3_34_, zoneaggreg0_.entId as entId34_, zoneaggreg0_.intervalType as interval5_34_, zoneaggreg0_.version as version34_, zoneaggreg0_.anzahl as anzahl34_, zoneaggreg0_.intervallaenge as interval8_34_ from stat_zone_aggregate zoneaggreg0_ where zoneaggreg0_.zone=? and zoneaggreg0_.site=? and zoneaggreg0_.entId=? and zoneaggreg0_.intervalType=? and zoneaggreg0_.intervalstart>=? and zoneaggreg0_.intervalstart=? and zoneaggreg0_.intervalstart
|
The cache key seems to be cut off. This is not a display problem. We get no cache hits on such a query.
Is this a Bug? Or a wrong way to use it?
regards
Klaus Erber
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982387#3982387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982387
19Â years, 6Â months
[EJB 3.0] - Possible JBoss / JDK6 bug
by alexg79
I'm using JBoss 4.0.5.
When calling a method on a stateless bean I get:
java.lang.reflect.UndeclaredThrowableException
at $Proxy1.getList(Unknown Source)
...
Caused by: java.lang.ClassNotFoundException: [Ljava.lang.Object;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
...
The code that causes this:
getHandler().getList(searchCriteria);
getHandler() does a JNDI lookup and returns a remote proxy object.
searchCriteria is of the type List.
The way I see it, the JBoss remoting class loader is trying to load the class for an array, which of course fails. Strangely enough, this problem only occurs with JDK 6.0beta2, and not JDK 5. This definetely looks like a bug, but is it a JDK bug or a JBoss bug? Any thoughts?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982383#3982383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982383
19Â years, 6Â months