Java lang error failed to initialize reflection provider

Добрый день обновил убунту с 17.10 до 18.04, перестала запускаться админка (utm_admin) кто-нибудь сталкивался?

dreamer-fkn

Сообщения: 11
Зарегистрирован: Вт апр 03, 2012 15:06

utm_admin не запускается на Ubuntu 18.04

Добрый день
обновил убунту с 17.10 до 18.04, перестала запускаться админка (utm_admin)
кто-нибудь сталкивался?

запускал командой
java -Djava.security.properties=security.properties -jar utm_admin.jar
в console.log:

Код: Выделить всё

user@gate3:~/utm.5.3.005$ cat console.log
08.08.2018 11:46:11:480 : DEBUG : Failed to initialize reflection provider
java.lang.Error: Failed to initialize reflection provider
        at org.garret.perst.impl.sun14.Sun14ReflectionProvider.<init>(Sun14ReflectionProvider.jav
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Metho
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstru
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegatin
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
        at java.base/java.lang.Class.newInstance(Class.java:560)
        at org.garret.perst.impl.ClassDescriptor.getReflectionProvider(ClassDescriptor.java:135)
        at org.garret.perst.impl.ClassDescriptor.locateConstructor(ClassDescriptor.java:287)
        at org.garret.perst.impl.ClassDescriptor.<init>(ClassDescriptor.java:305)
        at org.garret.perst.impl.StorageImpl.reloadScheme(StorageImpl.java:1021)
        at org.garret.perst.impl.StorageImpl.open(StorageImpl.java:997)
        at biz.netup.control.storage.impl.StorageImpl.<init>(Unknown Source)
        at biz.netup.control.storage.impl.StorageImpl.init(Unknown Source)
        at biz.netup.projects.utmadmin.Start.run(Unknown Source)
        at biz.netup.projects.utmadmin.StartAdmin.main(Unknown Source)

скрин:

Изображение



Содержание

  1. Firebase API initialization failure. (java.lang.IncompatibleClassChangeError) #24
  2. Comments
  3. Error: Failed to initialize Spring Context #85
  4. Comments
  5. Expected Behavior
  6. Current Behavior
  7. Steps to Reproduce (for bugs)
  8. Your Environment
  9. Example Configuration (xml)

Firebase API initialization failure. (java.lang.IncompatibleClassChangeError) #24

this line causing en error:

05-26 15:52:42.551 11612-11612/com.lotram.uygulamacoapp A/FirebaseApp: Firebase API initialization failure. java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.google.firebase.FirebaseApp.zza(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1714) at android.content.ContentProvider.attachInfo(ContentProvider.java:1683) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:5012) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547) at android.app.ActivityThread.access$1500(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) Caused by: java.lang.IncompatibleClassChangeError: The method ‘java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)’ was expected to be of type virtual but instead was found to be of type direct (declaration of ‘java.lang.reflect.ArtMethod’ appears in /system/framework/core-libart.jar) at com.google.firebase.iid.zzg.zzeC(Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzd.zzb(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.google.firebase.FirebaseApp.zza(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1714) at android.content.ContentProvider.attachInfo(ContentProvider.java:1683) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:5012) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547) at android.app.ActivityThread.access$1500(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 05-26 15:52:43.401 11612-11612/com.lotram.uygulamacoapp E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: assets/icudtl.dat 05-26 15:52:44.017 11612-11612/com.lotram.uygulamacoapp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lotram.uygulamacoapp, PID: 11612 java.lang.IncompatibleClassChangeError: The method ‘java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)’ was expected to be of type virtual but instead was found to be of type direct (declaration of ‘java.lang.reflect.ArtMethod’ appears in /system/framework/core-libart.jar) at com.google.firebase.iid.zzg.zzeC(Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzd.zzb(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source) at com.lotram.uygulamacoapp.MainActivity.onCreate(MainActivity.java:51) at android.app.Activity.performCreate(Activity.java:5977) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365) at android.app.ActivityThread.access$800(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 05-26 15:59:59.507 17613-17613/com.lotram.uygulamacoapp A/FirebaseApp: Firebase API initialization failure. java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.google.firebase.FirebaseApp.zza(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1714) at android.content.ContentProvider.attachInfo(ContentProvider.java:1683) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:5012) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547) at android.app.ActivityThread.access$1500(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) Caused by: java.lang.IncompatibleClassChangeError: The method ‘java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)’ was expected to be of type virtual but instead was found to be of type direct (declaration of ‘java.lang.reflect.ArtMethod’ appears in /system/framework/core-libart.jar) at com.google.firebase.iid.zzg.zzeC(Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzd.zzb(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.google.firebase.FirebaseApp.zza(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) at com.google.firebase.FirebaseApp.zzbu(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) at android.content.ContentProvider.attachInfo(ContentProvider.java:1714) at android.content.ContentProvider.attachInfo(ContentProvider.java:1683) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:5012) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4607) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547) at android.app.ActivityThread.access$1500(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 05-26 16:00:00.275 17613-17613/com.lotram.uygulamacoapp E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: assets/icudtl.dat 05-26 16:00:00.694 17613-17613/com.lotram.uygulamacoapp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lotram.uygulamacoapp, PID: 17613 java.lang.IncompatibleClassChangeError: The method ‘java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)’ was expected to be of type virtual but instead was found to be of type direct (declaration of ‘java.lang.reflect.ArtMethod’ appears in /system/framework/core-libart.jar) at com.google.firebase.iid.zzg.zzeC(Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzg. (Unknown Source) at com.google.firebase.iid.zzd.zzb(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source) at com.google.firebase.messaging.FirebaseMessaging.getInstance(Unknown Source) at com.lotram.uygulamacoapp.MainActivity.onCreate(MainActivity.java:64) at android.app.Activity.performCreate(Activity.java:5977) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365) at android.app.ActivityThread.access$800(ActivityThread.java:148) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5272) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)

