You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VM options:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
-XXaltjvm=dcevm
-javaagent:D:\develop\java\source\HotswapAgent\hotswap-agent\target\hotswap-agent.jar=propertiesFilePath=D:\downloads\hotswap-agent.properties
operation:
Change what the arrow executes 1 to 2, and then perform hot deployment
Error message;
HOTSWAP AGENT: 00:21:00.847 ERROR (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - Failed to invoke PostProcessorRegistrationDelegate
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokePostProcessorRegistrationDelegate(SpringBeanReload.java:666)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:646)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.doReload(SpringBeanReload.java:296)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.reload(SpringBeanReload.java:259)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.doReload(SpringChangedAgent.java:204)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reloadAll(SpringChangedAgent.java:192)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reload(SpringChangedAgent.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringChangedReloadCommand.executeCommand(SpringChangedReloadCommand.java:54)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
Caused by: java.lang.NullPointerException
at org.mybatis.spring.mapper.MapperScannerConfigurer.processPropertyPlaceHolders(MapperScannerConfigurer.java:386)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:354)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:142)
... 17 more
HOTSWAP AGENT: 00:21:00.847 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - ##### [1th] finish reloading 'org.springframework.beans.factory.support.DefaultListableBeanFactory@5ef6fd7f', it cost 7ms
HOTSWAP AGENT: 00:21:00.848 ERROR (org.hotswap.agent.plugin.spring.reload.XmlsChangedCommand) - Error invoking method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringChangedReloadCommand.executeCommand(SpringChangedReloadCommand.java:54)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:655)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.doReload(SpringBeanReload.java:296)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.reload(SpringBeanReload.java:259)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.doReload(SpringChangedAgent.java:204)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reloadAll(SpringChangedAgent.java:192)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reload(SpringChangedAgent.java:143)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokePostProcessorRegistrationDelegate(SpringBeanReload.java:666)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:646)
... 11 more
Caused by: java.lang.NullPointerException
at org.mybatis.spring.mapper.MapperScannerConfigurer.processPropertyPlaceHolders(MapperScannerConfigurer.java:386)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:354)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:142)
... 17 more
Error cause:
Org. Mybatis. Spring. Mapper. MapperScannerConfigurer creates a temporary DefaultListableBeanFactory for placeholder substitution, And org. Hotswap. Agent. The plugin. Spring. Reload. SpringChangedAgent. SpringChangeAgents cache the temporary DefaultListableBeanFactory, in file change happened, Triggering a reload will cause the newly created bean not to follow the normal spring initialization process
Another problem area:
A configuration should be recreated before calling the buildSqlSessionFactory method of the sqlSessionFactoryBean spring bean. Otherwise, the xml file found loaded in the buildSqlSessionFactory method implementation will not be loaded again
Environmental Information:
java version: jdk1.8.0_181
dcevm:jdk8u181+2
HotswapAgent:1.4.2-SNAPSHOT
VM options:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
-XXaltjvm=dcevm
-javaagent:D:\develop\java\source\HotswapAgent\hotswap-agent\target\hotswap-agent.jar=propertiesFilePath=D:\downloads\hotswap-agent.properties
operation:
![image](https://private-user-images.githubusercontent.com/26599681/329648702-1a56fc69-9886-44b2-a6e9-aff902c86e27.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMTc4OTIsIm5iZiI6MTcyMzIxNzU5MiwicGF0aCI6Ii8yNjU5OTY4MS8zMjk2NDg3MDItMWE1NmZjNjktOTg4Ni00NGIyLWE2ZTktYWZmOTAyYzg2ZTI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDE1MzMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmMTJlOTU4NDE4Y2FjZWViMTVmNTA4ZGNiOTIzODE5OGRjNmRlMTg4Y2ZkYzc3ZWIzZDg1Y2Y0YmFhYjU5MjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zvBIm92oyirWN2tCWUntV-VPSv61AKFvqh1yHmFG4Hg)
Change what the arrow executes 1 to 2, and then perform hot deployment
Error message;
HOTSWAP AGENT: 00:21:00.847 ERROR (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - Failed to invoke PostProcessorRegistrationDelegate
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokePostProcessorRegistrationDelegate(SpringBeanReload.java:666)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:646)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.doReload(SpringBeanReload.java:296)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.reload(SpringBeanReload.java:259)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.doReload(SpringChangedAgent.java:204)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reloadAll(SpringChangedAgent.java:192)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reload(SpringChangedAgent.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringChangedReloadCommand.executeCommand(SpringChangedReloadCommand.java:54)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
Caused by: java.lang.NullPointerException
at org.mybatis.spring.mapper.MapperScannerConfigurer.processPropertyPlaceHolders(MapperScannerConfigurer.java:386)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:354)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:142)
... 17 more
HOTSWAP AGENT: 00:21:00.847 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - ##### [1th] finish reloading 'org.springframework.beans.factory.support.DefaultListableBeanFactory@5ef6fd7f', it cost 7ms
HOTSWAP AGENT: 00:21:00.848 ERROR (org.hotswap.agent.plugin.spring.reload.XmlsChangedCommand) - Error invoking method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringChangedReloadCommand.executeCommand(SpringChangedReloadCommand.java:54)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:655)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.doReload(SpringBeanReload.java:296)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.reload(SpringBeanReload.java:259)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.doReload(SpringChangedAgent.java:204)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reloadAll(SpringChangedAgent.java:192)
at org.hotswap.agent.plugin.spring.reload.SpringChangedAgent.reload(SpringChangedAgent.java:143)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokePostProcessorRegistrationDelegate(SpringBeanReload.java:666)
at org.hotswap.agent.plugin.spring.reload.SpringBeanReload.invokeBeanFactoryPostProcessors(SpringBeanReload.java:646)
... 11 more
Caused by: java.lang.NullPointerException
at org.mybatis.spring.mapper.MapperScannerConfigurer.processPropertyPlaceHolders(MapperScannerConfigurer.java:386)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:354)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:142)
... 17 more
Error cause:
![image](https://private-user-images.githubusercontent.com/26599681/329649589-2a903d9a-7ca0-4e4e-832f-d430fa0ef062.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMTc4OTIsIm5iZiI6MTcyMzIxNzU5MiwicGF0aCI6Ii8yNjU5OTY4MS8zMjk2NDk1ODktMmE5MDNkOWEtN2NhMC00ZTRlLTgzMmYtZDQzMGZhMGVmMDYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDE1MzMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4MGFkNjBkODliNWNlOTc0MmM1ODYwYjExMDI0NjRiZTM4MDMyYjNiYWZiNmZmNTBkYTNhZDA3NWU4MGQzNjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.q_2vGEyQFFW4p5zmt2Pn2bFz8Fj8yqWxrouxr7Xff18)
Org. Mybatis. Spring. Mapper. MapperScannerConfigurer creates a temporary DefaultListableBeanFactory for placeholder substitution, And org. Hotswap. Agent. The plugin. Spring. Reload. SpringChangedAgent. SpringChangeAgents cache the temporary DefaultListableBeanFactory, in file change happened, Triggering a reload will cause the newly created bean not to follow the normal spring initialization process
Another problem area:
![image](https://private-user-images.githubusercontent.com/26599681/329651841-a4b11e65-856b-4f90-9784-1168a5b0f081.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMTc4OTIsIm5iZiI6MTcyMzIxNzU5MiwicGF0aCI6Ii8yNjU5OTY4MS8zMjk2NTE4NDEtYTRiMTFlNjUtODU2Yi00ZjkwLTk3ODQtMTE2OGE1YjBmMDgxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDE1MzMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5Mjk1NDgxZDBhYmYwMWM1MzZmNDlhM2MzMGZlMmRkMjRkMzNhODZjOGU0Zjg2ZjRlYTQ5NGJiNzBhZjZmYmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7ceN6t7vSIEPoDxUMZgahnJZ6DumFZFdN_aSrLuBy2M)
A configuration should be recreated before calling the buildSqlSessionFactory method of the sqlSessionFactoryBean spring bean. Otherwise, the xml file found loaded in the buildSqlSessionFactory method implementation will not be loaded again
Test case:
https://github.com/wallfacers/hotswap-agent-demo
Related issue:
#538
The text was updated successfully, but these errors were encountered: