我正在尝试连接到Google云存储,并且遇到了如下所示的问题
ERROR [Job]
Caught throwable org/threeten/bp/Duration java.lang.NoClassDefFoundError: org/threeten/bp/Duration at com.google.api.gax.retrying.RetrySettings.newBuilder(RetrySettings.java:138)
at com.google.cloud.ServiceOptions.getDefaultRetrySettingsBuilder(ServiceOptions.java:685)
at com.google.cloud.ServiceOptions.<clinit>(ServiceOptions.java:85)
at com.maf.core.order.impl.DefaultOrderService.uploadFileToGoogleCloud(DefaultOrderService.java:197)
at com.maf.core.cronjob.consginmentJob.perform(consginmentJob.java:90)
at com.maf.core.cronjob.consginmentJob.perform(consginmentJob.java:1)
at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:38)
at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1390)
at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:814)
at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:767)
at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:686)
at de.hybris.platform.util.threadpool.PoolableThread.internalRun(PoolableThread.java:208)
at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:135)
Caused by: java.lang.ClassNotFoundException: org.threeten.bp.Duration
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at de.hybris.bootstrap.loader.YURLClassLoader.loadRegisterAndResolveClass(YURLClassLoader.java:85)
at de.hybris.bootstrap.loader.YURLClassLoader.loadClass(YURLClassLoader.java:72)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
我正在尝试通过
进行身份验证Credentials credentials = GoogleCredentials.fromStream(new FileInputStream(credentialFile)).createScoped(Lists.newArrayList(GOOGLE_CLOUD_PATH));
Storage storage = StorageOptions.newBuilder().setCredentials(credentials).build().getService();