my app/build.gradle

and my project/build.gradle

The text was updated successfully, but these errors were encountered:

@iboylmz try updating your dependency to compile ‘com.google.firebase:firebase-messaging:9.0.2’ , I believe this bug was fixed in the patches between 9.0.0 and 9.0.2 .

@iboylmz closing this issue, please comment if the fix above does not work for you.

Источник

Error: Failed to initialize Spring Context #85

Expected Behavior

It is expected that the plugins install fine without error, or at least known errors.

Current Behavior

Error when installing webhook rest plugin.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webHookTeamCityRestApiZipPluginFixer’ defined in Byte array resource [plugin: tcWebHooks-rest-api#tcwebhooks-rest-api-1.1-alpha13.203.278-jar-with-dependencies.jar!/META-INF/build-server-plugin-RESTListener.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Illegal character in opaque part at index 11: jar:file:d:TeamCitybin..webappsROOTWEB-INFpluginsrest-api.zip at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:102) at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at jetbrains.buildServer.util.EventDispatcher$3.run(EventDispatcher.java:126) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:71) at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:120) at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:70) at com.sun.proxy.$Proxy25.pluginClassesLoaded(Unknown Source) at jetbrains.buildServer.plugins.PluginManagerImpl$2.visitPlugin(PluginManagerImpl.java:140) at jetbrains.buildServer.plugins.PluginsCollection.foreachLoadedPluginsAsync(PluginsCollection.java:277) at jetbrains.buildServer.plugins.PluginManagerImpl.firePluginClassesLoaded(PluginManagerImpl.java:138) at jetbrains.buildServer.plugins.PluginManagerImpl.loadPlugins(PluginManagerImpl.java:85) at jetbrains.buildServer.web.plugins.PluginManagerConfigurator.initializePlugins(PluginManagerConfigurator.java:15) at jetbrains.buildServer.web.impl.BuildServerConfigurator.loadConfiguration(BuildServerConfigurator.java:56) at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) at jetbrains.buildServer.serverSide.impl.BuildServerLifecycleProcessor.doStartup(BuildServerLifecycleProcessor.java:13) at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet$WebApplicationCreatorAndDestroyer.createApplication(TeamCityDispatcherServlet.java:22) at jetbrains.buildServer.maintenance.StartupProcessor.doApplicationStarting(StartupProcessor.java:736) at jetbrains.buildServer.maintenance.StartupProcessor.access$700(StartupProcessor.java:499) at jetbrains.buildServer.maintenance.StartupProcessor$3.call(StartupProcessor.java:14) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:86) at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:806) at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:311) at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:11) at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:93) at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java:2) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalArgumentException: Illegal character in opaque part at index 11: jar:file:d:TeamCitybin..webappsROOTWEB-INFpluginsrest-api.zip at java.net.URI.create(URI.java:852) at webhook.teamcity.server.WebHookTeamCityRestApiZipPluginFixer.doesRestApiZipFileContainJaxJars(WebHookTeamCityRestApiZipPluginFixer.java:197) at webhook.teamcity.server.WebHookTeamCityRestApiZipPluginFixer.findRestApiZipPlugins(WebHookTeamCityRestApiZipPluginFixer.java:71) 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:498) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1758) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1695) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) . 37 more Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 11: jar:file:d:TeamCitybin..webappsROOTWEB-INFpluginsrest-api.zip at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.checkChars(URI.java:3021) at java.net.URI$Parser.parse(URI.java:3058) at java.net.URI. (URI.java:588) at java.net.URI.create(URI.java:850) . 46 more

Steps to Reproduce (for bugs)

  1. Fresh Windows Install of Teamcity 2017.2.1 (build 50732)
  2. Upload Plugins tcWebHooks & Rest Plugin zips
  3. Restart Teamcity Server
  4. Notice Error for the Rest Plugin

Your Environment

  • tcWebHooks Version: 1.1-alpha13.203.278
  • TeamCity Version: 2017.2.1 (build 50732)
  • TeamCity server Operating System: Windows 10
  • Are you using a WebHook Template?: no

Example Configuration (xml)

The text was updated successfully, but these errors were encountered:

Источник

Guest User

Untitled

a guest

Jul 12th, 2019

191

0

Never

Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!

  1. 12.07.2019 13:19:06:221 : DEBUG : Failed to initialize reflection provider

  2. java.lang.Error: Failed to initialize reflection provider

  3.         at org.garret.perst.impl.sun14.Sun14ReflectionProvider.<init>(Sun14ReflectionProvider.java:28)

  4.         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  5.         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

  6.         at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

  7.         at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

  8.         at java.base/java.lang.Class.newInstance(Class.java:584)

  9.         at org.garret.perst.impl.ClassDescriptor.getReflectionProvider(ClassDescriptor.java:135)

  10.         at org.garret.perst.impl.ClassDescriptor.locateConstructor(ClassDescriptor.java:287)

  11.         at org.garret.perst.impl.ClassDescriptor.<init>(ClassDescriptor.java:305)

  12.         at org.garret.perst.impl.StorageImpl.reloadScheme(StorageImpl.java:1021)

  13.         at org.garret.perst.impl.StorageImpl.open(StorageImpl.java:997)

  14.         at biz.netup.control.storage.impl.StorageImpl.<init>(Unknown Source)

  15.         at biz.netup.control.storage.impl.StorageImpl.init(Unknown Source)

  16.         at biz.netup.projects.utmadmin.Start.run(Unknown Source)

  17.         at biz.netup.projects.utmadmin.StartAdmin.main(Unknown Source)

I have tried to install the latest Spark 3.2.1 version in my local I have Java, scala as below. Also used the Hadoop 3.2 winutils in c:hadoopbin but the ‘spark-shell’ shows the below error

But when I am using Spark 3.1.2 it is working fine.

Answers are welcomed

java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
Using Scala version 2.12.10 (OpenJDK 64-Bit Server VM, Java 1.8.0_202-release)

ERROR:

C:Users******>spark-shell
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
22/01/29 14:52:06 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
22/01/29 14:52:12 ERROR SparkContext: Error initializing SparkContext.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.spark.executor.Executor.addReplClassLoaderIfNeeded(Executor.scala:909)
        at org.apache.spark.executor.Executor.<init>(Executor.scala:160)
        at org.apache.spark.scheduler.local.LocalEndpoint.<init>(LocalSchedulerBackend.scala:64)
        at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:132)
        at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:220)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:581)
        at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2690)
        at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$2(SparkSession.scala:949)
        at scala.Option.getOrElse(Option.scala:189)
        at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:943)
        at org.apache.spark.repl.Main$.createSparkSession(Main.scala:106)
        at $line3.$read$$iw$$iw.<init>(<console>:15)
        at $line3.$read$$iw.<init>(<console>:42)
        at $line3.$read.<init>(<console>:44)
        at $line3.$read$.<init>(<console>:48)
        at $line3.$read$.<clinit>(<console>)
        at $line3.$eval$.$print$lzycompute(<console>:7)
        at $line3.$eval$.$print(<console>:6)
        at $line3.$eval.$print(<console>)
        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:498)
        at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:747)
        at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1020)
        at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$1(IMain.scala:568)
        at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:36)
        at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:116)
        at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:41)
        at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:567)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:594)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:564)
        at scala.tools.nsc.interpreter.IMain.$anonfun$quietRun$1(IMain.scala:216)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.IMain.quietRun(IMain.scala:216)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$2(SparkILoop.scala:83)
        at scala.collection.immutable.List.foreach(List.scala:431)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$1(SparkILoop.scala:83)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.savingReplayStack(ILoop.scala:97)
        at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:83)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$4(SparkILoop.scala:165)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.$anonfun$mumly$1(ILoop.scala:166)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.ILoop.mumly(ILoop.scala:163)
        at org.apache.spark.repl.SparkILoop.loopPostInit$1(SparkILoop.scala:153)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$10(SparkILoop.scala:221)
        at org.apache.spark.repl.SparkILoop.withSuppressedSettings$1(SparkILoop.scala:189)
        at org.apache.spark.repl.SparkILoop.startup$1(SparkILoop.scala:201)
        at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:236)
        at org.apache.spark.repl.Main$.doMain(Main.scala:78)
        at org.apache.spark.repl.Main$.main(Main.scala:58)
        at org.apache.spark.repl.Main.main(Main.scala)
        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:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:955)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1043)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1052)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.net.URISyntaxException: Illegal character in path at index 32: spark://LAPTOP-KLU8JAI8:62255/C:classes
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.checkChars(URI.java:3021)
        at java.net.URI$Parser.parseHierarchical(URI.java:3105)
        at java.net.URI$Parser.parse(URI.java:3053)
        at java.net.URI.<init>(URI.java:588)
        at org.apache.spark.repl.ExecutorClassLoader.<init>(ExecutorClassLoader.scala:57)
        ... 70 more
