Java agent that enables class reloading in a running JVM

Overview

Welcome to Spring-Loaded

What is Spring Loaded?

Spring Loaded is a JVM agent for reloading class file changes whilst a JVM is running. It transforms classes at loadtime to make them amenable to later reloading. Unlike 'hot code replace' which only allows simple changes once a JVM is running (e.g. changes to method bodies), Spring Loaded allows you to add/modify/delete methods/fields/constructors. The annotations on types/methods/fields/constructors can also be modified and it is possible to add/remove/change values in enum types.

Spring Loaded is usable on any bytecode that may run on a JVM, and is actually the reloading system used in Grails 2,3,4 (on java 8).

Installation

1.3.0 has now been released!

1.3.0 Enables support for Grails 4.0.4+ Running on Java 8 (Java 11 is not yet supported and is in Development)

1.2.6 snapshots are in this repo area (grab the most recently built .jar): repo.spring.io

The download is the agent jar and needs no further unpacking before use.

Running with reloading

java -javaagent:<pathTo>/springloaded-{VERSION}.jar -noverify SomeJavaClass

The verifier is being turned off because some of the bytecode rewriting stretches the meaning of some of the bytecodes - in ways the JVM doesn't mind but the verifier doesn't like. Once up and running what effectively happens is that any classes loaded from jar files (dependencies) are not treated as reloadable, whilst anything loaded from .class files on disk is made reloadable. Once loaded the .class file will be watched (once a second) and should a new version appear SpringLoaded will pick it up. Any live instances of that class will immediately see the new form of the object, the instances do not need to be discarded and recreated.

No doubt that raises a lot of questions and hopefully a proper FAQ will appear here shortly! But in the meantime, here are some basic Qs and As:

Q. Does it reload anything that might change in a class file? A. No, you can't change the hierarchy of a type. Also there are certain constructor patterns of usage it can't actually handle right now.

Q. With objects changing shape, what happens with respect to reflection? A. Reflection results change over time as the objects are reloaded. For example, modifying a class with a new method and calling getDeclaredMethods() after reloading has occurred will mean you see the new method in the results. But this does mean if you have existing caches in your system that stash reflective information assuming it never changes, those will need to be cleared after a reload.

Q. How do I know when a reload has occurred so I can clear my state? A. You can write a plugin that is called when reloads occur and you can then take the appropriate action. Create an implementation of ReloadEventProcessorPlugin and then register it via SpringLoadedPreProcessor.registerGlobalPlugin(plugin). (There are other ways to register plugins, which will hopefully get some documentation!)

Q. What's the state of the codebase? A. The technology is successfully being used by Grails for reloading. It does need some performance work and a few smacks with a refactoring hammer. It needs upgrading here and there to tolerate the invokedynamic instruction and associated new constant pool entries that arrived in Java 7.

Working with the code

git clone https://github.com/spring-projects/spring-loaded

Once cloned there will be some projects suitable for import into eclipse. The main project and some test projects. One of the test projects is an AspectJ project (containing both Java and AspectJ code), and one is a Groovy project. To compile these test projects in Eclipse you will need the relevant eclipse plugins:

AJDT: update site: https://download.eclipse.org/tools/ajdt/42/dev/update Groovy-Eclipse: update site: https://dist.springsource.org/snapshot/GRECLIPSE/e4.2/

After importing them you can run the tests. There are two kinds of tests, hand crafted and generated. Running all the tests including the generated ones can take a while. To run just the hand crafted ones supply this to the JVM when launching the tests:

-Dspringloaded.tests.generatedTests=false

NOTE: When running the tests you need to pass -noverify to the JVM also.

Two launch configurations are already included if you are importing these projects into eclipse, which run with or without the generated tests.

A gradle build script is included, run './gradlew build' to rebuild the agent - it will be created as something like: springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT.jar

Can I contribute?

Sure! This is based on the original Spring Source Project work done by Andy Clement. As Spring was moving away from spring-loaded in favor of spring-dev-tools (a more basic alternative), Community efforts were made to update spring-loaded to work in more recent builds of Grails.

