FileNotFoundException

ehcacheからでているもの

[ERROR] DiskStore - net.sf.hibernate.cache.StandardQueryCacheCache: Could not create disk store <java.io.FileNotFoundException: /tmp/net.sf.hibernate.cache.StandardQueryCache.data (Permission denied)>java.io.FileNotFoundException: /tmp/net.sf.hibernate.cache.StandardQueryCache.data (Permission denied)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
    at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:144)
    at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:113)


あまり気にしていなかったが、ディスクキャッシュが発生していたらしい。
開発サーバで、テストアプリとビルドとで競合していたのだろうと推測する。


まぁいらないので修正。
ディスクには書き出さないようにしておく。

    <defaultCache
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        />
    <cache name="net.sf.hibernate.cache.StandardQueryCache"
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        />


ところで、この設定が効いているということはehcache.xmlが読み込まれているということなのだが、

[WARN] EhCache - Could not find configuration for hoge.Hoge

だそうな。


Hibernate3系アプリではでていなかったので、2系の問題かもしれないす、とりあえずjdkのVerupと3系への移行で対応したいと提案しておく。