22/01/29 14:52:12 ERROR Utils: Uncaught exception in thread main
java.lang.NullPointerException
        at org.apache.spark.scheduler.local.LocalSchedulerBackend.org$apache$spark$scheduler$local$LocalSchedulerBackend$$stop(LocalSchedulerBackend.scala:173)
        at org.apache.spark.scheduler.local.LocalSchedulerBackend.stop(LocalSchedulerBackend.scala:144)
        at org.apache.spark.scheduler.TaskSchedulerImpl.stop(TaskSchedulerImpl.scala:927)
        at org.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:2567)
        at org.apache.spark.SparkContext.$anonfun$stop$12(SparkContext.scala:2086)
        at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1442)
        at org.apache.spark.SparkContext.stop(SparkContext.scala:2086)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:677)
        at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2690)
        at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$2(SparkSession.scala:949)
        at scala.Option.getOrElse(Option.scala:189)
        at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:943)
        at org.apache.spark.repl.Main$.createSparkSession(Main.scala:106)
        at $line3.$read$$iw$$iw.<init>(<console>:15)
        at $line3.$read$$iw.<init>(<console>:42)
        at $line3.$read.<init>(<console>:44)
        at $line3.$read$.<init>(<console>:48)
        at $line3.$read$.<clinit>(<console>)
        at $line3.$eval$.$print$lzycompute(<console>:7)
        at $line3.$eval$.$print(<console>:6)
        at $line3.$eval.$print(<console>)
        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:498)
        at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:747)
        at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1020)
        at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$1(IMain.scala:568)
        at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:36)
        at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:116)
        at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:41)
        at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:567)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:594)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:564)
        at scala.tools.nsc.interpreter.IMain.$anonfun$quietRun$1(IMain.scala:216)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.IMain.quietRun(IMain.scala:216)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$2(SparkILoop.scala:83)
        at scala.collection.immutable.List.foreach(List.scala:431)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$1(SparkILoop.scala:83)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.savingReplayStack(ILoop.scala:97)
        at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:83)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$4(SparkILoop.scala:165)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.$anonfun$mumly$1(ILoop.scala:166)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.ILoop.mumly(ILoop.scala:163)
        at org.apache.spark.repl.SparkILoop.loopPostInit$1(SparkILoop.scala:153)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$10(SparkILoop.scala:221)
        at org.apache.spark.repl.SparkILoop.withSuppressedSettings$1(SparkILoop.scala:189)
        at org.apache.spark.repl.SparkILoop.startup$1(SparkILoop.scala:201)
        at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:236)
        at org.apache.spark.repl.Main$.doMain(Main.scala:78)
        at org.apache.spark.repl.Main$.main(Main.scala:58)
        at org.apache.spark.repl.Main.main(Main.scala)
        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:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:955)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1043)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1052)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
