我是 jvm-sandbox-repeater-master.zip 进行解压,然后 mvn install ,再做以下操作
1、源码文件 repeater-console/repeater-console-start/src/main/resources/application.properties 中 repeat.repeat.url=http://127.0.0.1:12580/sandbox/default/module/http/repeater/repeat 端口号改成 12580
2、源码文件中 ConfigFacadeApi 类,以下两个地方改成如下
// 白名单列表
config.setHttpEntrancePatterns(Lists.newArrayList("/crmredis/.*$"));
// java 入口方法
behaviors.add(new Behavior("yxitest.controllers.CrmRedisController", "getVa"));
3、 ~/.sandbox-module/cfg 下的 repeater.properties 文件中的字段改成 false,如下
是否开启脱机工作模式
repeat.standalone.mode=false
4、启动 repeater-console 服务 sandbox-repeater/jvm-sandbox-repeater-master/repeater-console 下的 java -jar repeater-console-start/target/*.jar
5、~/sandbox/bin 下,使用 sh sandbox.sh -p 5119 -P 12580 命令
说明:5119 为自己的服务进程
现在出现一个报错,不太理解是什么原因,求教
2020-02-05 22:41:00 ERROR Error occurred serialize
com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.SerializeException: [Error-1001]-hessian-serialize-error
at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.HessianSerializer.serialize(HessianSerializer.java:43)
at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.AbstractSerializerAdapter.serialize2String(AbstractSerializerAdapter.java:30)
at com.alibaba.jvm.sandbox.repeater.plugin.core.wrapper.SerializerWrapper.inTimeSerialize(SerializerWrapper.java:102)
at com.alibaba.jvm.sandbox.repeater.plugin.core.impl.api.DefaultEventListener.doBefore(DefaultEventListener.java:170)
at com.alibaba.jvm.sandbox.repeater.plugin.core.impl.api.DefaultEventListener.onEvent(DefaultEventListener.java:114)
at com.alibaba.jvm.sandbox.core.enhance.weaver.EventListenerHandlers.handleEvent(EventListenerHandlers.java:102)
at com.alibaba.jvm.sandbox.core.enhance.weaver.EventListenerHandlers.handleOnBefore(EventListenerHandlers.java:342)
at com.alibaba.jvm.sandbox.core.enhance.weaver.EventListenerHandlers.onBefore(EventListenerHandlers.java:565)
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 java.com.alibaba.jvm.sandbox.spy.Spy.spyMethodOnBefore(Spy.java:193)
at yxitest.controllers.CrmRedisController.getVa(CrmRedisController.java)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:111)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:806)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2351)
at com.alibaba.ttl.TtlRunnable.run(TtlRunnable.java:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/Marker
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at com.caucho.hessian.io.JavaSerializer.getWriteReplace(JavaSerializer.java:161)
at com.caucho.hessian.io.SerializerFactory.loadSerializer(SerializerFactory.java:310)
at com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:253)
at com.caucho.hessian.io.SerializerFactory.getObjectSerializer(SerializerFactory.java:208)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:463)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:169)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.ArraySerializer.writeObject(ArraySerializer.java:69)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:169)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.CollectionSerializer.writeObject(CollectionSerializer.java:117)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:296)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:215)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:174)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.BasicSerializer.writeObject(BasicSerializer.java:303)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.alibaba.jvm.sandbox.repeater.plugin.core.serialize.HessianSerializer.serialize(HessianSerializer.java:39)
... 56 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.slf4j.Marker
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.alibaba.jvm.sandbox.agent.SandboxClassLoader.loadClass(SandboxClassLoader.java:68)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 123 common frames omitted