🔍 专注于钻研硬核黑科技
🌍 致力于用技术改变世界
🚀 拒绝纸上谈兵,实战至上
HotSeconds是一款Java远程热部署的插件,可实现秒级一键化热更新。插件分为HotSecondsClient(IDEA热部署插件)和HotSecondsServer(服务端javaagent热更新插件),可以热更新java和常用配置文件,也支持常用框架(Spring,MyBatis)的热更新,相对传统部署可节省大量时间提高开发效率。
License: GNU General Public License v2.0
🔍 专注于钻研硬核黑科技
🌍 致力于用技术改变世界
🚀 拒绝纸上谈兵,实战至上
环境:jdk1.8.0_201
下载的https://github.com/Liubsyy/HotSecondsIDEA/releases/download/libjvm_so/libjvm181.so文件
执行install.sh安装
执行java -XXaltjvm=dcevm -version验证报错。
错误信息:
Error: missing dcevm' JVM at
/usr/java/jdk1.8.0_201-amd64/jre/lib/amd64/dcevm/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components
这个是什么原因?
尽量做成一个starter吧,server端还要自己单独去下载一些包有点麻烦了,直接依赖进来是最方便快捷的。
我远程服务器热更不了,救一下哥哥
环境如下:
Java version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
java -XXaltjvm=dcevm -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-26, mixed mode)
报错如下:
HOTSECONDS: 08:36:44.200 INFO Add tools.jar to classpath...
HOTSECONDS: 08:36:44.358 INFO findAllDependencyClasses[]
HOTSECONDS: 08:36:44.359 INFO findAllDependencyClasses[/home/ec2-user/builds/20230904182938/hamsapay-sunriseserv-central-bank-dev.jar]
HOTSECONDS: 08:36:44.362 INFO findNeedClassLoaderDone:sun.misc.Launcher$AppClassLoader@18b4aac2
HOTSECONDS: 08:36:44.363 INFO addRemoteSrcToClassPath :/home/ec2-user/builds/20230904182938/remote_src
HOTSECONDS: 08:36:44.367 INFO Loading Hotswap agent {1.4.1} - unlimited runtime class redefinition.
HOTSECONDS: 08:36:45.153 INFO Discovered plugins: [MyBatis, Hotswapper, JdkPlugin, AnonymousClassPatch, ClassInitPlugin, WatchResources, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow]
Listening for transport dt_socket at address: 5005
HOTSECONDS: 08:36:48.389 INFO HotDeployService热部署服务启动成功
java: relocation error: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-1.amzn2.0.2.x86_64/jre/lib/amd64/libjava.so: symbol JVM_IsUseContainerSupport, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference
请问是JDK版本不支持吗?
你好,有两个问题想确认一下
1.关于文档中提供的libjvm.so文件 我在oracle的jre中也找到了此文件
替换后,执行检查命令 java -XXaltjvm=dcevm -version 可以正常显示 但在运行的server的时候报GBL协议不存在
以jdk181版本为例,两个.so文件大小不同
2.此插件能集成到docker 容器中吗?使用的openjdk 181 版本 so用的文档提供的181.so 检查无法通过
[root@vm12345-1214332 HotSecondsServer]# java -XXaltjvm=dcevm -javaagent:HotSecondsServer.jar=hotconf=hot-seconds-remote.xml
HOTSECONDS: 18:40:17.886 INFO findAllDependencyClasses[]
HOTSECONDS: 18:40:17.886 INFO findAllDependencyClasses[/root/HotSecondsServer/HotSecondsServer.jar]
HOTSECONDS: 18:40:17.889 INFO findNeedClassLoaderDonesun.misc.Launcher$AppClassLoader@18b4aac2
HOTSECONDS: 18:40:17.890 INFO Loading Hotswap agent {1.4.1} - unlimited runtime class redefinition.
HOTSECONDS: 18:40:17.890 WARNING Invalid javaagent option 'hotconf'. Argument 'hotconf=hot-seconds-remote.xml' is ignored.
HOTSECONDS: 18:40:18.423 INFO Discovered plugins: [Hotswapper, JdkPlugin, AnonymousClassPatch, ClassInitPlugin, WatchResources, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis]
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server,
because you are running on a server-class machine.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
HOTSECONDS: 18:40:21.481 INFO HotDeployService热部署服务启动成功
启动后 hotseconds_err.log
100
101
102
200
201
202
100
200
201
202
100
200
201
202
100
200
201
202
100
200
201
202
100
200
201
202
100
200
201
202
100
100
100
100
100
200
201
202
100
200
201
202
100
200
201
202
100
[root@vm12345-1214332 ~]# lsof -i:12023
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 23552 root 18u IPv6 924706608 0t0 TCP *:12023 (LISTEN)
配置文件 hot-seconds-remote.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- 一键秒级远程热部署配置文件 -->
<!-- 此配置文件一共两套,为hot-seconds.xml和hot-seconds-remote.xml -->
<liubs>
<!-- 这个是本地和远程连接的唯一id,务必保证hot-seconds.xml和hot-seconds-remote.xml相等 -->
<secret>aaaaaaaabbbbbbbbbccccccccc</secret>
<!-- 远程端口 -->
<remote_port>12023</remote_port>
<init_delay>3000</init_delay>
<!--
普通java项目填 AppClassLoader,
Tomcat项目填 WebappClassLoader/ParallelWebappClassLoader(Tomcat8及以后的版本填ParallelWebappClassLoader),
SpringBoot项目填 LaunchedURLClassLoader
-->
<classloader>AppClassLoader</classloader>
<!-- 这里的扩展classname是热加载某个文件的前置和后置操作,需要实现IHotExtHandler接口,复制IHotExtHandler.java到工程即可 -->
<dev-ext>
<!--<classname>com.liubs.ext.XXHandler</classname>-->
</dev-ext>
</liubs>
配置文件 hot-seconds.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- 一键秒级远程热部署配置文件 -->
<!-- 此配置文件一共两套,为hot-seconds.xml和hot-seconds-remote.xml -->
<!-- 此配置文件本地改完重新打开插件开关生效 -->
<liubs>
<author>liubsyy</author>
<!-- 这个是本地和远程连接的唯一id,务必保证本地和远程相等 -->
<secret>aaaaaaaabbbbbbbbbccccccccc</secret>
<!-- 远程ip -->
<remote_ip>xxx.xxx.xxx.xxx</remote_ip>
<iplist>xxx.xxx.xxx.xxx</iplist>
<!-- 远程端口 -->
<remote_port>12023</remote_port>
<!-- timeout : ms-->
<timeout>3000</timeout>
<!-- 是否自动部署,如果为true则监听文件变化自动部署到远程 -->
<auto_hotdeploy>false</auto_hotdeploy>
<!-- 本地路径和远程路径mapping关系 -->
<!-- ****** 填写路径path和remote-path须知 ******
1.file_type为上传文件的后缀,如果有多个用英文逗号隔开
2.path为本地路径, remote-path为远程路径
3.$rootPath$为本地工程根目录,remote-path需要填绝对路径
4.上传到远程路径的规则: ${path}/dir1/dir2/a.html ==> ${remote-path}/dir1/dir2/a.html
5.如果file_type是.java或.class,可不填mapping,直接热到内存生效
-->
<mappings>
<mapping>
<file_type>.class</file_type>
<path>$rootPath$/next-server/next-user-webapp/target/classes</path>
<remote-path>/opt/web/xx/webapps/WEB-INF/classes</remote-path>
</mapping>
<!-- 下面是两个例子,仅供参考
1.将src/main/webapp下的资源文件上传到远程的/opt/web/xx/webapps目录下
2.将target/classes目录下的.class文件上传到远程的/opt/web/xx/webapps/WEB-INF/classes目录下
<mapping>
<file_type>.html,css,js</file_type>
<path>$rootPath$/src/main/webapp</path>
<remote-path>/opt/web/xx/webapps</remote-path>
</mapping>
<mapping>
<file_type>.class</file_type>
<path>$rootPath$/target/classes</path>
<remote-path>/opt/web/xx/webapps/WEB-INF/classes</remote-path>
</mapping>
-->
</mappings>
</liubs>
hot-seconds.xml中有
<remote_ip> </remote_ip>
<connections>
<connection>
<secret> </secret>
<ip> </ip>
<port> </port>
</connection>
</connections>
其中<remote_ip> </remote_ip>和connect中的 有什么关系,远程ip指定的是需要更改的界面对应的ip地址吗?指定了之后好像没什么作用
Failed to connect to remote 192.168.51.201:2023 Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect
Server端在虚拟机上部署成功且端口正常。
是因为windows的换行符和linux的不一样,可以使用dos2unix install.sh 转换一下
springcloud 多模块项目和springboot以jar启动的项目如何远程部署和热更新?
热部署功能都正常,服务器端日志有异常,顺便问一下jar启动的项目mybatis的xml文件如何热加载,远程目录填写jar同级目录吗,试了一下有异常热加载不到,扩展插件以配置
HOTSECONDS: 07:11:44.633 INFO []热更新类:jnpf.controller.ContractController,size=4438
HOTSECONDS: 07:11:44.633 RELOAD Reloading classes [jnpf.controller.ContractController] (autoHotswap)
HOTSECONDS: 07:11:44.634 ERROR classReload() exception No such field java.beans.Introspector.declaredMethodCache on null.
HOTSECONDS: 07:11:44.634 ERROR classReload() exception class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap').
HOTSECONDS: 07:11:44.634 ERROR flushClassInfoCache() exception Unable to make field private static final com.sun.beans.util.Cache com.sun.beans.introspect.ClassInfo.CACHE accessible: module java.desktop does not "opens com.sun.beans.introspect" to unnamed module @1c4af82c.
HOTSECONDS: 07:11:44.839 INFO 热部署jnpf.controller.ContractController成功
1.去dcevm 找到你的JDK版本的jar包(支持macOS, Linux and Windows),下载下来后运行jar(可能需要管理员权限或者root权限)安装,选择Install DCEVM as altjvm
2.将本安装包HotSecondsServer.zip解压后,放到你的工程根目录
3.将hot-seconds-remote.xml复制到代码的resource目录,根据需要修改secret和classloader等配置
第一步:
4.添加jvm参数开启热部署代理
-XXaltjvm=dcevm -javaagent:$path1/HotSecondsServer.jar=hotconf=$path2/hot-seconds-remote.xml
其中$path1是第2步上传的目录,$path2是第3步上传的目录
第一步:
源码是不是少了,没找到IHotExtHandler类呢
和jrebel的对比有吗
IntelliJ IDEA 2023.2 (Build #IU-232.8660.185, built on July 26, 2023)
HotSecondsClient 端版本:1.8.5
HotSecondsServer 端版本:HotSecondsServer-future2
Java version "1.8.0_382"
libjvm.so 使用版本:1.8.0_181
Debian GNU/Linux 12 x86_64
该项目是在宝塔部署的 Spring Boot。
运行命令:
java -XXaltjvm=dcevm -javaagent:HotSecondsServer.jar=hotconf=hot-seconds-remote.xml -jar -Xmx1024M -Xms256M server.jar --server.port=9090 --spring.profiles.active=local
hot-seconds-remote.xml
<?xml version="1.0" encoding="UTF-8"?>
<liubs>
<secret>Lvh7TXiv2AhyI3kNS4Ps19wI408NwR8fm4oxbk</secret>
<remote_port>45389</remote_port>
<timeout>5000</timeout>
<classloader>org.springframework.boot.loader.LaunchedURLClassLoader</classloader>
<dev-ext>
<classname>com.code.server.LaunchedClassLoader</classname>
</dev-ext>
</liubs>
hot-seconds.xml
<?xml version="1.0" encoding="UTF-8"?>
<liubs>
<secret>Lvh7TXiv2AhyI3kNS4Ps19wI408NwR8fm4oxbk</secret>
<remote_ip>127.0.0.1</remote_ip>
<remote_port>45389</remote_port>
<timeout>5000</timeout>
<auto_hotdeploy>false</auto_hotdeploy>
<mappings>
</mappings>
</liubs>
在 HotSecondsClient 进行连接的时候出现:
[17:48:38] 初始化hot-seconds.xml:HotDeployConfig{ author='liubsyy', secret='Lvh7TXiv2AhyI3kNS4Ps19wI408NwR8fm4oxbk', remoteIp='127.0.0.1', remotePort=45389, timeout=5000, autoHotDeploy=false, mappings=[]}
[17:48:38] 初始化IHotDeployService失败:java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketException: Connection reset
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:308)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:204)
at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:344)
at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:116)
at com.liubs.ff.hotdeploy.HotDeployClient.lambda$initHotDeployConnectAsync$2(HotDeployClient.java:93)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:244)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:263)
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:271)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:247)
... 6 more
发现以下内容:
HOTSECONDS: 05:46:09.556 INFO HotDeployService热部署服务启动成功
HOTSECONDS: 05:47:46.147 INFO Executing XmlBeanDefinitionScannerAgent.reloadXml('file:hot-seconds-remote.xml')
HOTSECONDS: 05:47:46.148 ERROR failed to convert filePath hot-seconds-remote.xml to classPath path
HOTSECONDS: 05:47:46.148 WARNING url file:hot-seconds-remote.xml is not associated with any XmlBeanDefinitionScannerAgent, not reloading
/zulu8.72.0.17-ca-jdk8.0.382-linux_x64/bin/java: symbol lookup error: /zulu8.72.0.17-ca-jdk8.0.382-linux_x64/jre/lib/amd64/libjava.so: undefined symbol: JVM_BeforeHalt, version SUNWprivate_1.1
HOTSECONDS: 05:47:59.218 INFO Add tools.jar to classpath...
HOTSECONDS: 05:47:59.339 INFO findAllDependencyClasses[]
HOTSECONDS: 05:47:59.340 INFO findAllDependencyClasses[*.jar]
HOTSECONDS: 05:47:59.346 INFO Loading Hotswap agent {1.4.1} - unlimited runtime class redefinition.
HOTSECONDS: 05:48:00.109 INFO Discovered plugins: [MyBatis, Hotswapper, JdkPlugin, AnonymousClassPatch, ClassInitPlugin, WatchResources, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow]
05:48:00.351 [main] INFO org.springframework.boot.devtools.restart.RestartApplicationListener - Restart disabled due to an agent-based reloader being active
HOTSECONDS: 05:48:01.109 INFO Plugin 'org.hotswap.agent.plugin.logback.LogbackPlugin' initialized in ClassLoader 'sun.misc.Launcher$AppClassLoader@18b4aac2'.
HOTSECONDS: 05:48:01.110 WARNING Unable to watch for path jar:file:/server-api.jar!/logback-config.xml, not a local regular file or directory.
HOTSECONDS: 05:48:01.110 INFO Logback plugin initialized.
HOTSECONDS: 05:48:01.231 INFO Plugin 'org.hotswap.agent.plugin.spring.SpringPlugin' initialized in ClassLoader 'sun.misc.Launcher$AppClassLoader@18b4aac2'.
HOTSECONDS: 05:48:01.231 INFO Spring plugin initialized - Spring core version '5.2.7.RELEASE'
HOTSECONDS: 05:48:01.573 INFO Registering basePackage com.wk.code.wkserver
HOTSECONDS: 05:48:01.698 INFO Registering basePackage springfox.documentation.swagger2.mappers
HOTSECONDS: 05:48:01.713 INFO Registering basePackage springfox.documentation.spring.web.scanners
HOTSECONDS: 05:48:01.718 INFO Registering basePackage springfox.documentation.spring.web.readers.operation
HOTSECONDS: 05:48:01.722 INFO Registering basePackage springfox.documentation.spring.web.readers.parameter
HOTSECONDS: 05:48:01.727 INFO Registering basePackage springfox.documentation.spring.web.plugins
HOTSECONDS: 05:48:01.729 INFO Registering basePackage springfox.documentation.spring.web.paths
HOTSECONDS: 05:48:01.755 INFO Registering basePackage springfox.documentation.schema
HOTSECONDS: 05:48:01.774 INFO Registering basePackage springfox.documentation.swagger.schema
HOTSECONDS: 05:48:01.778 INFO Registering basePackage springfox.documentation.swagger.readers
HOTSECONDS: 05:48:01.785 INFO Registering basePackage springfox.documentation.swagger.web
HOTSECONDS: 05:48:01.796 INFO Registering basePackage com.github.xiaoymin.knife4j.spring.plugin
HOTSECONDS: 05:48:01.797 INFO Registering basePackage com.github.xiaoymin.knife4j.spring.web
HOTSECONDS: 05:48:02.846 INFO Spring plugin initialized - Spring core version '5.2.7.RELEASE'
HOTSECONDS: 05:48:02.858 INFO Registering basePackage com.wk.code.wkserver.mapper
HOTSECONDS: 05:48:04.099 INFO Plugin 'org.hotswap.agent.plugin.tomcat.TomcatPlugin' initialized in ClassLoader 'TomcatEmbeddedWebappClassLoader
context: v1
delegate: true
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@18b4aac2
'.
HOTSECONDS: 05:48:04.099 INFO Tomcat plugin initialized - Tomcat version '9.0.36.0'
HOTSECONDS: 05:48:05.009 INFO MyBatis plugin initialized.
HOTSECONDS: 05:48:05.009 INFO Plugin 'org.hotswap.agent.plugin.mybatis.MyBatisPlugin' initialized in ClassLoader 'sun.misc.Launcher$AppClassLoader@18b4aac2'.
-Djava.rmi.server.hostname=远程ip
未解决我配置的连接ip地址是服务器的外网ip地址,但是这个报错里面是服务器的内网ip地址
报错中10.10.0.82是我的服务器的内网ip地址
能不能提供一下HotDeployClient这个类的源码看一看。。
[14:22:51] Failed to initialize IHotDeployService:java.rmi.ConnectException: Connection refused to host: 10.10.0.82; nested exception is:
java.net.ConnectException: Operation timed out
at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:626)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:204)
at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:215)
at java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:160)
at jdk.proxy16/jdk.proxy16.$Proxy292.hello(Unknown Source)
at com.liubs.ff.hotdeploy.HotDeployClient.lambda$initHotDeployConnectAsync$2(HotDeployClient.java:94)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.net.ConnectException: Operation timed out
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:579)
at java.base/sun.nio.ch.Net.connect(Net.java:568)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/java.net.Socket.<init>(Socket.java:507)
at java.base/java.net.Socket.<init>(Socket.java:287)
at com.intellij.execution.rmi.RemoteServer$1.createSocket(RemoteServer.java:156)
at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:620)
... 9 more
初始化IHotDeployService失败:java.rmi.ConnectIOException: non-JRMP server at remote endpoint 这个要怎么解决下
jdk版本和dcevm版本不一致,请先确保版本是一致的。
请把用GC相关的jvm参数都删掉,包括但不限于 -XX:+UseParNewGC, -XX:+UseConcMarkSweepGC,-XX:ParallelGCThreads ,-XX:+UseCMSCompactAtFullCollection ,-XX:CMSInitiatingOccupancyFraction 等等,如果启动不起来也没有报错日志一般就是参数没删干净,如果不确定可以先只加最基本的jvm参数看看能不能起来
先确保第2步中的参数都是正确的,如果都改完了,还是有问题
先用jps看看是哪个进程pid,然后用jstack -l pid > 1.log,搜索deadlock看看有没有具体的报错,报错信息可以发一下。
HotDeployService热部署服务启动成功
服务端用netstat/lsof看看端口是不是起来了,客户端用telnet/nc -zv 能连通远程的端口
升级到HotSecondsServer-future2版本以上,然后在服务端加上启动参数 -Djava.rmi.server.hostname=远程ip
连接远程正常,但是热加载任何一个类报错fail或者报错Can't find classloader in server,please check hot-seconds-remote.xml,一般是hot-seconds-remote.xml中的classloader配错了,可以远程断点,然后随便找个类A,看看A.class.getClassLoader()是哪个,填到配置文件即可。
想请教下Spring框架下是咋解决依赖更新的?在Spring启动的时候记录下来bean的依赖关系么?
如题
All dcevm.so downloads 列表中没用我需要的版本 :1.8.0_40
支持Maven多模块吗?
Originally posted by @nidehehe in #4 (comment)
如果多模块都部署在一个服务器上,目前是支持的,如果多个模块部署的服务器不一样,目前还未支持,可以多开几个IDEA窗口也能做到。
后期我也是想支持的,就是一个IDEA窗口下可以连接多个不同项目的服务器,但是我不想把配置和操作设计的繁琐,尽可能简单。
我远程服务器上用的不是root启动的服务,就报这个错:
热部署连接失败:请确保启动 Java 进程的用户和 Host 登陆用户一致
我想把服务器登录的用户名改一下,可是在哪修改远程服务器的配置呢,只能添加,不能删除和修改
请问一下,这一步是添加在哪里呢?看起来像是本地项目启动参数。
==>
3.添加jvm参数
添加jvm参数开启热部署代理 -XXaltjvm=dcevm -javaagent:$path1/HotSecondsServer.jar=hotconf=$path2/hot-seconds-remote.xml
其中$path1是第1步上传的目录,$path2是第2步上传的目录
如题
虽然我知道99%的概率没办法,但还是想知道有没有大佬能想出大致的方案
[19:02:12] [127.0.0.1:8089] Initialized hot-seconds.xml:HotDeployConfig{ author='liubsyy', secret='123', remoteIp='127.0.0.1', remotePort=8089, connections=[Connection{secret='123', ip='127.0.0.1', port=8089}], timeout=3000, autoHotDeploy=false, mappings=[]}
[19:02:12] [127.0.0.1:8089] Failed to initialize IHotDeployService:java.rmi.ConnectIOException: non-JRMP server at remote endpoint
at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:244)
at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)
at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:116)
at com.liubs.ff.hotdeploy.HotDeployClient.lambda$initHotDeployConnectAsync$2(HotDeployClient.java:107)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:829)
我执行完sh install.sh后 执行java -XXaltjvm=dcevm -version报错
Error: missing dcevm' JVM at
/usr/local/java/jre/lib/aarch64/dcevm/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
我们项目用的 jdk1.8_345. 是版本导致的吗。
我们的项目是sass平台上做的,我们没有权限更改jdk版本 有解决方案吗。
服务端启动时,spring容器实例化hibernate一些类的时候报错,用的spring5.x,hibernate5.x。去掉HotSecond这个agent再启动是没问题的。
错误日志如下:
HOTSECONDS: 17:47:28.870 ERROR InvocationTargetException in transform method on plugin 'class org.hotswap.agent.plugin.hibernate.HibernatePlugin' class 'org/hibernate/validator/internal/metadata/BeanMetaDataManager'.
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.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:218)
at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:112)
at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:246)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2470)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:875)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1376)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1220)
at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:38)
at org.hibernate.validator.internal.engine.AbstractConfigurationImpl.buildValidatorFactory(AbstractConfigurationImpl.java:451)
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:103)
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:501)
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.activate(TypeSafeActivator.java:83)
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.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:137)
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:300)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:471)
at org.hibernate.cfg.Configuration._buildSessionFactory(Configuration.java:728)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:746)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:616)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:600)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:766)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:727)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:766)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:727)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:642)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:642)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:410)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:399)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:278)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4494)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4946)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1184)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1932)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1094)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:893)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1328)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1318)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:922)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Caused by: org.hotswap.agent.javassist.CannotCompileException: [source error] no such field: beanMetaDataCache
at org.hotswap.agent.javassist.CtNewMethod.make(CtNewMethod.java:84)
at org.hotswap.agent.javassist.CtNewMethod.make(CtNewMethod.java:50)
at org.hotswap.agent.plugin.hibernate.HibernateTransformers.beanMetaDataManagerRegisterVariable(HibernateTransformers.java:124)
... 170 more
Caused by: compile error: no such field: beanMetaDataCache
at org.hotswap.agent.javassist.compiler.MemberResolver.lookupField(MemberResolver.java:321)
at org.hotswap.agent.javassist.compiler.MemberResolver.lookupFieldByJvmName(MemberResolver.java:307)
at org.hotswap.agent.javassist.compiler.TypeChecker.fieldAccess(TypeChecker.java:904)
at org.hotswap.agent.javassist.compiler.TypeChecker.atFieldRead(TypeChecker.java:831)
at org.hotswap.agent.javassist.compiler.TypeChecker.atExpr(TypeChecker.java:605)
at org.hotswap.agent.javassist.compiler.ast.Expr.accept(Expr.java:71)
at org.hotswap.agent.javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:693)
at org.hotswap.agent.javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:170)
at org.hotswap.agent.javassist.compiler.ast.CallExpr.accept(CallExpr.java:49)
at org.hotswap.agent.javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:266)
at org.hotswap.agent.javassist.compiler.CodeGen.atStmnt(CodeGen.java:360)
at org.hotswap.agent.javassist.compiler.ast.Stmnt.accept(Stmnt.java:53)
at org.hotswap.agent.javassist.compiler.CodeGen.atStmnt(CodeGen.java:381)
at org.hotswap.agent.javassist.compiler.ast.Stmnt.accept(Stmnt.java:53)
at org.hotswap.agent.javassist.compiler.CodeGen.atMethodBody(CodeGen.java:321)
at org.hotswap.agent.javassist.compiler.CodeGen.atMethodDecl(CodeGen.java:303)
at org.hotswap.agent.javassist.compiler.ast.MethodDecl.accept(MethodDecl.java:47)
at org.hotswap.agent.javassist.compiler.Javac.compileMethod(Javac.java:175)
at org.hotswap.agent.javassist.compiler.Javac.compile(Javac.java:102)
at org.hotswap.agent.javassist.CtNewMethod.make(CtNewMethod.java:79)
... 172 more
HOTSECONDS: 17:47:29.936 INFO Plugin 'org.hotswap.agent.plugin.hibernate.HibernatePlugin' initialized in ClassLoader 'ParallelWebappClassLoader
context: ROOT
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@424e1977
Mac系统部署启动时报错: Symbol not found: ____chkstk_darwin,
Referenced from: /Users/hzjdemac/IdeaProjects/pai/HotSecondsServer-future2/lib/boot.dylib (which was built for Mac OS X 10.15)
查了下是我的系统版本太低了10.13.6, 很早的笔记本已经不支持升级到最新版本了。应该有不少这样的用户了吧,能否打一个低版本的包
不太懂这个,见谅
报错信息:
Calling ClassLoader#getResource
with leading slash doesn't work; strip
com.intellij.diagnostic.PluginException: /language/chinese.properties [Plugin: liubsyyflymoon]
at com.intellij.ide.plugins.cl.PluginClassLoader.doFindResource(PluginClassLoader.java:534)
at com.intellij.ide.plugins.cl.PluginClassLoader.getResourceAsStream(PluginClassLoader.java:504)
at com.liubs.ff.language.LanguageText.initLanguageProperties(LanguageText.java:99)
at com.liubs.ff.language.LanguageText.(LanguageText.java:91)
at com.liubs.ff.language.LanguageManager.getText(LanguageManager.java:17)
at com.liubs.ff.ui.SwitchStateToolBar.update(SwitchStateToolBar.java:17)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:645)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:126)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$6(ActionUpdater.java:210)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:58)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:58)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:208)
at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:45)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:200)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
想问下这个插件部分的代码有开源吗,好像没找到是怎么将修改后的代码上传到server的那部分代码
springboot以jar包的形式启动,目前远程热部署一部分会生效,也有的会遇见下面这种问题,请指导一下原因是什么?
HOTSECONDS: 18:29:26.630 ERROR err
java.lang.IllegalStateException: Unable to redefine classes
at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:296)
at com.liubs.hotdeployseconds.server.HotDeployServiceImpl.hotswapClass(HotDeployServiceImpl.java:88)
at com.liubs.hotdeployseconds.server.HotDeployServiceImpl.loadNewClass(HotDeployServiceImpl.java:183)
at com.liubs.hotdeployseconds.server.HotDeployServiceImpl.loadNewClassBatch(HotDeployServiceImpl.java:250)
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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsupportedOperationException: class redefinition failed: attempted to add a method
at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:170)
at org.hotswap.agent.config.PluginManager.hotswap(PluginManager.java:292)
... 20 more
1.8.0_181、1.8.0_202下都出现死锁。tomcat8 ParallelWebappClassLoader类加载器。使用的HotSecondsServer-beat,日志中同时会警告,无法加载hot-seconds-remote.xml。求问如何解决?
WARNING Invalid javaagent option 'hotconf'. Argument 'hotconf=/opt/tomcat/webapps/ROOT/WEB-INF/classes/hot-seconds-remote.xml' is ignored.
"Thread-8":
at com.liubs.hotdeployseconds.server.HotSecondsTransformer.transform(HotSecondsTransformer.java:94)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.invoke.LambdaForm$DMH/1966250569.invokeSpecial_L3IIL_L(LambdaForm$DMH)
at java.lang.invoke.LambdaForm$BMH/257608164.reinvoke(LambdaForm$BMH)
at java.lang.invoke.LambdaForm$MH/1237550792.invoker(LambdaForm$MH)
at java.lang.invoke.LambdaForm$MH/1259652483.invokeExact_MT(LambdaForm$MH)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
at org.hotswap.agent.javassist.util.proxy.DefineClassHelper$Java7.defineClass(DefineClassHelper.java:177)
at org.hotswap.agent.javassist.util.proxy.DefineClassHelper.toClass(DefineClassHelper.java:263)
at org.hotswap.agent.javassist.ClassPool.toClass(ClassPool.java:1232)
at org.hotswap.agent.javassist.CtClass.toClass(CtClass.java:1398)
at org.hotswap.agent.util.classloader.ClassLoaderDefineClassPatcher.patch(ClassLoaderDefineClassPatcher.java:93)
at org.hotswap.agent.config.PluginManager.initClassLoader(PluginManager.java:186)
- locked <0x00000000d98cd2a0> (a org.hotswap.agent.config.PluginManager)
at org.hotswap.agent.util.HotswapTransformer$1.executeCommand(HotswapTransformer.java:316)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
"main":
at com.liubs.hotdeployseconds.server.HotSecondsTransformer.transform(HotSecondsTransformer.java:94)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
- locked <0x00000000c757d928> (a java.lang.Object)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:231)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
- locked <0x00000000d9ec89c0> (a org.apache.catalina.core.StandardServer)
at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Found 1 deadlock.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.