22/01/29 14:52:12 WARN MetricsSystem: Stopping a MetricsSystem that is not running
22/01/29 14:52:12 ERROR Main: Failed to initialize Spark session.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.spark.executor.Executor.addReplClassLoaderIfNeeded(Executor.scala:909)
        at org.apache.spark.executor.Executor.<init>(Executor.scala:160)
        at org.apache.spark.scheduler.local.LocalEndpoint.<init>(LocalSchedulerBackend.scala:64)
        at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:132)
        at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:220)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:581)
        at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2690)
        at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$2(SparkSession.scala:949)
        at scala.Option.getOrElse(Option.scala:189)
        at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:943)
        at org.apache.spark.repl.Main$.createSparkSession(Main.scala:106)
        at $line3.$read$$iw$$iw.<init>(<console>:15)
        at $line3.$read$$iw.<init>(<console>:42)
        at $line3.$read.<init>(<console>:44)
        at $line3.$read$.<init>(<console>:48)
        at $line3.$read$.<clinit>(<console>)
        at $line3.$eval$.$print$lzycompute(<console>:7)
        at $line3.$eval$.$print(<console>:6)
        at $line3.$eval.$print(<console>)
        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:498)
        at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:747)
        at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1020)
        at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$1(IMain.scala:568)
        at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:36)
        at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:116)
        at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:41)
        at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:567)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:594)
        at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:564)
        at scala.tools.nsc.interpreter.IMain.$anonfun$quietRun$1(IMain.scala:216)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.IMain.quietRun(IMain.scala:216)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$2(SparkILoop.scala:83)
        at scala.collection.immutable.List.foreach(List.scala:431)
        at org.apache.spark.repl.SparkILoop.$anonfun$initializeSpark$1(SparkILoop.scala:83)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.savingReplayStack(ILoop.scala:97)
        at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:83)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$4(SparkILoop.scala:165)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.tools.nsc.interpreter.ILoop.$anonfun$mumly$1(ILoop.scala:166)
        at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:206)
        at scala.tools.nsc.interpreter.ILoop.mumly(ILoop.scala:163)
        at org.apache.spark.repl.SparkILoop.loopPostInit$1(SparkILoop.scala:153)
        at org.apache.spark.repl.SparkILoop.$anonfun$process$10(SparkILoop.scala:221)
        at org.apache.spark.repl.SparkILoop.withSuppressedSettings$1(SparkILoop.scala:189)
        at org.apache.spark.repl.SparkILoop.startup$1(SparkILoop.scala:201)
        at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:236)
        at org.apache.spark.repl.Main$.doMain(Main.scala:78)
        at org.apache.spark.repl.Main$.main(Main.scala:58)
        at org.apache.spark.repl.Main.main(Main.scala)
        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:498)
        at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
        at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:955)
        at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
        at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
        at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1043)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1052)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.net.URISyntaxException: Illegal character in path at index 32: spark://LAPTOP-KLU8JAI8:62255/C:classes
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.checkChars(URI.java:3021)
        at java.net.URI$Parser.parseHierarchical(URI.java:3105)
        at java.net.URI$Parser.parse(URI.java:3053)
        at java.net.URI.<init>(URI.java:588)
        at org.apache.spark.repl.ExecutorClassLoader.<init>(ExecutorClassLoader.scala:57)
        ... 70 more
