[Conditions]
In use of Java 11
iAP/Accel Platform/2018 Winter or later
[Cause]
Attach API specifications has been changed.
[Workaround]
Add -Djdk.attach.allowAttachSelf=true to the JVM option.
[Details]
For calculation of the memory size of Ehcache, Sizeof Engine function is used.
The message “Failed to attach to VM and load the agent” will be output when one type of implementation of Sizeof Engine cannot be loaded.
Since Sizeof Engine provides three types of implementation and another is used when this message is output, operation or the like is not affected.
If the same implementation as that of the prior version (when Java 8 is used) is needed to be used mainly for version upgrade, add -Djdk.attach.allowAttachSelf=true to JVM option on Resin start.
Adding -Djdk.attach.allowAttachSelf=true can prevent the message, “Failed to attach to VM and load the agent,” from being output, and the following message will be output, instead.
[INFO] n.s.e.p.s.AgentLoader - []Extracted agent jar to temporary file tmp\ehcache-sizeof-agentXXXXXXXXXXXXXXXXXXXXX.jar
[INFO] n.s.e.p.s.AgentLoader - []Trying to load agent @ tmp\ehcache-sizeof-agent.XXXXXXXXXXXXXXXXXXXXXjar
-- Target ------------------------------------------------------------------------
iAP/Accel Platform/2018 Winter or later
--------------------------------------------------------------------------------
FAQID:1000