信小呆 2018-11-07 15:32 采纳率: 0%
浏览 1991

springboot总使用maven中的springloader热部署遇到的问题

[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.bjsxt:20-spring-boot-springloader >----------------
[INFO] Building 20-spring-boot-springloader 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) > test-compile @ 20-spring-boot-springloader >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 20-spring-boot-springloader ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 20-spring-boot-springloader ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 20-spring-boot-springloader ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 20-spring-boot-springloader ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) < test-compile @ 20-spring-boot-springloader <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) @ 20-spring-boot-springloader ---
[INFO] Attaching agents: [C:\Users\LiYong.m2\repository\org\springframework\springloaded\1.2.5.RELEASE\springloaded-1.2.5.RELEASE.jar]
java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:110)
at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:560)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:374)
at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:650)
at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:547)
Caused by: java.lang.IllegalArgumentException
at sl.org.objectweb.asm.ClassReader.(Unknown Source)
at sl.org.objectweb.asm.ClassReader.(Unknown Source)
at org.springsource.loaded.TypeDescriptorExtractor.extract(TypeDescriptorExtractor.java:49)
at org.springsource.loaded.TypeRegistry.getDescriptorFor(TypeRegistry.java:332)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptorFor(TypeDescriptorExtractor.java:139)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.findTypeDescriptor(TypeDescriptorExtractor.java:155)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.walkHierarchyForCatchersAndSuperDispatchers(TypeDescriptorExtractor.java:168)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.computeCatchersAndSuperdispatchers(TypeDescriptorExtractor.java:237)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptor(TypeDescriptorExtractor.java:94)
at org.springsource.loaded.TypeDescriptorExtractor.extract(TypeDescriptorExtractor.java:52)
at org.springsource.loaded.TypeRegistry.addType(TypeRegistry.java:1090)
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:335)
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:107)
... 16 more
11�� 07, 2018 11:25:52 ���� org.springsource.loaded.agent.SpringLoadedPreProcessor preProcess
����: Unexpected problem transforming call sites
java.lang.IllegalArgumentException
at sl.org.objectweb.asm.ClassReader.(Unknown Source)
at sl.org.objectweb.asm.ClassReader.(Unknown Source)
at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:344)
at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:99)
at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:998)
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:357)
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:107)
at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:560)
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1101)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:206)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:562)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:611)
at java.base/java.lang.Class.forName(Class.java:450)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:851)
at java.base/java.util.ServiceLoader.access$600(ServiceLoader.java:390)
at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1076)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:81)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:78)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.(CLDRLocaleProviderAdapter.java:78)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.lang.Class.newInstance(Class.java:560)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:176)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:279)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:250)
at java.base/java.util.Calendar.createCalendar(Calendar.java:1692)
at java.base/java.util.Calendar.getInstance(Calendar.java:1660)
at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:675)
at java.base/java.text.SimpleDateFormat.(SimpleDateFormat.java:619)
at java.base/java.text.SimpleDateFormat.(SimpleDateFormat.java:598)
at ch.qos.logback.core.util.CachingDateFormatter.(CachingDateFormatter.java:33)
at ch.qos.logback.classic.layout.TTLLLayout.(TTLLLayout.java:25)
at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273)
at org.springframework.boot.SpringApplication.(SpringApplication.java:179)
at com.rjxy.App.main(App.java:9)

Exception in thread "main" java.util.ServiceConfigurationError: sun.util.locale.provider.LocaleDataMetaInfo: Unable to load sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:853)
at java.base/java.util.ServiceLoader.access$600(ServiceLoader.java:390)
at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1076)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:81)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:78)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.(CLDRLocaleProviderAdapter.java:78)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.lang.Class.newInstance(Class.java:560)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:176)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:279)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:250)
at java.base/java.util.Calendar.createCalendar(Calendar.java:1692)
at java.base/java.util.Calendar.getInstance(Calendar.java:1660)
at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:675)
at java.base/java.text.SimpleDateFormat.(SimpleDateFormat.java:619)
at java.base/java.text.SimpleDateFormat.(SimpleDateFormat.java:598)
at ch.qos.logback.core.util.CachingDateFormatter.(CachingDateFormatter.java:33)
at ch.qos.logback.classic.layout.TTLLLayout.(TTLLLayout.java:25)
at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:273)
at org.springframework.boot.SpringApplication.(SpringApplication.java:179)
at com.rjxy.App.main(App.java:9)
Caused by: java.lang.LinkageError: loader (instance of jdk/internal/loader/ClassLoaders$PlatformClassLoader): attempted duplicate class definition for name: "sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo"
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1101)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:206)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:562)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:611)
at java.base/java.lang.Class.forName(Class.java:450)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:851)
... 36 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.858 s
[INFO] Finished at: 2018-11-07T23:25:52+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) on project 20-spring-boot-springloader: Could not exec java: Application finished with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

  • 写回答

1条回答 默认 最新

  • 你知我知皆知 2024-08-07 07:49
    关注

    以下回答参考 皆我百晓生券券喵儿 等免费微信小程序相关内容作答,并由本人整理回复。

    在使用Maven插件进行Spring Boot应用的热部署时,可能会遇到一些问题。根据您提供的信息,主要问题是:

    1. java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira:这表明应用程序无法成功地重新加载代理(agent)。这可能是由于以下原因:

      • 代理类中存在错误或异常。
      • 应用程序内部发生了错误导致代理无法正常工作。
    2. Could not exec java: Application finished with exit code: 1:这表示Java命令执行失败,可能的原因包括:

      • Java环境变量设置不正确。
      • JAVA_HOME配置不正确。
      • Java运行时不存在或不可用。

    解决这些问题的方法是:

    • 检查代理类是否有错误或异常,并修复它们。
    • 确保您的Java环境变量设置正确且JAVA_HOME配置正确。
    • 确认Java运行时路径是否存在并可访问。

    以下是针对这两个问题的一些建议和解决方案:

    1. 针对第一个问题:确保代理类没有错误或异常,并检查代理类的实现是否正确处理了异常情况。如果发现有错误,请尝试修改代理类以纠正错误。
    2. 针对第二个问题:确保Java环境变量设置正确,并确认JAVA_HOME配置无误。可以参考Java官方文档来确定正确的JAVA_HOME设置。另外,确保Java运行时路径存在并且可访问。可以使用which java命令来查看Java运行时的位置。

    希望这些帮助解决了您的问题!如果您有任何疑问或需要进一步的帮助,请随时提问。

    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