22/01/29 14:52:12 ERROR Utils: Uncaught exception in thread shutdown-hook-0
java.lang.ExceptionInInitializerError
        at org.apache.spark.executor.Executor.stop(Executor.scala:333)
        at org.apache.spark.executor.Executor.$anonfun$stopHookReference$1(Executor.scala:76)
        at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:214)
        at org.apache.spark.util.SparkShutdownHookManager.$anonfun$runAll$2(ShutdownHookManager.scala:188)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:2019)
        at org.apache.spark.util.SparkShutdownHookManager.$anonfun$runAll$1(ShutdownHookManager.scala:188)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.util.Try$.apply(Try.scala:213)
        at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)
        at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at org.apache.spark.shuffle.ShuffleBlockPusher$.<init>(ShuffleBlockPusher.scala:465)
        at org.apache.spark.shuffle.ShuffleBlockPusher$.<clinit>(ShuffleBlockPusher.scala)
        ... 16 more
22/01/29 14:52:12 WARN ShutdownHookManager: ShutdownHook '$anon$2' failed, java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)
        at org.apache.hadoop.util.ShutdownHookManager.executeShutdown(ShutdownHookManager.java:124)
        at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:95)
Caused by: java.lang.ExceptionInInitializerError
        at org.apache.spark.executor.Executor.stop(Executor.scala:333)
        at org.apache.spark.executor.Executor.$anonfun$stopHookReference$1(Executor.scala:76)
        at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:214)
        at org.apache.spark.util.SparkShutdownHookManager.$anonfun$runAll$2(ShutdownHookManager.scala:188)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:2019)
        at org.apache.spark.util.SparkShutdownHookManager.$anonfun$runAll$1(ShutdownHookManager.scala:188)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at scala.util.Try$.apply(Try.scala:213)
        at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:188)
        at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:178)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at org.apache.spark.shuffle.ShuffleBlockPusher$.<init>(ShuffleBlockPusher.scala:465)
        at org.apache.spark.shuffle.ShuffleBlockPusher$.<clinit>(ShuffleBlockPusher.scala)
        ... 16 more

The above error occured and I have tried with different Hadoop winutils versions also but issue persists

