fbacchella/jrds

IllegalAccessError to jrds.JuliToLog4jHandler.<init>()V when loading old probes

Arkanosis opened this issue · 0 comments

Following 438229b, jrds.JuliToLog4jHandler.<init>()V is private. This breaks loading probes that were compiled before this commit (eg. probes from CloudView 15x.SP3 in my case, but most likely every version before that as well) with JRDS standalone:

ERROR - [jrds.HostsList] Top level starter class jrds.probe.JRDSSocketFactory failed to register: tried to access method jrds.JuliToLog4jHandler.<init>()V from class jrds.probe.JRDSSocketFactory
ERROR - Error stack: 
ERROR - java.lang.IllegalAccessError: tried to access method jrds.JuliToLog4jHandler.<init>()V from class jrds.probe.JRDSSocketFactory
        at jrds.probe.JRDSSocketFactory.<clinit>(JRDSSocketFactory.java:26)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at jrds.HostsList.configure(HostsList.java:179)
        at jrds.HostsList.<init>(HostsList.java:76)
        at jrds.Configuration.<init>(Configuration.java:50)
        at jrds.Configuration.configure(Configuration.java:20)
        at jrds.webapp.StartListener.contextInitialized(StartListener.java:67)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
        at org.eclipse.jetty.server.Server.start(Server.java:387)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
        at org.eclipse.jetty.server.Server.doStart(Server.java:354)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at jrds.standalone.Jetty.start(Jetty.java:148)
        at jrds.bootstrap.BootStrap.main(BootStrap.java:81)

I'm not sure whether using old probes with JRDS standalone is supported or not, but we do it a lot. Would it break anything to make the constructor public again?

Thanks!