facebook

[Closed] Unable to open (and run) an HQL Query Editor

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #273092 Reply

    md_luce
    Member

    I have a project that has Hibernate capabilities added to it. However, when I open the HQL Editor I get the following dialog box:

    
    A session factory for this configuration could not be built, dynamic query translation will be unavailable.  Queries cannot be executed.
    
    Reason:
      Could not instantiate cache implementation
    
    

    Being able to run and test HQL directly from eclipse would be a huge productivity increase. Any help will be greatly appreciated. And here is the stack trace in the log file:

    
    !ENTRY com.genuitec.org.hibernate.eclipse.console 4 4 2007-07-24 09:46:09.595
    !MESSAGE Could not instantiate cache implementation
    !SUBENTRY 1 com.genuitec.org.hibernate.eclipse.console 4 150 2007-07-24 09:46:09.595
    !MESSAGE org.hibernate.HibernateException: Could not instantiate cache implementation
    !STACK 0
    org.hibernate.HibernateException: Could not instantiate cache implementation
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
        at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:287)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
        at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:282)
        at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildSessionFactory(MEConsoleConfiguration.java:211)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction.buildSessionFactory(MERefreshCCAction.java:121)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:103)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
        at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
        ... 10 more
    !SUBENTRY 2 com.genuitec.org.hibernate.eclipse.console 4 150 2007-07-24 09:46:09.595
    !MESSAGE org.hibernate.HibernateException: Could not instantiate cache implementation
    !STACK 0
    org.hibernate.HibernateException: Could not instantiate cache implementation
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
        at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:287)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
        at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:282)
        at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildSessionFactory(MEConsoleConfiguration.java:211)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction.buildSessionFactory(MERefreshCCAction.java:121)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:103)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
        at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
        ... 10 more
    !SUBENTRY 2 com.genuitec.org.hibernate.eclipse.console 4 150 2007-07-24 09:46:09.595
    !MESSAGE org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
    !STACK 0
    org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
        at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
        at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:287)
        at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
        at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89)
        at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:282)
        at com.genuitec.eclipse.hibernate.wizards.MEConsoleConfiguration.buildSessionFactory(MEConsoleConfiguration.java:211)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction.buildSessionFactory(MERefreshCCAction.java:121)
        at com.genuitec.eclipse.hibernate.action.MERefreshCCAction$1.run(MERefreshCCAction.java:103)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
    
    !ENTRY com.genuitec.org.hibernate.eclipse.console 1 0 2007-07-24 09:46:09.595
    !MESSAGE Could not refresh Hibernate project context com.genuitec.eclipse.hibernate.action.MERefreshCCAction$InProgressException
    
    #273108 Reply

    Loyal Water
    Member

    I did some research about this issue on google and it seems like this is a hibernate issue. Can you go through this post:-
    http://www.len.ro/work/articles/jboss/jbpm-hibernate-cache

    #273110 Reply

    md_luce
    Member

    That did it. I just needed to explicitly specify the cache provider.

    The Hibernate support is a HUGE help. Thanks

    #273111 Reply

    Loyal Water
    Member

    Your welcome.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Unable to open (and run) an HQL Query Editor

You must be logged in to post in the forum log in