2018-04-18 16:21:00.308 INFO 6672 — [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2018-04-18 16:21:00.318 WARN 6672 — [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization — cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration’: Unsatisfied dependency expressed through field ‘eurekaServerBootstrap’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘eurekaServerBootstrap’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘eurekaServerBootstrap’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘peerAwareInstanceRegistry’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.eureka.registry.PeerAwareInstanceRegistry]: Factory method ‘peerAwareInstanceRegistry’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
2018-04-18 16:21:00.319 INFO 6672 — [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-04-18 16:21:00.323 WARN 6672 — [ main] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method ‘close’ failed on bean with name ‘eurekaRegistration’: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
2018-04-18 16:21:00.324 INFO 6672 — [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2018-04-18 16:21:00.338 INFO 6672 — [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2018-04-18 16:21:00.344 ERROR 6672 — [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration’: Unsatisfied dependency expressed through field ‘eurekaServerBootstrap’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘eurekaServerBootstrap’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘eurekaServerBootstrap’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘peerAwareInstanceRegistry’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.eureka.registry.PeerAwareInstanceRegistry]: Factory method ‘peerAwareInstanceRegistry’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1344) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:578) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at com.yogeshverma.service.discovery.EurekaServerApplication.main(EurekaServerApplication.java:12) [classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘eurekaServerBootstrap’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘eurekaServerBootstrap’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘peerAwareInstanceRegistry’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.eureka.registry.PeerAwareInstanceRegistry]: Factory method ‘peerAwareInstanceRegistry’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:729) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:470) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘peerAwareInstanceRegistry’ defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.eureka.registry.PeerAwareInstanceRegistry]: Factory method ‘peerAwareInstanceRegistry’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:815) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:721) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 32 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.eureka.registry.PeerAwareInstanceRegistry]: Factory method ‘peerAwareInstanceRegistry’ threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 45 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘scopedTarget.eurekaClient’ defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:353) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:384) ~[spring-cloud-context-2.0.0.M9.jar:2.0.0.M9]
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:183) ~[spring-cloud-context-2.0.0.M9.jar:2.0.0.M9]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:350) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:193) ~[spring-aop-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at com.sun.proxy.$Proxy100.getApplications(Unknown Source) ~[na:na]
at org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration.peerAwareInstanceRegistry(EurekaServerAutoConfiguration.java:164) ~[spring-cloud-netflix-eureka-server-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration$$EnhancerBySpringCGLIB$$1a9cab07.CGLIB$peerAwareInstanceRegistry$6() ~[spring-cloud-netflix-eureka-server-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration$$EnhancerBySpringCGLIB$$1a9cab07$$FastClassBySpringCGLIB$$3519a882.invoke() ~[spring-cloud-netflix-eureka-server-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration$$EnhancerBySpringCGLIB$$1a9cab07.peerAwareInstanceRegistry() ~[spring-cloud-netflix-eureka-server-2.0.0.M8.jar:2.0.0.M8]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_161]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 46 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method ‘eurekaClient’ threw exception; nested exception is java.lang.NoClassDefFoundError: com/google/common/base/Function
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 69 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:130) ~[eureka-client-1.8.7.jar:1.8.7]
at com.netflix.discovery.DiscoveryClient.(DiscoveryClient.java:269) ~[eureka-client-1.8.7.jar:1.8.7]
at org.springframework.cloud.netflix.eureka.CloudEurekaClient.(CloudEurekaClient.java:63) ~[spring-cloud-netflix-eureka-client-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.eurekaClient(EurekaClientAutoConfiguration.java:269) ~[spring-cloud-netflix-eureka-client-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$888ca045.CGLIB$eurekaClient$1() ~[spring-cloud-netflix-eureka-client-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$888ca045$$FastClassBySpringCGLIB$$3b6b6d9d.invoke() ~[spring-cloud-netflix-eureka-client-2.0.0.M8.jar:2.0.0.M8]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$888ca045.eurekaClient() ~[spring-cloud-netflix-eureka-client-2.0.0.M8.jar:2.0.0.M8]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_161]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
… 70 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161]
… 84 common frames omitted

facing the same issue.

36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

1

25.09.2018, 11:33. Показов 18907. Ответов 12


Всем привет! Возникла проблема, которую я пока не могу решить. Пир запуске jar javaFX приложения из консоли возникает java.lang.reflect.InvocationTargetException. Вот стэктрэйс полностью:

Кликните здесь для просмотра всего текста

Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl icationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javafx.fxml.LoadException:
file:/E:/Java/!Labs/ExchangeRateDemo/out/artifacts/ExchangeRateDemo_jar/ExchangeRateDemo.jar!/fxml/main.fxml

at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unkn own Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at gui.main.Main.start(Main.java:21)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run AndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run( Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Nativ e Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop $3(Unknown Source)
… 1 more
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: fileailyInfo.xml. It failed with:
DailyInfo.xml (Не удается найти указанный файл).
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWi thMex(RuntimeWSDLParser.java:265)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse (RuntimeWSDLParser.java:246)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse (RuntimeWSDLParser.java:209)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse (RuntimeWSDLParser.java:178)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL( WSServiceDelegate.java:364)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSS erviceDelegate.java:322)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSS erviceDelegate.java:231)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSS erviceDelegate.java:212)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSS erviceDelegate.java:208)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDeleg ate(ProviderImpl.java:119)
at javax.xml.ws.Service.<init>(Service.java:56)
at ru.cbr.web.DailyInfo.<init>(DailyInfo.java:40)
at gui.main.MainController.setXMLres(MainController.j ava:141)
at gui.main.MainController.initialize(MainController. java:137)
… 18 more
Caused by: java.io.FileNotFoundException: DailyInfo.xml (Не удается найти указанный файл)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/sun.net.http://www.protocol.file.FileU… ct(Unknown Source)
at java.base/sun.net.http://www.protocol.file.FileU… am(Unknown Source)
at java.base/java.net.URL.openStream(Unknown Source)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.creat eReader(RuntimeWSDLParser.java:999)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resol veWSDL(RuntimeWSDLParser.java:400)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse (RuntimeWSDLParser.java:231)
… 30 more
Exception running application gui.main.Main

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Эксперт Java

3636 / 2968 / 918

Регистрация: 05.07.2013

Сообщений: 14,220

25.09.2018, 11:37

2

Цитата
Сообщение от Njula
Посмотреть сообщение

