我是靠谱客的博主 阔达萝莉,最近开发中收集的这篇文章主要介绍docker运行服务遇到javafx.util.Pair,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

说明:项目在服务器上部署没问题,运行时遇到** “Caused by: java.lang.ClassNotFoundException: javafx.util.Pair” **异常。

异常信息
Caused by: java.lang.TypeNotPresentException: Type javafx.util.Pair not present
2019-08-08T07:25:39.133002261Z  at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_181]
2019-08-08T07:25:39.133005023Z  at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_181]
2019-08-08T07:25:39.133007765Z  at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_181]
2019-08-08T07:25:39.133010511Z  at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68) ~[na:1.8.0_181]
2019-08-08T07:25:39.133013225Z  at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) ~[na:1.8.0_181]
2019-08-08T07:25:39.133019085Z  at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_181]
2019-08-08T07:25:39.133022173Z  at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68) ~[na:1.8.0_181]
2019-08-08T07:25:39.133024921Z  at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) ~[na:1.8.0_181]
2019-08-08T07:25:39.133027661Z  at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_181]
2019-08-08T07:25:39.133030361Z  at sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:94) ~[na:1.8.0_181]
2019-08-08T07:25:39.133033121Z  at java.lang.reflect.Executable.getGenericParameterTypes(Executable.java:283) ~[na:1.8.0_181]
2019-08-08T07:25:39.133035842Z  at java.lang.reflect.Method.getGenericParameterTypes(Method.java:283) ~[na:1.8.0_181]
2019-08-08T07:25:39.133038539Z  at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387) ~[na:1.8.0_181]
2019-08-08T07:25:39.133041245Z  at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116) ~[na:1.8.0_181]
2019-08-08T07:25:39.133043941Z  at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72) ~[na:1.8.0_181]
2019-08-08T07:25:39.133046814Z  at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56) ~[na:1.8.0_181]
2019-08-08T07:25:39.133049585Z  at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1205) ~[na:1.8.0_181]
2019-08-08T07:25:39.133052275Z  at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_181]
2019-08-08T07:25:39.133054937Z  at java.beans.Introspector.getBeanInfo(Introspector.java:262) ~[na:1.8.0_181]
2019-08-08T07:25:39.133057630Z  at java.beans.Introspector.getBeanInfo(Introspector.java:204) ~[na:1.8.0_181]
2019-08-08T07:25:39.133060433Z  at org.springframework.beans.CachedIntrospectionResults.getBeanInfo(CachedIntrospectionResults.java:248) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133063299Z  at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:273) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133066234Z  at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:177) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133069154Z  at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:174) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133072003Z  at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:248) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133075123Z  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1503) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133078278Z  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1483) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133084229Z  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1343) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133087271Z  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578) ~[spring-beans-5.0.6.RELEASE.jar!/:5.0.6.RELEASE]
2019-08-08T07:25:39.133090243Z  ... 75 common frames omitted
2019-08-08T07:25:39.133092881Z Caused by: java.lang.ClassNotFoundException: javafx.util.Pair
2019-08-08T07:25:39.133095558Z  at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_181]
2019-08-08T07:25:39.133098238Z  at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_181]
2019-08-08T07:25:39.133101054Z  at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93) ~[sentenceanalyze2service.jar:0.0.1-SNAPSHOT]
2019-08-08T07:25:39.133103866Z  at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_181]
2019-08-08T07:25:39.133106534Z  at java.lang.Class.forName0(Native Method) ~[na:1.8.0_181]
2019-08-08T07:25:39.133109223Z  at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_181]
2019-08-08T07:25:39.133111989Z  at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114) ~[na:1.8.0_181]
2019-08-08T07:25:39.133114802Z  ... 103 common frames omitted
2019-08-08T07:25:39.133117433Z

解决方案

修改Dockfile文件

修改镜像源
即:将“FROM frolvlad/alpine-oraclejdk8” 修改为 “FROM xxx.xxx.xxx.xxx:5000/gcc-jdk8”

原因:oraclejdk8镜像源可能不包含javafx.util.Pair类,修改为gcc-jdk8即可解决问题。

最后

以上就是阔达萝莉为你收集整理的docker运行服务遇到javafx.util.Pair的全部内容,希望文章能够帮你解决docker运行服务遇到javafx.util.Pair所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(62)

评论列表共有 0 条评论

立即
投稿
返回
顶部