2016-07-15 16 views
0

IIUCバネでロードすると、再デプロイせずにjavaサーバコードを変更できるようになりますが、うまくいけば長いスタックトレースがあります。どういう意味ですか?私は桟橋バネ積み重ねスタックトレース

package hello; 

import org.springframework.web.bind.annotation.RestController; 
import org.springframework.web.bind.annotation.RequestMapping; 

@RestController 
public class HelloController { 

    @RequestMapping("/") 
    public String index() { 
     return "Greetings from Spring Boot!"; 
    } 

} 

を再起動せずにリロードすることができます。しかし、私はスタックトレースを取得し、なぜ私はそれをどのように修正すればよい

18:53:09: Executing external task 'bootRun'... 
:compileJava UP-TO-DATE 
:processResources UP-TO-DATE 
:classes UP-TO-DATE 
:findMainClass 
:bootRun 

    . ____   _   __ _ _ 
/\\/___'_ __ _ _(_)_ __ __ _ \ \ \ \ 
(()\___ | '_ | '_| | '_ \/ _` | \ \ \ \ 
\\/ ___)| |_)| | | | | || (_| | )))) 
    ' |____| .__|_| |_|_| |_\__, |//// 
=========|_|==============|___/=/_/_/_/ 
:: Spring Boot ::  (v1.3.5.RELEASE) 

2016-07-15 18:53:13.710 INFO 9337 --- [   main] hello.Application      : Starting Application on dac-Latitude-E7450 with PID 9337 (/home/dac/Downloads/initial/build/classes/main started by dac in /home/dac/Downloads/initial) 
2016-07-15 18:53:13.714 INFO 9337 --- [   main] hello.Application      : No active profile set, falling back to default profiles: default 
2016-07-15 18:53:13.811 INFO 9337 --- [   main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot[email protected]221af3c0: startup date [Fri Jul 15 18:53:13 CEST 2016]; root of context hierarchy 
2016-07-15 18:53:13.986 ERROR 9337 --- [   main] org.springsource.loaded.jvm.JVM   : Problems copying method. Incompatible JVM? 

java.lang.reflect.InvocationTargetException: null 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] 
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] 
    at org.springsource.loaded.jvm.JVM.copyMethod(JVM.java:134) ~[springloaded-1.2.1.RELEASE.jar:1.2.1.RELEASE] 
    at org.springsource.loaded.ri.OriginalClassInvoker.createJavaMethod(OriginalClassInvoker.java:68) [springloaded-1.2.1.RELEASE.jar:1.2.1.RELEASE] 
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:151) [springloaded-1.2.1.RELEASE.jar:1.2.1.RELEASE] 
    at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152) [spring-core-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:292) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:232) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:168) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:321) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520) [spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at hello.Application.main(Application.java:13) [main/:na] 
Caused by: java.lang.IllegalArgumentException: Can not copy a non-root Method 
    at java.lang.reflect.Method.copy(Method.java:151) ~[na:1.8.0_91] 
    ... 25 common frames omitted 

2016-07-15 18:53:15.426 ERROR 9337 --- [   main] org.springsource.loaded.jvm.JVM   : Problems copying method. Incompatible JVM? 

ムーbuild.gradle

buildscript { 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE") 
     classpath("org.springframework:springloaded:1.2.1.RELEASE") 
    } 
} 

apply plugin: 'java' 
apply plugin: 'eclipse' 
apply plugin: 'idea' 
apply plugin: 'spring-boot' 
apply plugin: 'rebel' 

buildscript { 
    repositories { 
     mavenCentral() 
    } 

    dependencies { 
     classpath group: 'org.zeroturnaround', name: 'gradle-jrebel-plugin', version: '1.1.3' 
    } 
} 
jar { 
    baseName = 'gs-spring-boot' 
    version = '0.1.0' 
} 

repositories { 
    mavenCentral() 
} 

sourceCompatibility = 1.8 
targetCompatibility = 1.8 

dependencies { 
    // tag::jetty[] 
    compile("org.springframework.boot:spring-boot-starter-web") { 
     exclude module: "spring-boot-starter-tomcat" 
    } 
    compile("org.springframework.boot:spring-boot-starter-jetty") 
    // end::jetty[] 
    // tag::actuator[] 
    compile("org.springframework.boot:spring-boot-starter-actuator") 
    // end::actuator[] 
    compile("org.springframework.boot:spring-boot-starter-actuator") 
    testCompile("org.springframework.boot:spring-boot-starter-test") 
    testCompile("junit:junit") 

} 

// change default IntelliJ output directory for compiling classes 
idea { 
    module { 
     inheritOutputDirs = false 
     outputDir = file("$buildDir/classes/main/") 
    } 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = '2.3' 
} 

私のクラス?

+1

と関連があります(springloaded-1.2.2.BUILD-SNAPSHOT.jarからspringloaded-1.2.0.RELEASE.jarに名前を変更します)。 シンプルなgoogleは、springloaded jarについての結果を示しました。ここでは、議論があったサンプル投稿があります。https://github.com/spring-projects/spring-loaded/issues/98 –

+0

@KiranJoshiわかりません。ドキュメンテーションは役に立ちません。私は何を結合するのか分からない。 –

+1

あなたは スプリング付き 1.2.5.RELEASE

答えて

1

私の将来の参考として、これを答えとして提案しています。

1.2.1.RELEASEから1.2.5.RELEASEへの依存関係を実際に変更しました。

関連する問題