-->
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.  [ 1 post ] 
Author Message
 Post subject: EHCache initialization error
PostPosted: Mon Nov 29, 2004 12:40 pm 
Newbie

Joined: Wed Aug 25, 2004 10:54 am
Posts: 12
Hibernate version:2.1.4

Mapping documents:
Code:
...
<cache usage="read-write" />
...


Full stack trace of any exception that occurs:

Code:
java.lang.NullPointerException
   at net.sf.ehcache.config.Configuration$DefaultCache.access$100(Configuration.java:305)
   at net.sf.ehcache.config.Configuration.getDefaultCache(Configuration.java:128)
   at net.sf.ehcache.CacheManager.configure(CacheManager.java:158)
   at net.sf.ehcache.CacheManager.<init>(CacheManager.java:127)
   at net.sf.ehcache.CacheManager.create(CacheManager.java:179)
   at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:195)
   at net.sf.ehcache.hibernate.Plugin.<init>(Plugin.java:92)
   at net.sf.ehcache.hibernate.Provider.buildCache(Provider.java:89)
   at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1107)
   at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:767)
   at net.buildercom.retriever.hibernate.SessionUtil.<clinit>(SessionUtil.java:27)
   at net.buildercom.retriever.hibernate.User.login(User.java:366)
   at net.buildercom.retriever.hibernate.DataBaseTest.main(DataBaseTest.java:16)


Name and version of the database you are using:
Oracle9i

Debug level Hibernate log excerpt:
...kindly notice the end of log
Code:
18:31:53,460  INFO C3P0ConnectionProvider:48 - C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@62.236.48.134:1521:bcsql01
18:31:53,460  INFO C3P0ConnectionProvider:49 - Connection properties: {user=ra, password=orara}
18:31:53,550  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@a37368 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@6d084b [ acquireIncrement -> 2, autoCommitOnClose -> false, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, idleConnectionTestPeriod -> 3000, initialPoolSize -> 0, maxIdleTime -> 5000, maxPoolSize -> 5, maxStatements -> 100, minPoolSize -> 0, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@edc3a2 [ description -> null, driverClass -> null, factoryClassLocation -> null, jdbcUrl -> jdbc:oracle:thin:@62.236.48.134:1521:bcsql01, properties -> {user=ra, password=orara} ] , propertyCycle -> 300, testConnectionOnCheckout -> true ] , factoryClassLocation -> null, numHelperThreads -> 3 ]
18:31:54,371  INFO SettingsFactory:102 - Use scrollable result sets: true
18:31:54,371  INFO SettingsFactory:105 - Use JDBC3 getGeneratedKeys(): false
18:31:54,371  INFO SettingsFactory:108 - Optimize cache for minimal puts: false
18:31:54,381  INFO SettingsFactory:117 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
18:31:54,381  INFO SettingsFactory:128 - cache provider: net.sf.ehcache.hibernate.Provider
18:31:54,381  INFO Configuration:1093 - instantiating and configuring caches
18:31:54,381 DEBUG Configuration:1104 - instantiating cache hibernate.ra.net.buildercom.retriever.hibernate.Query
18:31:54,381 DEBUG CacheManager:177 - Creating new CacheManager with default config
18:31:54,391 DEBUG CacheManager:151 - Configuring ehcache from classpath.
18:31:54,401 DEBUG Configurator:118 - Configuring ehcache from ehcache.xml found in the classpath: file:/C:/Dokumenty/Projekty/buildercom/hiber/build/ehcache.xml
18:31:54,411 FATAL SessionUtil:42 - Other startup problem:
java.lang.NullPointerException
   at


When cache logging is debug-level:
Code:
18:36:37,078 DEBUG CacheFactory:32 - cache for: net.buildercom.retriever.hibernate.Parameter usage strategy: read-write
18:36:37,208 DEBUG CacheFactory:32 - cache for: net.buildercom.retriever.hibernate.Profile usage strategy: read-write
18:36:37,268 DEBUG CacheFactory:32 - cache for: net.buildercom.retriever.hibernate.Query usage strategy: read-write
18:36:37,338 DEBUG CacheFactory:32 - cache for: net.buildercom.retriever.hibernate.User usage strategy: read-write



I used exactly the same approach as is mentioned in Hibernate and EHCache docs, but I always finish getting this Exception. Do you have any idea what can cause the problem?


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

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.