Ehcache 3.0 and Size of Agent Error

235 views
Skip to first unread message

wilming...@gmail.com

unread,
Jun 21, 2016, 2:13:17 PM6/21/16
to ehcache-users
  1. What version of Ehcache you are currently using; 3.0.2
  2. Paste the configuration for the Cache/CacheManager you have an issue with; N/A
  3. Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate); N/A
  4. Providing JDK and OS versions maybe useful as well. JDK 1.7.0_79 Windows 7/10
I'm receiving the error below on startup of Tomcat using Ehcache.  My cache configuration contains a heap space setting (in MB) and disk space (in MB).  I eventually want statistical data from the cache that needs to be displayed to an admin.  Will this cause any issues?

AgentLoader.loadAgent|2016-06-21 13:27:07,736|Trying to load agent @ C:\Program%20Files\Apache%20Software%20Foundation\apache-tomcat-7.0.69\temp\1466529964464.openmrs-lib-cache\chirdlutilbackports\org\ehcache\sizeof\impl\sizeof-agent.jar
AgentLoader.loadAgent|2016-06-21 13:27:07,751|Failed to attach to VM and load the agent: class com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute

Thanks!

James House

unread,
Jun 21, 2016, 3:55:16 PM6/21/16
to ehcache-users
The size-of module contains multiple strategy implementations for computing the sizes of objects (in bytes).   One of those implementations rely on an agent class.  If that fails to be available in the given JVM then one of the other strategies will be used for computing size.   You are seeing logging related to the fact that the agent strategy cannot/will not be used.  You may also have logging that indicates which strategy will be used.


--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ehcache-user...@googlegroups.com.
To post to this group, send email to ehcach...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/8d88f0eb-1281-47dc-8377-2a64ce4d1e37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wilming...@gmail.com

unread,
Jun 22, 2016, 9:25:08 AM6/22/16
to ehcache-users
Thanks for the information!  So it's still okay to use a cache with a heap size configuration measured in MB instead of number of entries before sending data to disk?  Sounds like it should be fine, but I just want to make sure it will work correctly.

James House

unread,
Jun 24, 2016, 1:58:52 PM6/24/16
to ehcache-users
Reply all
Reply to author
Forward
0 new messages