facebook

ehcache version in Hibernate 3.1

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

    Daniel Ray
    Member

    MyEclipse Enterprise Workbench

    Version: 5.0.1 GA
    Build id: 20060810-5.0.1-GA

    Ran into a problem when adding Hibernate 3.1 capabilities.

    java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.<init>()V from class org.hibernate.cache.EhCacheProvider

    I had to update the ehcache.jar to 1.2.3 to eliminate this error. Is there an update that includes the latest version of the ehcache.jar? Version 1.1 is the current version that’s added when choosing the 3.1 capability.

    #258274 Reply

    Haris Peco
    Member

    budoray ,

    ehcache version 1.1 is in latest hibernate 3.1.3 distribution.I don’t sure what is your problem.Can you send your cfg.xml and some code example ?

    Thanks
    Peco

    #258383 Reply

    Daniel Ray
    Member

    1.2.3 us the latest

    http://ehcache.sourceforge.net/

    Just add 3.1 capabilities and implement a save method. Call it and you will get the error I mentioned.

    #258496 Reply

    Brian Fernandes
    Moderator

    budoray,

    While adding Hibernate 3.1 capabilities, we add Hibernate 3.1.3 which is the latest production release in the 3.1 stream. 3.1.3 ships with ehcache 1.1 – it is not easy for us to slip in a new version of this library as that could have other repercussions.

    Having said that, you are free to download the version of ehcache you wish to use and configure our Hibernate 3.1 capabilities to use that instead. Just in case you are unaware of how to do this – Go to the MyEclipse > Project Capabilities > Hibernate preference page and the Hibernate 3.1 tab. Remove the ehcache-1.1.jar entry and add the jar you wish to use. If you create a new Hibernate 3.1 project now, the new jar file will be used.

    Hope this helps,
    Brian.

    #258514 Reply

    Daniel Ray
    Member

    You and I are out of sync. Try this. Create a project. Add Hibernate 3.1 capabilities. Implement a save method via the generator. You will get the error I mentioned. The error is fixed by using the ehcache 1.2.3 jar instead of 1.1.

    Are you telling me that I’m out of date with myeclipse distribution and that this has been fixed? Did you test this as I described?

    #258532 Reply

    Brian Fernandes
    Moderator

    I’m clarifying what I said above.
    MyEclipse 5.0.1 is the latest release of MyEclipse at this point. If you have that, you have the latest.

    a) We will most likely not update our hibernate 3.1 libraries to include ehcache1.2.3 instead of ehcache 1.1, because ehcache 1.1 is an official part of the Hibernate 3.1.3 distribution. If the Hibernate team releases a new release of Hibernate 3.1 with updated libraries, we will update our library sets accordingly. Until that time however, the versions of the libraries we ship (and the jars) must remain the same as those in Hibernate 3.1.3 – and we will continue shipping ehcache 1.1.

    b) If you wish to use ehcache 1.2.3 instead of echache 1.1 in all your Hibernate 3.1 projects, you have to do the following:
    Go to Window > Preferences > MyEclipse > Hibernate. Selecte the 3.1 tab. Remove the ehcache-1.1.jar entry and add the jar you wish to use (presumably ehcache-1.2.3.jar, you need to download this yourself, we do not provide this file for download)

    We tried to replicate your test as best we could from your description, but it worked just fine for us. If you can send us relevant snippets of your configuration, mapping and java files that will help.
    In any case if you’ve already solved your problem with ehcache-1.2.3 you don’t need to do anything and you can follow b above if you want to use the new ehcache library henceforth.

    I hope this helps,
    Brian.

    #258629 Reply

    Daniel Ray
    Member

    Try this, then.

    Create a web project.
    Add JSF capabilities, but don’t include the myfaces 1.1.1 jars and tlds. Use the 1.1.3 jars instead.
    Add hibernate 3.1 capabilities.

    Create a database in Mysql 5.
    Add a table.
    Generate mapping files.

    Deploy to JBoss 4.0.4.
    Deploy web project.
    Start JBoss.
    Execute save method.

    There’s the error.

    It’s also noted in this thread.

    http://galaxy.andromda.org/forum/viewtopic.php?t=3175&sid=df4ef8f5966fae885d50aa07f59ccd4b

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: ehcache version in Hibernate 3.1

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