DailyInfo.xml (Не удается найти указанный файл)

по-русски же написано



0



Njula

36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

25.09.2018, 12:14

 [ТС]

3

Находил подобные вопросы в инете. Пробовал убрать привязку контроллера из fxml и создавать его в Main:

Java
1
2
3
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/main.fxml"));
        loader.setController(new MainController());
        Parent root = loader.load();

Та же самая ошибка.
Пробовал добавить в зависимости

XML
1
2
3
4
5
<dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.1</version>
        </dependency>

Не помогло…

Добавлено через 28 минут

Цитата
Сообщение от xoraxax
Посмотреть сообщение

по-русски же написано

— да, написано. Но в intellij все работает. Проблема в том, что я сейчас не вижу упоминания этого файла в коде. Это шаблон запроса на вебсервис. Помнится я где-то прописывал к нему путь, но не в коде… Прошло некоторое время.



0



Эксперт Java

3636 / 2968 / 918

Регистрация: 05.07.2013

Сообщений: 14,220

25.09.2018, 12:23

4

Цитата
Сообщение от Njula
Посмотреть сообщение

я сейчас не вижу упоминания этого файла в коде

mvn clean install, либо лучше ищи



0



Njula

36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

25.09.2018, 12:52

 [ТС]

5

Цитата
Сообщение от xoraxax
Посмотреть сообщение

либо лучше ищи

— ага, нашел. Этот файл запроса был использован при генерации классов с помощью команды wsimport -d bin -s src DailyInfo.asmx.xml. Вот его вхождения:

Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@WebServiceClient(name = "DailyInfo", targetNamespace = "http://web.cbr.ru/", wsdlLocation = "file:DailyInfo.xml")
public class DailyInfo
    extends Service
{
 
    private final static URL DAILYINFO_WSDL_LOCATION;
    private final static WebServiceException DAILYINFO_EXCEPTION;
    private final static QName DAILYINFO_QNAME = new QName("http://web.cbr.ru/", "DailyInfo");
 
    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("file:DailyInfo.xml");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        DAILYINFO_WSDL_LOCATION = url;
        DAILYINFO_EXCEPTION = e;
    }
 
    public DailyInfo() {
        super(__getWsdlLocation(), DAILYINFO_QNAME);
    }
 
    public DailyInfo(WebServiceFeature... features) {
        super(__getWsdlLocation(), DAILYINFO_QNAME, features);
    }
 
    public DailyInfo(URL wsdlLocation) {
        super(wsdlLocation, DAILYINFO_QNAME);
    }
 
    public DailyInfo(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, DAILYINFO_QNAME, features);
    }
 
    public DailyInfo(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }
 
    public DailyInfo(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }
    }

Подскажите, пожалуйста, как сделать так, чтобы в jar он был тоже доступен.



0



115 / 100 / 52

Регистрация: 14.09.2011

Сообщений: 694

Записей в блоге: 1

25.09.2018, 13:23

6

я вам советовал бы посмотртеть
1)разархивируйте и гляньте точное местоположение и как там устроено
и вопросы отпадут сами самой



0



36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

25.09.2018, 13:36

 [ТС]

7

Цитата
Сообщение от snajper_ro
Посмотреть сообщение

как там устроено

— ну вот так там устроено… Все в куче. Пакеты, ресурсы. DalyInfo в корне. Дело в том, что я не знаю, как должно быть…

Миниатюры

Java.lang.reflect.InvocationTargetException при запуске jar
 



0



snajper_ro

115 / 100 / 52

Регистрация: 14.09.2011

Сообщений: 694

Записей в блоге: 1

25.09.2018, 13:37

8

Java
1
2
Caused by: javafx.fxml.LoadException:
file:/E:/Java/!Labs/ExchangeRateDemo/out/artifacts/ExchangeRateDemo_jar/ExchangeRateDemo.jar!/fxml/main.fxml

сравниет теперь



0



958 / 577 / 136

Регистрация: 23.05.2012

Сообщений: 7,364

25.09.2018, 13:44

9

Njula, в IDEA положить файл в ресурсы и в коде загружать classpath:... вместо file:...



0



Njula

36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

25.09.2018, 17:21

 [ТС]

10

Цитата
Сообщение от snajper_ro
Посмотреть сообщение

сравниет теперь

ну да, там main.fxml и находится…

Добавлено через 3 часа 6 минут

Цитата
Сообщение от JIeIIIa
Посмотреть сообщение

в IDEA положить файл в ресурсы и в коде загружать classpath:… вместо file:…

— он и был в ресурсах. Написал:

Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@WebServiceClient(name = "DailyInfo", targetNamespace = "http://web.cbr.ru/", wsdlLocation = "classpath:DailyInfo.xml")
public class DailyInfo
    extends Service
{
 
    private final static URL DAILYINFO_WSDL_LOCATION;
    private final static WebServiceException DAILYINFO_EXCEPTION;
    private final static QName DAILYINFO_QNAME = new QName("http://web.cbr.ru/", "DailyInfo");
 
    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("classpath:DailyInfo.xml");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        DAILYINFO_WSDL_LOCATION = url;
        DAILYINFO_EXCEPTION = e;
    }

