我尝试使用jhipster创建项目。看起来不错,但是如何在热重载模式下运行项目,因此我不需要在每次更改java时重新启动应用程序服务器。
我尝试在jrebel上运行jhipster项目,但是我收到了这个错误。看起来jrebel无法处理弹簧启动Yaml
JRebel-SDK-CBP: ERROR Class 'org.springframework.boot.env.YamlPropertySourceLoader' could not be processed by org.zeroturnaround.javarebel.integration.spring.cbp.YamlPropertySourceLoaderCBP@org.apache.catalina.loader.WebappClassLoader@3413e5b7: org.zeroturnaround.bundled.javassist.CannotCompileException: [source error] no such class: YamlPropertiesFactoryBean
at org.zeroturnaround.bundled.javassist.CtNewMethod.make(SourceFile:79)
at org.zeroturnaround.bundled.javassist.CtNewMethod.make(SourceFile:45)
at org.zeroturnaround.javarebel.integration.spring.cbp.YamlPropertySourceLoaderCBP.process(YamlPropertySourceLoaderCBP.java:35)
at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(SourceFile:66)
at com.zeroturnaround.javarebel.asT.a(SourceFile:257)
at com.zeroturnaround.javarebel.asT.a(SourceFile:246)
at com.zeroturnaround.javarebel.asT.a(SourceFile:230)
at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(SourceFile:30)
at com.zeroturnaround.javarebel.asa.transform(SourceFile:76)
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2452)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1264)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1147)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:130)
at org.springframework.core.io.support.SpringFactoriesLoader.loadFactories(SpringFactoriesLoader.java:91)
at org.springframework.boot.env.PropertySourcesLoader.<init>(PropertySourcesLoader.java:64)
at org.springframework.boot.env.PropertySourcesLoader.<init>(PropertySourcesLoader.java:53)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:300)
at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:173)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:144)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:137)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:126)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:100)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:59)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:286)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:143)
at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:89)
at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:51)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5185)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: compile error: no such class: YamlPropertiesFactoryBean
at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.searchImports(SourceFile:468)
at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupClass(SourceFile:412)
at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.lookupClassByJvmName(SourceFile:319)
at org.zeroturnaround.bundled.javassist.compiler.MemberResolver.resolveJvmClassName(SourceFile:512)
at org.zeroturnaround.bundled.javassist.compiler.MemberCodeGen.resolveClassName(SourceFile:1145)
at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atDeclarator(SourceFile:712)
at org.zeroturnaround.bundled.javassist.compiler.ast.Declarator.accept(SourceFile:100)
at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:351)
at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atStmnt(SourceFile:351)
at org.zeroturnaround.bundled.javassist.compiler.ast.Stmnt.accept(SourceFile:50)
at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atMethodBody(SourceFile:292)
at org.zeroturnaround.bundled.javassist.compiler.CodeGen.atMethodDecl(SourceFile:274)
at org.zeroturnaround.bundled.javassist.compiler.ast.MethodDecl.accept(SourceFile:44)
at org.zeroturnaround.bundled.javassist.compiler.Javac.compileMethod(SourceFile:169)
at org.zeroturnaround.bundled.javassist.compiler.Javac.compile(SourceFile:95)
at org.zeroturnaround.bundled.javassist.CtNewMethod.make(SourceFile:74)
答案 0 :(得分:0)
此错误意味着JRebel在Spring库中发现了一些意外的错误。在当前情况下,类YamlPropertiesFactoryBean缺失。 该文件必须位于spring-beans.jar中。
如果项目中包含spring-beans.jar和类YamlPropertiesFactoryBean,请发送电子邮件至support@zeroturnaround.com,以便对所有Spring框架库版本进行更深入的调查
答案 1 :(得分:0)
当我使用Jrebel到6.0.0时发生此错误 在将Jrebel版本更新到6.1.0之后,我收到了此错误
org.springframework.boot.context.embedded.tomcat.ServletContextInitializerLifecycleListener - Error starting Tomcat context: org.springframework.beans.factory.BeanCreationException
我通过在VM Arguments(eclipse)添加-XX:MaxPermSize = 512m来解决这个问题
感谢ZT(zeroturnaround)支持