HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.3k stars 487 forks source link

Trava-jdk-11-dcevm, Apache Ignite 2.7, XmlBeanDefinationScannerAgent ERROR #285

Open ming871 opened 5 years ago

ming871 commented 5 years ago

HOTSWAP AGENT: 17:45:45.259 ERROR (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinationScannerAgent) - failed to convert filePath /Volumes/Data/ignite/config/default-config.xml to classPath path

skybber commented 5 years ago

Could you send please stacktrace?

ming871 commented 5 years ago
devdeiMac-Pro:bin dev$ ignite.sh 
Starting HotswapAgent '/Library/Java/JavaVirtualMachines/dcevm-11.0.1/Contents/Home/lib/hotswap/hotswap-agent.jar'
HOTSWAP AGENT: 17:45:38.948 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 17:45:39.270 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/Volumes/Data/ignite/libs/ignite-core-2.7.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
HOTSWAP AGENT: 17:45:45.120 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.spring.SpringPlugin' initialized in ClassLoader 'jdk.internal.loader.ClassLoaders$AppClassLoader@512ddf17'.
HOTSWAP AGENT: 17:45:45.120 INFO (org.hotswap.agent.plugin.spring.SpringPlugin) - Spring plugin initialized - Spring core version '4.3.18.RELEASE'
**HOTSWAP AGENT: 17:45:45.259 ERROR (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinationScannerAgent) - failed to convert filePath /Volumes/Data/ignite/config/default-config.xml to classPath path**
HOTSWAP AGENT: 17:45:45.554 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.log4j2.Log4j2Plugin' initialized in ClassLoader 'jdk.internal.loader.ClassLoaders$AppClassLoader@512ddf17'.
HOTSWAP AGENT: 17:45:45.556 INFO (org.hotswap.agent.plugin.log4j2.Log4j2Plugin) - Log4j2 plugin initialized.
[2019-01-03 17:45:45,796][INFO ][main][IgniteKernal] 

>>>    __________  ________________  
>>>   /  _/ ___/ |/ /  _/_  __/ __/  
>>>  _/ // (7 7    // /  / / / _/    
>>> /___/\___/_/|_/___/ /_/ /___/   
>>> 
>>> ver. 2.7.0#20181201-sha1:256ae401
>>> 2018 Copyright(C) Apache Software Foundation
>>> 
>>> Ignite documentation: http://ignite.apache.org
.
.
.
.
.

there is no stacktrace, only this line, but the ignite can startup

ming871 commented 5 years ago

my "hotswap-agent.properties" config:

disabledPlugins=Hibernate, Hibernate3JPA, Hibernate3, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket

autoHotswap=true

others are blank

skybber commented 5 years ago

Looks that your default-config.xml is not at known path I'm not expert on Spring... but how is the framework aware of configuration lying out of well-known-path? May be we can easily fix the code...

tholu commented 5 years ago

@skybber I think this is the similar issue that you mentioned in https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/issues/14. My problem is with xml-files located in WEB-INF/, not in WEB-INF/classes/, so just adding WEB-INF/ could easily fix it.

I also thought that hotswap-agent.properties can be used to configure additional locations (with extraClasspath), however I'm not sure if the config gets even picked up, because I could not get it to work with any value I have tried.

skybber commented 4 years ago

There is commit 83b8833a691083b3059402bb46f094e602818792 solving issue with config in WEB-INF/ and WEB-INF/classes