и получил

Кликните здесь для просмотра всего текста

Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl icationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javafx.fxml.LoadException:
file:/E:/Java/!Labs/ExchangeRateDemo/out/artifacts/ExchangeRateDemo_jar/ExchangeRateDemo.jar!/fxml/main.fxml

at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unkn own Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at gui.main.Main.start(Main.java:21)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run AndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run( Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Nativ e Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop $3(Unknown Source)
… 1 more
Caused by: javax.xml.ws.WebServiceException: java.net.MalformedURLException: unknown protocol: classpath
at ru.cbr.web.DailyInfo.<clinit>(DailyInfo.java:33)
at gui.main.MainController.setXMLres(MainController.j ava:141)
at gui.main.MainController.initialize(MainController. java:137)
… 18 more
Caused by: java.net.MalformedURLException: unknown protocol: classpath
at java.base/java.net.URL.<init>(Unknown Source)
at java.base/java.net.URL.<init>(Unknown Source)
at java.base/java.net.URL.<init>(Unknown Source)
at ru.cbr.web.DailyInfo.<clinit>(DailyInfo.java:31)
… 20 more
Exception running application gui.main.Main

Добавлено через 1 минуту
JIeIIIa, я вас правильно понял?

Добавлено через 1 минуту
Уважаемый sdasdaw сказал, что причина может быть в версиях Java. Правда попытки применить различные зависимости ни к чему не привели…



0



958 / 577 / 136

Регистрация: 23.05.2012

Сообщений: 7,364

25.09.2018, 17:34

11

Njula, возможно, это поможет.



0



Njula

36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

25.09.2018, 19:01

 [ТС]

12

JIeIIIa, спасибо. Попробовал вот этот плагин:

XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<plugin>
                <groupId>org.jvnet.jax-ws-commons</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsimport</goal>
                        </goals>
                        <configuration>
                            <wsdlDirectory>src/main/resources/META-INF/client</wsdlDirectory>
                            <wsdlFiles>
                                <wsdlFile>DailyInfo.wsdl</wsdlFile>
                            </wsdlFiles>
                            <wsdlLocation>/META-INF/client/*</wsdlLocation>
                            <packageName>ru.rt.integration.rms.services</packageName>
                        </configuration>
                        <id>wsimport-generate-LoaderService</id>
                        <phase>generate-sources</phase>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>javax.xml</groupId>
                        <artifactId>webservices-api</artifactId>
                        <version>1.4</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
                    <xnocompile>false</xnocompile>
                    <verbose>true</verbose>
                    <extension>true</extension>
                </configuration>
            </plugin>

Но в wsdlLocation ни classpath ни / не принимается, только file. В итоге получил:

Кликните здесь для просмотра всего текста

Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl icationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invo ke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl. invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchAppl ication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javafx.fxml.LoadException:
file:/E:/Java/!Labs/ExchangeRateDemo/out/artifacts/ExchangeRateDemo_jar/ExchangeRateDemo.jar!/fxml/main.fxml

at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(Unkn own Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at gui.main.Main.start(Main.java:21)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run AndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$run Later$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run( Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Nativ e Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop $3(Unknown Source)
… 1 more
Caused by: javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder.newInstance(Factory Finder.java:38)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder. java:133)
at javax.xml.ws.spi.Provider.provider(Provider.java:8 2)
at javax.xml.ws.Service.<init>(Service.java:56)
at ru.cbr.web.DailyInfo.<init>(DailyInfo.java:40)
at gui.main.MainController.setXMLres(MainController.j ava:141)
at gui.main.MainController.initialize(MainController. java:137)
… 18 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(U nknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.lo adClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at javax.xml.ws.spi.FactoryFinder.newInstance(Factory Finder.java:34)
… 24 more
Exception running application gui.main.Main



0



36 / 3 / 0

Регистрация: 21.05.2018

Сообщений: 111

01.10.2018, 11:33

 [ТС]

13

Оказалось все ну очень просто. Я блуждал в поисках какого-то сложного решения, а нужно было просто написать url = DailyInfo.class.getResource(«/DailyInfo.xml»); Вот и все… Правда выдается предупреждение:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1 (file:/E:/Java/ExchangeRateDemo/out/artifacts/ExchangeRateDemo_jar/ExchangeRateDemo.jar) to method java.lang.ClassLoader.defineClass(java.lang.String ,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector$1
WARNING: Use —illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Но, думаю, что разберусь. Главное — работает).



0



Понравилась статья? Поделить с друзьями:
  • Java lang classnotfoundexception ошибка
  • Java lang classnotfoundexception как исправить
  • Java lang classcastexception как исправить
  • Java jvm used by gradle ran out of available ram mcreator ошибка
  • Java jvm crash error 11