Hi we are using JBoss 4.0, hibernate 3.0, in our application. We are using hibernate second level cache and now we want to use Query Caching in our application. We are using FileCacheLoader for caching. When we try to cache a query, it is giving the following exceptions:
Code:
org.jboss.util.NestedRuntimeException: C:\jboss-4.0.2\server\default\data\org\hibernate\cache\StandardQueryCache.fdb\sql: select deliveryty0_.id as id, deliveryty0_.delivery_type_txt as delivery2_266_ from delivery_type deliveryty0_ where (deliveryty0_.delivery_type_txt='Test' ); parameters: ; named parameters: {}; filters: [FilterKey[securePerson{currentUser=guest}], FilterKey[secureCpaLane{currentUser=guest}]].fdb\data.dat (The filename, directory name, or volume label syntax is incorrect); - nested throwable: (java.io.FileNotFoundException: C:\jboss-4.0.2\server\default\data\org\hibernate\cache\StandardQueryCache.fdb\sql: select deliveryty0_.id as id, deliveryty0_.delivery_type_txt as delivery2_266_ from delivery_type deliveryty0_ where (deliveryty0_.delivery_type_txt='Test' ); parameters: ; named parameters: {}; filters: [FilterKey[securePerson{currentUser=guest}], FilterKey[secureCpaLane{currentUser=guest}]].fdb\data.dat (The filename, directory name, or volume label syntax is incorrect))
12:46:08,102 INFO [STDOUT] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3107)
12:46:08,102 INFO [STDOUT] at org.jboss.cache.TreeCache.put(TreeCache.java:1745)
12:46:08,102 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor234.invoke(Unknown Source)
12:46:08,102 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:46:08,102 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
12:46:08,102 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
12:46:08,102 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
12:46:08,117 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
12:46:08,117 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
12:46:08,117 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
12:46:08,117 INFO [STDOUT] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
12:46:08,117 INFO [STDOUT] at $Proxy48.put(Unknown Source)
12:46:08,117 INFO [STDOUT] at org.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:69)
12:46:08,117 INFO [STDOUT] at org.hibernate.loader.Loader.list(Loader.java:1533)
12:46:08,117 INFO [STDOUT] at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:886)
12:46:08,117 INFO [STDOUT] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:830)
12:46:08,117 INFO [STDOUT] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
12:46:08,195 INFO [STDOUT] Caused by: java.io.FileNotFoundException: C:\jboss-4.0.2\server\default\data\org\hibernate\cache\StandardQueryCache.fdb\sql: select deliveryty0_.id as id, deliveryty0_.delivery_type_txt as delivery2_266_ from delivery_type deliveryty0_ where (deliveryty0_.delivery_type_txt='Test' ); parameters: ; named parameters: {}; filters: [FilterKey[securePerson{currentUser=guest}], FilterKey[secureCpaLane{currentUser=guest}]].fdb\data.dat (The filename, directory name, or volume label syntax is incorrect)
12:46:08,211 INFO [STDOUT] at java.io.FileOutputStream.open(Native Method)
12:46:08,211 INFO [STDOUT] at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
12:46:08,211 INFO [STDOUT] at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
12:46:08,211 INFO [STDOUT] at org.jboss.cache.loader.FileCacheLoader.storeAttributes(FileCacheLoader.java:376)
12:46:08,211 INFO [STDOUT] at org.jboss.cache.loader.FileCacheLoader.put(FileCacheLoader.java:105)
12:46:08,211 INFO [STDOUT] at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:123)
12:46:08,211 INFO [STDOUT] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3102)
I think the problem is that while saving the cache as a file, it is passing the whole SQL query as the key to the file name and so unable to create a file, it is giving FileNotFoundException. Can somebody please help me out here.
Thanks,
Rachna