Comments
  • The type registry does not know about type id

    The type registry does not know about type id

    I'm receiving the following exception when using hot-reload with the Lettuce Redis library:

    Caused by: java.lang.IllegalStateException: The type registry TypeRegistry(id=1346265082,loader=java.net.URLClassLoader) does not know about type id 901
        at org.springsource.loaded.TypeRegistry.getReloadableType(TypeRegistry.java:1688)
        at org.springsource.loaded.TypeRegistry.idyrun(TypeRegistry.java:1572)
        at com.lambdaworks.redis.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:182)
        at com.lambdaworks.redis.protocol.RedisStateMachine.decode(RedisStateMachine.java:157)
        at com.lambdaworks.redis.protocol.CommandHandler.decode(CommandHandler.java:154)
        at com.lambdaworks.redis.protocol.CommandHandler.channelRead(CommandHandler.java:138)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
        ... 1 more
    

    Here is the line in question:

    protected void safeSet(CommandOutput<K, V, ?> output, ByteBuffer bytes, RedisCommand<K, V, ?> command) {
        safeSet(() -> output.set(bytes), command);
    }
    
    opened by yissachar 38
  • EnableWebSecurity Exception - RC4 with springloaded-1.2.0.BUILD-SNAPSHOT.jar

    EnableWebSecurity Exception - RC4 with springloaded-1.2.0.BUILD-SNAPSHOT.jar

    Hi,

    I develop JHipster (https://github.com/jhipster/generator-jhipster) and yesterday I tried to upgrade our projet to 1.0.0.RC4 and I have an big issue when springloaded 1.2.0 is used (-javaagent:spring_loaded/springloaded-1.2.0.BUILD-SNAPSHOT.jar -noverify)

    In this project, we have a SecurityConfiguration class which extends WebSecurityConfigurerAdapter. This class has two annotations @Configuration and @EnableWebSecurity.

    When the application is started, I got the an exception. After some researches, I found that the autowired annotation on the setObjectPostProcessor method of the parent class is not called. If I override the setObjectPostProcessor in the SecurityConfiguration and like this, the application starts.

    @Autowired public void setObjectPostProcessor(ObjectPostProcessor objectPostProcessor) { super.setObjectPostProcessor(objectPostProcessor); } Here is the exeption

    [ERROR] org.apache.catalina.core.ContainerBase - A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.7.0_51] at java.util.concurrent.FutureTask.get(FutureTask.java:188) [na:1.7.0_51] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.52.jar:7.0.52] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) [tomcat-embed-core-7.0.52.jar:7.0.52] ... 6 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.servlet.Filter org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalStateException: org.springframework.security.config.annotation.ObjectPostProcessor is a required bean. Ensure you have used @EnableWebSecurity and @Configuration at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:591) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getOrderedBeansOfType(EmbeddedWebApplicationContext.java:367) ~[spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:268) ~[spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213) ~[spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.tomcat.ServletContextInitializerLifecycleListener.lifecycleEvent(ServletContextInitializerLifecycleListener.java:54) ~[spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] ... 6 common frames omitted Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.servlet.Filter org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalStateException: org.springframework.security.config.annotation.ObjectPostProcessor is a required bean. Ensure you have used @EnableWebSecurity and @Configuration at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:188) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:580) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] ... 22 common frames omitted Caused by: java.lang.IllegalStateException: org.springframework.security.config.annotation.ObjectPostProcessor is a required bean. Ensure you have used @EnableWebSecurity and @Configuration at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter$1.postProcess(WebSecurityConfigurerAdapter.java:68) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:165) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:273) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at com.mycompany.myapp.config.SecurityConfiguration.init(SecurityConfiguration.java) ~[classes/:na] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:58) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at com.mycompany.myapp.config.SecurityConfiguration.init(SecurityConfiguration.java) ~[classes/:na] at com.mycompany.myapp.config.SecurityConfiguration$$EnhancerBySpringCGLIB$$68811ac8.init() ~[spring-core-4.0.2.RELEASE.jar:na] at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:369) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:322) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:92) ~[spring-security-config-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$3a7174c9.CGLIB$springSecurityFilterChain$1() ~[spring-core-4.0.2.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$3a7174c9$$FastClassBySpringCGLIB$$ec6705e6.invoke() ~[spring-core-4.0.2.RELEASE.jar:3.2.1.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:312) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$3a7174c9.springSecurityFilterChain() ~[spring-core-4.0.2.RELEASE.jar:3.2.1.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254) ~[springloaded.jar:1.2.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] ... 23 common frames omitted [ERROR] org.apache.catalina.core.ContainerBase - A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_51] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_51] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.(TomcatEmbeddedServletContainer.java:69) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:256) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:135) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) [spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:619) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) [spring-boot-1.0.0.RC4.jar:1.0.0.RC4] at com.mycompany.myapp.Application.main(Application.java:62) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254) [springloaded.jar:1.2.0.BUILD-SNAPSHOT] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) [idea_rt.jar:na] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) ~[na:1.7.0_51] Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.52.jar:7.0.52] ... 6 common frames omitted [INFO] com.mycompany.myapp.config.CacheConfiguration - Remove Cache Manager metrics [INFO] com.mycompany.myapp.config.CacheConfiguration - Closing Cache Manager [ERROR] com.zaxxer.hikari.HikariMBeanElf - No registered MBean for {0}. Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:135) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:619) at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) at com.mycompany.myapp.Application.main(Application.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:106) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.(TomcatEmbeddedServletContainer.java:69) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:256) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:135) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132) ... 11 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341) at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:79) ... 16 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 18 more Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 20 more Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 22 more

    opened by jmirc 31
  • Environmentally sensitive generated values for serialVersionUID and class serialization

    Environmentally sensitive generated values for serialVersionUID and class serialization

    The Groovy Remote Control allows Groovy closures to be serialized and injected into a running system. This relies on shipping serialized Java objects and .class files.

    When Spring Loaded is active in either of the JVMs involved, this does not work.

    If the client (JVM sending the closure) has Spring Loaded enabled, a NPE will be thrown on the server side when the closure object is deserialized.

    If the server has Spring Loaded enabled, a failure like the following will occur:

    Caused by: java.io.InvalidClassException: Script$_run_closure1; local class incompatible: stream classdesc serialVersionUID = -3252672982768198903, local class serialVersionUID = 1362528599794029384
    

    A similar failure will occur if both JVMs have Spring Loaded enabled.

    I have a test project that can be used for running in such a setup.

    https://github.com/alkemist/remote-control-springloaded

    opened by ldaley 22
  • GRAILS-7799 Exception - SpringBoot RC4 and springloaded-1.2.0.BUILD-SNAPSHOT.jar

    GRAILS-7799 Exception - SpringBoot RC4 and springloaded-1.2.0.BUILD-SNAPSHOT.jar

    I develop the project JHipster (https://github.com/jhipster/generator-jhipster) and yesterday I tried to upgrade our projet to 1.0.0.RC4 and I have an big issue when springloaded 1.2.0 is used (-javaagent:spring_loaded/springloaded-1.2.0.BUILD-SNAPSHOT.jar -noverify)

    After adding an RolesAllowed annotation on method in a controller class and after compiling the class, I got an exception. If I change the version of spring-boot to RC3, I don't have the issue.

    Here is the exception. [ERROR] org.springframework.boot.actuate.web.BasicErrorController - java.lang.NullPointerException GRAILS-7799: Subtype 'com.mycompany.myapp.web.rest.AccountResource$$EnhancerBySpringCGLIB$$efacef39' of reloadable type com.mycompany.myapp.web.rest.AccountResource is not reloadable: may not see changes reloaded in this hierarchy (please comment on that jira) [ERROR] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPointerException: null at java.lang.Class.isAssignableFrom(Native Method) ~[na:1.7.0_51] at org.springframework.web.servlet.mvc.method.annotation.ModelAndViewMethodReturnValueHandler.supportsReturnType(ModelAndViewMethodReturnValueHandler.java:47) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.getReturnValueHandler(HandlerMethodReturnValueHandlerComposite.java:83) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:69) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:122) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:690) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) ~[spring-webmvc-4.0.2.RELEASE.jar:4.0.2.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at com.mycompany.myapp.web.filter.gzip.GZipServletFilter.doFilter(GZipServletFilter.java:46) ~[classes/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97) ~[metrics-servlet-3.0.2.jar:3.0.2] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilter(WebRequestTraceFilter.java:115) ~[spring-boot-actuator-1.0.0.RC4.jar:1.0.0.RC4] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextFilterConfiguration$1.doFilterInternal(EndpointWebMvcAutoConfiguration.java:128) ~[spring-boot-actuator-1.0.0.RC4.jar:1.0.0.RC4] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) ~[spring-security-web-3.2.1.RELEASE.jar:3.2.1.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679) [tomcat-embed-core-7.0.52.jar:7.0.52] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

    opened by jmirc 18
  • when using with spring-boot, throws an error.

    when using with spring-boot, throws an error.

    when someone changed, Spring Loaded throws "Unable to find regeneration methods for cglib proxies - proxies will be out of date for this type" and "Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy"

    opened by mihayinoviki 13
  • Multiple server threads hang in java.util.WeakHashMap.get()

    Multiple server threads hang in java.util.WeakHashMap.get()

    I have a Grails project using these depencies:

    • Grails 3.1.11
    • Groovy 2.4.7
    • spring-loaded: 1.2.6.RELEASE
    • JDK: 1.8.0_101

    When running the Grails server in development mode (which has spring-loaded enabled), it often happens that after a few requests to the server, more and more worker threads are hanging at full CPU usage as seen in this jstack trace: spring-loaded-hang-jtrace.txt - notice the threads whose last lines are

    "qtp1426638617-60" #60 prio=5 os_prio=31 tid=0x00007fb1851ac000 nid=0xa503 runnable [0x000070000de48000]
       java.lang.Thread.State: RUNNABLE
    	at java.util.WeakHashMap.get(WeakHashMap.java:403)
    	at org.springsource.loaded.ri.ReflectiveInterceptor.getRType(ReflectiveInterceptor.java:929)
    	at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetConstructor(ReflectiveInterceptor.java:522)
    	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:83)
    	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:246)
    	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:290)
    	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
    	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3383)
    

    (Re-running jstack confirms that each hanging thread is still in the very same location, although I cannot determine at which level of that stack trace looping occurs.)

    This happens without changing any source files (i.e. I think it's not related to spring-loaded actually reloading some classes). It also never happens in production mode (where spring-loaded is disabled). In development mode, it consistently happens across 6 dev machines (Mac OS + Linux), in approx. 20% of all dev server starts. Once the dev server makes it beyond some initial requests unharmed (i.e. when all worker threads have been used at least once...?), this problem does not happen.

    It looks to me like there is probably at least some interplay between Groovy and spring-loaded that may be causing this. Has anyone else seen this? Can anyone with deeper knowledge of spring-loaded read more from the stack trace than I can? Any help is appreciated - with frequent dev server restarts during my work day, this problem quickly becomes very annoying... :-/

    opened by jonaswitt 12
  • ReloadableType can not access a member of class...

    ReloadableType can not access a member of class...

    java.lang.IllegalAccessException: Class org.springsource.loaded.ReloadableType can not access a member of class org.springframework.context.annotation.ConfigurationClassEnhancer$BeanFactoryAwareGeneratorStrategy with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:101) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:295) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:287) at java.lang.reflect.Method.invoke(Method.java:476) at org.springsource.loaded.ReloadableType.reloadProxiesIfNecessary(ReloadableType.java:597) at org.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:446) at org.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:1014) at org.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:104) at org.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:251) at org.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:235) at java.lang.Thread.run(Thread.java:745)

    opened by marcuslange 11
  • mvn compile - generate exceptions

    mvn compile - generate exceptions

    When I did a mvn compile on the root of the project with spring-loaded enabled I did an exception (see below).

    It is not a real issue for me because I don't use it but a issue has been opened (https://github.com/jhipster/generator-jhipster/issues/187) on the Jhipster project and I think it's important for you to know that.

    If we add our JHipster plugin which reloads most of the spring beans, I got another exceptions. So I put in this issue the two generated exceptions. You can use the Jhipster sample project to reproduce it (https://github.com/jhipster/jhipster-sample-app)

    With only spring-loaded

    [ERROR] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause java.lang.NoSuchMethodError: PersistentTokenRepository.findOne(Ljava/io/Serializable;)Ljava/lang/Object; at org.springsource.loaded.TypeRegistry.iincheck(TypeRegistry.java:1397) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at com.mycompany.myapp.security.CustomPersistentRememberMeServices$$EOZtbvYW.getPersistentToken(CustomPersistentRememberMeServices.java:164) ~[na:na] at com.mycompany.myapp.security.CustomPersistentRememberMeServices$$EOZtbvYW.processAutoLoginCookie(CustomPersistentRememberMeServices.java:87) ~[na:na] at com.mycompany.myapp.security.CustomPersistentRememberMeServices$$DOZtbvYW.processAutoLoginCookie(Unknown Source) ~[na:na] at com.mycompany.myapp.security.CustomPersistentRememberMeServices.processAutoLoginCookie(CustomPersistentRememberMeServices.java) ~[classes/:na] at org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices.autoLogin(AbstractRememberMeServices.java:115) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1276) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at com.sun.proxy.$Proxy99.autoLogin(Unknown Source) ~[na:na] at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:97) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) ~[spring-web-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) ~[spring-security-web-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) ~[tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721) [tomcat-embed-core-7.0.52.jar:7.0.52] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679) [tomcat-embed-core-7.0.52.jar:7.0.52] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] [ERROR] org.springframework.boot.actuate.web.BasicErrorController - java.lang.NoSuchMethodError: PersistentTokenRepository.findOne(Ljava/io/Serializable;)Ljava/lang/Object;

    With only spring-loaded and jhipster

    [WARN] org.hibernate.jpa.internal.EntityManagerFactoryRegistry - HHH000436: Entity manager factory name (default) is already registered. If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name' [DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 6 Spring repositories updated, adding them to be reloaded [DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 4 Spring services updated, adding them to be reloaded [DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 20 Spring components updated, adding them to be reloaded [DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 5 Spring controllers updated, adding them to be reloaded [INFO] io.github.jhipster.loaded.reloader.SpringReloader - JHipster reload - New Spring bean 'class com.mycompany.myapp.config.metrics.JHipsterHealthIndicatorConfiguration' has been reloaded. [INFO] io.github.jhipster.loaded.reloader.SpringReloader - JHipster reload - New Spring bean 'class com.mycompany.myapp.config.MetricsConfiguration$GraphiteRegistry' has been reloaded. [WARN] io.github.jhipster.loaded.reloader.SpringReloader - Could not hot reload Spring bean! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityRepository': Post-processing of the FactoryBean's object failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:167) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:295) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:985) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at io.github.jhipster.loaded.reloader.SpringReloader.start(SpringReloader.java:162) [core-0.3.jar:na] at io.github.jhipster.loaded.reloader.SpringReloader.start(SpringReloader.java:97) [core-0.3.jar:na] at io.github.jhipster.loaded.JHipsterReloaderThread.batchReload(JHipsterReloaderThread.java:185) [core-0.3.jar:na] at io.github.jhipster.loaded.JHipsterReloaderThread.run(JHipsterReloaderThread.java:151) [core-0.3.jar:na] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] Caused by: java.lang.NullPointerException: null at org.springsource.loaded.MethodMember.isCatcher(MethodMember.java:250) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetDeclaredAnnotations(ReflectiveInterceptor.java:939) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetAnnotation(ReflectiveInterceptor.java:1317) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrAccessibleObjectGetAnnotation(ReflectiveInterceptor.java:1543) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrAnnotatedElementGetAnnotation(ReflectiveInterceptor.java:1533) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springframework.cache.annotation.SpringCacheAnnotationParser.getAnnotations(SpringCacheAnnotationParser.java:146) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:48) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.determineCacheOperations(AnnotationCacheOperationSource.java:131) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.findCacheOperations(AnnotationCacheOperationSource.java:115) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.computeCacheOperations(AbstractFallbackCacheOperationSource.java:142) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.getCacheOperations(AbstractFallbackCacheOperationSource.java:102) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.CacheOperationSourcePointcut.matches(CacheOperationSourcePointcut.java:39) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:225) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:118) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:88) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:376) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:339) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:164) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] ... 11 common frames omitted [INFO] io.github.jhipster.loaded.JHipsterReloaderThread - Batch reload in progress... [DEBUG] io.github.jhipster.loaded.JHipsterReloaderThread - There are 0 entities and 2 dtos updated, invalidating Jackson cache [DEBUG] io.github.jhipster.loaded.reloader.JacksonReloader - Hot reloading Jackson classes [WARN] io.github.jhipster.loaded.reloader.SpringReloader - Could not hot reload Spring bean! org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityRepository': Post-processing of the FactoryBean's object failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:167) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:295) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:985) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at io.github.jhipster.loaded.reloader.SpringReloader.start(SpringReloader.java:162) [core-0.3.jar:na] at io.github.jhipster.loaded.reloader.SpringReloader.start(SpringReloader.java:97) [core-0.3.jar:na] at io.github.jhipster.loaded.JHipsterReloaderThread.batchReload(JHipsterReloaderThread.java:185) [core-0.3.jar:na] at io.github.jhipster.loaded.JHipsterReloaderThread.run(JHipsterReloaderThread.java:151) [core-0.3.jar:na] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] Caused by: java.lang.NullPointerException: null at org.springsource.loaded.MethodMember.isCatcher(MethodMember.java:250) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetDeclaredAnnotations(ReflectiveInterceptor.java:939) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetAnnotation(ReflectiveInterceptor.java:1317) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrAccessibleObjectGetAnnotation(ReflectiveInterceptor.java:1543) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrAnnotatedElementGetAnnotation(ReflectiveInterceptor.java:1533) ~[springloaded-1.2.0.BUILD-20140325.150949-10.jar:1.2.0.BUILD-SNAPSHOT] at org.springframework.cache.annotation.SpringCacheAnnotationParser.getAnnotations(SpringCacheAnnotationParser.java:146) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.SpringCacheAnnotationParser.parseCacheAnnotations(SpringCacheAnnotationParser.java:48) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.determineCacheOperations(AnnotationCacheOperationSource.java:131) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.annotation.AnnotationCacheOperationSource.findCacheOperations(AnnotationCacheOperationSource.java:115) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.computeCacheOperations(AbstractFallbackCacheOperationSource.java:142) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.AbstractFallbackCacheOperationSource.getCacheOperations(AbstractFallbackCacheOperationSource.java:102) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.cache.interceptor.CacheOperationSourcePointcut.matches(CacheOperationSourcePointcut.java:39) ~[spring-context-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:225) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:262) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:294) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:118) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:88) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:376) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:339) ~[spring-aop-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:421) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:164) ~[spring-beans-4.0.2.RELEASE.jar:4.0.2.RELEASE] ... 11 common frames omitted

    bug 
    opened by jmirc 11
  • mvn compile error

    mvn compile error

    Changing any @controller and trying to update a spring application:

    It returns

    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy96
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy100
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy101
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy102
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy103
     > Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy87
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy104
     Reason: Type modifiers changed from=0x11 to=0x31
    
    > Spring Loaded: Cannot reload new version of com.sun.proxy.$Proxy98
     Reason: Type modifiers changed from=0x11 to=0x31
    

    After this Exception, application stills running, but getting error messages!

    19:37:21.973 [http-nio-8080-exec-2] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
    java.lang.NullPointerException
        at org.springsource.loaded.CurrentLiveVersion.getExecutorMethod(CurrentLiveVersion.java:178) ~[springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE]
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetParameterAnnotations(ReflectiveInterceptor.java:1030) ~[springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE]
        at org.springframework.core.MethodParameter.getParameterAnnotations(MethodParameter.java:415) ~[spring-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.core.MethodParameter.getParameterAnnotation(MethodParameter.java:433) ~[spring-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.core.MethodParameter.hasParameterAnnotation(MethodParameter.java:453) ~[spring-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.method.annotation.ModelFactory.findSessionAttributeArguments(ModelFactory.java:172) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.method.annotation.ModelFactory.initModel(ModelFactory.java:111) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:784) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:729) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilterInternal(ResourceUrlEncodingFilter.java:51) ~[spring-webmvc-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) ~[spring-security-web-4.0.2.RELEASE.jar:4.0.2.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at com.neblina.balero.handler.MaintenanceFilter$$EPRbtSjg.doFilter(MaintenanceFilter.java:52) ~[?:?]
        at com.neblina.balero.handler.MaintenanceFilter$$DPRbtSjg.doFilter(Unknown Source) ~[?:?]
        at com.neblina.balero.handler.MaintenanceFilter.doFilter(MaintenanceFilter.java) ~[classes/:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at com.neblina.balero.handler.IpFilter$$EPRbtSzo.doFilter(IpFilter.java:49) ~[?:?]
        at com.neblina.balero.handler.IpFilter$$DPRbtSzo.doFilter(Unknown Source) ~[?:?]
        at com.neblina.balero.handler.IpFilter.doFilter(IpFilter.java) ~[classes/:?]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:87) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar:8.0.23]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
    

    Note: Im using Interceptors and custom filters (com.neblina.balero.handler), i think maybe it's the problem.

    Guide to reproduce.

    1. Compile in development mode
    $ mvn spring-boot:run -P dev
    
    1. Edit any @controller (com.neblina.balero.web)
    $ mvn compile
    

    Documentation: https://github.com/neblina-software/balerocms-enterprise/blob/master/docs/README.md

    Regards!

    opened by neblina-software 10
  • Bug when using java8 method reference

    Bug when using java8 method reference

    Hi,

    When reloaded class with the below code:

    List list = new ArrayList<>(); list.add("test3"); list.stream().collect(Collectors.toMap(String::length, Function.identity()));

    An exception is thrown:

    javax.servlet.ServletException: java.lang.RuntimeException: java.lang.NoSuchMethodException: no such method: com.example.rest.ExampleAPI$$EOqhSaWw.length(String)int/invokeStatic at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:391) at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) at com.example.utils.ReloadableJerseyServletContainer.service(ReloadableJerseyServletContainer.java) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:534) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:482) at com.example.utils.ReloadableJerseyServletContainer.doFilter(ReloadableJerseyServletContainer.java) at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:419) at com.example.utils.ReloadableJerseyServletContainer.doFilter(ReloadableJerseyServletContainer.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.example.utils.RequestFilter.doFilter(RequestFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2381) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2370) 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.RuntimeException: java.lang.NoSuchMethodException: no such method: com.example.rest.ExampleAPI$$EOqhSaWw.length(String)int/invokeStatic at org.springsource.loaded.support.Java8.emulateInvokeDynamic(Java8.java:97) at org.springsource.loaded.TypeRegistry.idyrun(TypeRegistry.java:1574) at com.example.rest.ExampleAPI$$EOqhSaWw.getCandidateSkills(ExampleAPI.java:843) 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:483) at org.springsource.loaded.ri.ReloadedTypeInvoker$2.invoke(ReloadedTypeInvoker.java:122) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1299) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372) ... 29 more Caused by: java.lang.NoSuchMethodException: no such method: com.example.rest.ExampleAPI$$EOqhSaWw.length(String)int/invokeStatic at java.lang.invoke.MemberName.makeAccessException(MemberName.java:876) at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:993) at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1379) at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:776) at org.springsource.loaded.support.Java8.callLambdaMetaFactory(Java8.java:146) at org.springsource.loaded.support.Java8.emulateInvokeDynamic(Java8.java:94) ... 55 more Caused by: java.lang.NoSuchMethodError: com.example.rest.ExampleAPI$$EOqhSaWw.length(Ljava/lang/String;)I at java.lang.invoke.MethodHandleNatives.resolve(Native Method) at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:965) at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:990) ... 59 more

    opened by amidudu 9
  • java.lang.IllegalArgumentException when change in @Controller class

    java.lang.IllegalArgumentException when change in @Controller class

    Hi team, i am using spring-loaded in my spring boot (version 1.1.0) app. When i change my code in @Service and @Repository it works fine, but when i do a change in @Controller annotated class my app stop responding after throwing below error:

    2014-06-03 13:45:17.122 ERROR 9454 --- [nio-9090-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.] with root cause

    java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either. at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.updateNamedValueInfo(AbstractNamedValueMethodArgumentResolver.java:141) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.getNamedValueInfo(AbstractNamedValueMethodArgumentResolver.java:120) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:87) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:79) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:157) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:124) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextFilterConfiguration$1.doFilterInternal(EndpointWebMvcAutoConfiguration.java:257) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:85) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1720) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:744)

    i have two types of method in @Controller annotated class, one which uses Elasticsearch Service class (as annotated @Service) (change in this method throws error) and one which is not using Service (change in this method not throws error).

    Thanks Shams

    opened by sham-hq 7
  • NoSuchMethodException is thrown by ReflectiveInterceptor.jlClassGetDeclaredConstructor which changes jdk code behavior

    NoSuchMethodException is thrown by ReflectiveInterceptor.jlClassGetDeclaredConstructor which changes jdk code behavior

    -- Test Case -- [oracle@c7 ~]$ wget https://github.com/spring-projects/spring-loaded/archive/refs/heads/master.zip [oracle@c7 ~]$ unzip -qo master.zip [oracle@c7 ~]$ cd spring-loaded-master/ [oracle@c7 spring-loaded-master]$ ./gradlew build -x test

    You may see error, hang @ <===----------> 30% EXECUTING [33s]

    :testdata-aspectj:aspectJ > Resolve dependencies of :testdata-aspectj:tools > aspectjtools-1.8.0.M1.pom

    Ctrl + C [oracle@c7 spring-loaded-master]$ grep -ir 1.8.0.M1 . ./testdata-aspectj/build.gradle:def aspectjVersion = "1.8.0.M1"

    change it to 1.8.0, since milestone repository can't be accessed!

    Run again, [oracle@c7 spring-loaded-master]$ ./gradlew build -x test [oracle@c7 spring-loaded-master]$ find . -name 'springloaded*.jar' ./springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT-sources.jar ./springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT.jar ./springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT-javadoc.jar

    [oracle@c7 spring-loaded-master]$ pwd /home/oracle/spring-loaded-master

    Create one WLS 14.1.1 domain with Oracle Jdk 1.8.0+, JAVA_OPTS="${JAVA_OPTS} -javaagent:/home/oracle/spring-loaded-master/springloaded/build/libs/springloaded-1.3.0.BUILD-SNAPSHOT.jar -noverify"

    WLS gives (tested @12.2.1.4 / 14.1.1.0)

    java.lang.reflect.InvocationTargetException
            at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at java.io.ObjectStreamClass.__sljlcgdc(ObjectStreamClass.java)
            at java.io.ObjectStreamClass.getExternalizableConstructor(ObjectStreamClass.java:1517)
            at java.io.ObjectStreamClass.access$1400(ObjectStreamClass.java:79)
            at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:517)
            at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:494)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:494)
            at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:391)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1134)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
            at weblogic.messaging.dispatcher.DispatcherWrapper.writeExternal(DispatcherWrapper.java:208)
            at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    ...
    Caused by: java.lang.NoSuchMethodException: weblogic.rmi.internal.CollocatedRemoteRef.<init>()
            at java.lang.Class.getConstructor0(Class.java:3082)
            at java.lang.Class.getDeclaredConstructor(Class.java:2178)
            at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredConstructor(ReflectiveInterceptor.java:477)
            ... 76 more
    

    -- Summary -- class weblogic.rmi.internal.CollocatedRemoteRef. class has no default constructor, when de-serialization happens:

    Agent change code behavior

    • jdk code java.io.ObjectStreamClass.getExternalizableConstructor ignored NoSuchMethodException
    • but org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredConstructor throws it out

    java.io.ObjectStreamClass.getExternalizableConstructor(ObjectStreamClass.java:1517) https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/io/ObjectStreamClass.java

    1422    /**
    1423     * Returns public no-arg constructor of given class, or null if none found.
    1424     * Access checks are disabled on the returned constructor (if any), since
    1425     * the defining class may still be non-public.
    1426     */
    1427    private static Constructor<?> getExternalizableConstructor(Class<?> cl) {
    1428        try {
    1429            Constructor<?> cons = cl.getDeclaredConstructor((Class<?>[]) null);
    1430            cons.setAccessible(true);
    1431            return ((cons.getModifiers() & Modifier.PUBLIC) != 0) ?
    1432                cons : null;
    1433        } catch (NoSuchMethodException ex) {
    1434            return null;
    1435        }
    1436    }
    

    Clearly, @line 1433 (not same jdk version, line # is different) get catched & ignored. But java.io.ObjectStreamClass get instrumented by default (And Yes, commenting out line 100~101 will supress this error, https://github.com/spring-projects/spring-loaded/blob/master/springloaded/src/main/java/org/springsource/loaded/agent/SpringLoadedPreProcessor.java

     98 // Related to serialization
     99 // TODO [serialization] Caches in ObjectStreamClass for descriptors, need clearing on reload
    100 systemClassesContainingReflection.add("java/io/ObjectStreamClass");
    101 systemClassesContainingReflection.add("java/io/ObjectStreamClass$EntryFuture");
    
    

    The code path changes to

    java.lang.Exception: @@@ by dev, clazz = weblogic.rmi.internal.CollocatedRemoteRef
            at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredConstructor(ReflectiveInterceptor.java:475)
            at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at java.io.ObjectStreamClass.__sljlcgdc(ObjectStreamClass.java)
            at java.io.ObjectStreamClass.getExternalizableConstructor(ObjectStreamClass.java:1517)
    
    

    ReflectiveInterceptor.jlClassGetDeclaredConstructor throws java.lang.NoSuchMethodException out, https://github.com/spring-projects/spring-loaded/blob/master/springloaded/src/main/java/org/springsource/loaded/ri/ReflectiveInterceptor.java

    471 public static Constructor<?> jlClassGetDeclaredConstructor(Class<?> clazz, Class<?>... params)
    472       throws SecurityException,
    473       NoSuchMethodException {**
    474     ReloadableType rtype = getRType(clazz);
    475     if (rtype == null) {
    476       // Non reloadable type
    477       Constructor<?> c = clazz.getDeclaredConstructor(params);  << Here !**
    478       return c;
    479     } 
    
    opened by mingxhu 0
  • Can Spring Loaded load Protobuf generated files?

    Can Spring Loaded load Protobuf generated files?

    I wonder if it is possible to use Spring Loaded to reload classes that were generated with Protocol Buffers. I've seen this issue that reports an error in the subject https://github.com/spring-projects/spring-loaded/issues/126.

    opened by markusherbert 0
  • Fixed up SpringPlugin to handle Spring 5 changes

    Fixed up SpringPlugin to handle Spring 5 changes

    When I added javaagent argument to be spring-loaded 1.3 on springboot 2.x, I get the following error - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for , this code can Fixed up SpringPlugin to handle Spring 5 changes

    opened by TerminaCoder 0
  • NoClassDefFoundError: org/objectweb/asm/Opcodes Error on running with Spring Boot 2, spring-loaded 1.3 and Java 8

    NoClassDefFoundError: org/objectweb/asm/Opcodes Error on running with Spring Boot 2, spring-loaded 1.3 and Java 8

    When I added javaagent argument to be spring-loaded 1.3, I get the following error -

    Exception in thread "main" java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.(ClassPreProcessorAgentAdapter.java:50) at org.springsource.loaded.agent.SpringLoadedAgent.(SpringLoadedAgent.java:31) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525) Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 26 more FATAL ERROR in native method: processing of -javaagent failed

    How to resolve this issue?

    opened by namankumar9 0
  • springboot+maven+jar=fail

    springboot+maven+jar=fail

    hello,My programe form springboot,maven generator jar,then it not hot reloaded.

    java -javaagent:springloaded-1.2.5.RELEASE.jar   -dspringloaded=verbose;watchJars=a-start-hot-deploy-1.0.0.jar  -jar  a-start-hot-deploy-1.0.0.jar
    
    opened by bfyxzls 0
  • Cannot support custom annotation

    Cannot support custom annotation

    Priv[] privs = target.getAnnotationsByType(Priv.class); target is a method,and hava a Priv annotation. the method "getAnnotationsByType" got a empty array

    opened by miludedeng 0
  • Owner
    Spring
    Spring
    lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game resources!

    lazy-language-loader lazy-language-loader improves loading times when changing your language by only reloading the language instead of all the game re

    Shalom Ademuwagun 7 Sep 7, 2022
    Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention

    Beanmapper Beanmapper is a Java library for mapping dissimilar Java classes with similar names. The use cases for Beanmapper are the following: mappin

    null 26 Nov 15, 2022
    A Java agent that disables platform features you don't use, before an attacker uses them against you.

    aegis4j Avoid the NEXT Log4Shell vulnerability! The Java platform has accrued a number of features over the years. Some of these features are no longe

    Daniel Gredler 14 Jan 11, 2022
    A tool which enhances your pojo, powered by java-agent.

    A tool which enhances your pojo, powered by java-agent.

    K.G. Wang 5 Oct 8, 2022
    A java apm agent based on skywalking and open-telemetry.

    Hermes是提供给Java应用使用的Apm解决方案。 基于Apache Skywalking Agent Core. 复用了对于byte-buddy的封装 复用了logging日志模块 复用了config配置 复用了BootService 做了一些优化定制 Tracing协议基于Open-tele

    道君 6 Dec 7, 2021
    Blazed Café is a library for BlazeOS that enables and improves Java functionality for the IgniteBook platform.

    By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

    Sean P. Myrick V19.1.7.2 2 Sep 5, 2022
    Kong agent for Apache SkyWalking

    Apache SkyWalking Kong Agent SkyWalking Kong agent built on SkyWalking Nginx Lua agent to trace Kong API gateway for Apache SkyWalking APM. Usage Inst

    The Apache Software Foundation 23 Nov 20, 2022
    An example spring boot app to try out with a Parca Agent deployment.

    Spring boot example This repo is an example for how a Java application can be profiled with Parca Agent. First deploy Parca and Parca Agent as usual,

    Parca 1 Mar 9, 2022
    An agent to hotpatch the log4j RCE from CVE-2021-44228.

    Log4jHotPatch This is a tool which injects a Java agent into a running JVM process. The agent will attempt to patch the lookup() method of all loaded

    null 493 Dec 13, 2022
    An extension for Keycloak, that enables web-based sign in with Apple and token exchange

    Apple Identity Provider for Keycloak ?? This repository represents an extension for Keycloak, which enables Sign in with Apple for web-based applicati

    Klaus Betz 58 Dec 29, 2022
    A manager tool to categorize game assets such as images and sounds/music. The tool enables you to tag these files, so that finding them by tags allows fast searches.

    BtAssetManager This application allows you to easily categorize large amounts of image and sound files. You can apply tags to each individual file to

    null 21 Sep 15, 2022
    Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats.

    Classpy Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats. Inspiration This t

    null 1k Dec 17, 2022
    Android application made during an introduction class to mobile application development.

    Reflex Revolution Android application made during an introduction class to mobile application development. Contributors Hailey Savoie Carter Moore Fre

    Frederic Verret 3 Aug 27, 2022
    The MeterRegistryHolder class is designed to hold MeterRegistry as a static field.

    MeterRegistryHolder The MeterRegistryHolder class is designed to hold MeterRegistry as a static field. Goal The goal is to simplify using MeterRegistr

    Tomasz Fijałkowski 4 Sep 20, 2022
    Translating texts via Youdao eco-freely in only one class

    Youdao4J Translating texts via Youdao Translator by one class. Need GSON. Usage Youdao4J did lots of works in the background. DO NOT create morr Youda

    iceBear 8 Dec 11, 2022
    1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds

    BlockChanger 1.7 - 1.18 utility class that allows you to change blocks at blazing fast speeds Setup Just import the class to your project. Usage Playe

    null 25 Dec 23, 2022
    ScriptEngine that running java code; Real JavaScript

    Java JavaScriptEngine ScriptEngine that running java codes Real JavaScript Example import javax.script.Bindings; import javax.script.ScriptEngine; imp

    Kasuku Sakura Technologies 6 Apr 29, 2022
    Afnan007a's Original Ptero-VM made for Pterodactyl, running lightly in a .jar file.

    Ptero-VM in a JAR. This project is a Java implementation of Afnan's Ptero-VM that was made for Pterodactyl, this project was created to support a even

    Triassic 9 Oct 2, 2022