Warning messages using java azure client - java

Using azure-storage-blob-client, I see these:
10:46:38 [main] WARN JacksonVersion - Could not find version of 'jackson-annotations'.
10:46:38 [main] ERROR JacksonVersion - Version 'unknown' of package 'jackson-annotations' is not supported (older than earliest supported version - `2.10.0`), please upgrade.
10:46:38 [main] WARN JacksonVersion - Could not find version of 'jackson-core'.
10:46:38 [main] ERROR JacksonVersion - Version 'unknown' of package 'jackson-core' is not supported (older than earliest supported version - `2.10.0`), please upgrade.
10:46:38 [main] WARN JacksonVersion - Could not find version of 'jackson-databind'.
10:46:38 [main] ERROR JacksonVersion - Version 'unknown' of package 'jackson-databind' is not supported (older than earliest supported version - `2.10.0`), please upgrade.
10:46:38 [main] INFO JacksonVersion - Package versions: jackson-annotations=unknown, jackson-core=unknown, jackson-databind=unknown, jackson-dataformat-xml=2.12.5, jackson-datatype-jsr310=2.12.5, azure-core=1.21.0
10:46:38 [main] DEBUG MemberNameConverterImpl - Failed to retrieve MethodHandles used to get naming strategy. Falling back to BeanUtils.
java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.introspect.AccessorNamingStrategy.Provider
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.azure.core.implementation.jackson.MemberNameConverterImpl.<clinit>(MemberNameConverterImpl.java:55)
at com.azure.core.implementation.jackson.ObjectMapperShim.<init>(ObjectMapperShim.java:139)
at com.azure.core.implementation.jackson.ObjectMapperShim.createHeaderMapper(ObjectMapperShim.java:127)
at com.azure.core.util.serializer.JacksonAdapter.<init>(JacksonAdapter.java:75)
at com.azure.core.util.serializer.JacksonAdapter.<init>(JacksonAdapter.java:53)
at com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter(JacksonAdapter.java:111)
at com.azure.storage.blob.implementation.util.ModelHelper.<clinit>(ModelHelper.java:53)
at com.azure.storage.blob.BlobUrlParts.parse(BlobUrlParts.java:371)
at com.azure.storage.blob.BlobServiceClientBuilder.endpoint(BlobServiceClientBuilder.java:147)
at com.azure.storage.blob.BlobServiceClientBuilder.connectionString(BlobServiceClientBuilder.java:286)
Why do I get these warning messages?

Turns out one of my dependencies was a "shaded jar" including the jackson components. This shading processes apparently stripped from the jar some kind of version info of which version of jackson was defined. It could safely be ignored.

Related

IdeaIC inspect cli failed with '-changes' options

I try to use ideaIC inspect cli to check local uncommitted changes in Ubuntu.
According to website docs, whole project code inspections had been execed successfull with command bin/inspect.sh $(pwd) $(pwd)/.idea/inspectionProfiles/Project_Default.xml temp -v2.
But when I try to use -changes option like bin/inspect.sh $(pwd) $(pwd)/.idea/inspectionProfiles/Project_Default.xml temp -changes -v2 , unexpected error occurred. I found the error message in code, but I can't found any solution about it.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Starting up IntelliJ IDEA 2020.2.3 (build IC-202.7660.26) ...done.
Opening project...2021-02-26 16:41:48,634 [ 1629] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.alibaba.p3c.idea.component.AliProjectComponent)
2021-02-26 16:41:49,018 [ 2013] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=org.jetbrains.android.compose.AndroidComposeAutoDocumentation)
Feb 26, 2021 4:41:49 PM net.sourceforge.pmd.RuleSetFactory parseRuleSetNode
WARNING: RuleSet description is missing. Future versions of PMD will require it.
Feb 26, 2021 4:41:50 PM net.sourceforge.pmd.RuleSetFactory parseRuleSetNode
WARNING: RuleSet description is missing. Future versions of PMD will require it.
2021-02-26 16:41:50,181 [ 3176] WARN - tartup.impl.StartupManagerImpl - Activities registered via registerPostStartupActivity must be dumb-aware: org.jetbrains.kotlin.idea.configuration.ui.KotlinConfigurationCheckerComponent$projectOpened$1#48ae78
done.
Initializing project...Loaded profile 'Project Default' from file '/home/user/workspace/lab/mai/bigdata/home/.idea/inspectionProfiles/Project_Default.xml'
modified file/home/user/workspace/lab/mai/bigdata/home/src/main/java/com/maiscrm/bigdata/spark/app/etl/CommonIncrementalCollectionLoader.java
done.
Inspecting with profile 'Project Default'
Running first analysis stage...
Shelving changes...
2021-02-26 16:41:55,220 [ 8215] WARN - ion.impl.NotificationCollector - Notification group 'Heap Dump Analysis' is already registered in whitelist
2021-02-26 16:41:55,220 [ 8215] WARN - ion.impl.NotificationCollector - Notification group 'Low Memory' is already registered in whitelist
Running second analysis stage...
2021-02-26 16:41:55,370 [ 8365] ERROR - spection.InspectionApplication - java.lang.IllegalArgumentException: The code below uses the same GUI thread to complete operations.Running from EDT would deadlock
java.lang.RuntimeException: java.lang.IllegalArgumentException: The code below uses the same GUI thread to complete operations.Running from EDT would deadlock
at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:149)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:475)
at com.intellij.openapi.application.ex.ApplicationUtil.invokeAndWaitSomewhere(ApplicationUtil.java:160)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressInCurrentThread(CoreProgressManager.java:535)
at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:335)
at com.intellij.openapi.vcs.changes.CallbackData.lambda$createInteractive$3(CallbackData.java:85)
at com.intellij.openapi.vcs.changes.UpdateRequestsQueue.invokeAfterUpdate(UpdateRequestsQueue.java:177)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.invokeAfterUpdate(ChangeListManagerImpl.java:356)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.invokeAfterUpdate(ChangeListManagerImpl.java:344)
at com.intellij.codeInspection.InspectionApplication.run(InspectionApplication.java:235)
at com.intellij.codeInspection.InspectionApplication.execute(InspectionApplication.java:140)
at com.intellij.codeInspection.InspectionApplication.startup(InspectionApplication.java:107)
at com.intellij.codeInspection.InspectionMain.main(InspectionMain.java:99)
at com.intellij.openapi.application.ApplicationStarter.main(ApplicationStarter.java:62)
at com.intellij.idea.ApplicationLoader$startApp$8.run(ApplicationLoader.kt:231)
at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1085)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
at com.intellij.idea.ApplicationLoader$startApp$nonEdtExecutor$1.execute(ApplicationLoader.kt:131)
at java.base/java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:568)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1069)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1742)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:215)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:26)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:194)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:186)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: The code below uses the same GUI thread to complete operations.Running from EDT would deadlock
at com.intellij.openapi.projectRoots.impl.UnknownSdkInspectionCommandLineConfigurator$configureProject$1.invokeSuspend(UnknownSdkInspectionCommandLineConfigurator.kt:38)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:272)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.intellij.openapi.projectRoots.impl.UnknownSdkInspectionCommandLineConfigurator.configureProject(UnknownSdkInspectionCommandLineConfigurator.kt:37)
at com.intellij.codeInspection.InspectionApplication.configureProject(InspectionApplication.java:350)
at com.intellij.codeInspection.InspectionApplication.lambda$runUnderProgress$21(InspectionApplication.java:574)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.intellij.codeInspection.InspectionApplication.runUnderProgress(InspectionApplication.java:573)
at com.intellij.codeInspection.InspectionApplication.runAnalysis(InspectionApplication.java:373)
at com.intellij.codeInspection.InspectionApplication.runAnalysisOnScope(InspectionApplication.java:343)
at com.intellij.codeInspection.InspectionApplication.lambda$run$4(InspectionApplication.java:241)
at com.intellij.openapi.vcs.changes.Waiter.onSuccess(Waiter.java:51)
at com.intellij.openapi.progress.impl.CoreProgressManager.finishTask(CoreProgressManager.java:549)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressInCurrentThread$9(CoreProgressManager.java:535)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeAndWait$8(ApplicationImpl.java:475)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:126)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:132)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:188)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:971)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:841)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:499)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2021-02-26 16:41:55,372 [ 8367] ERROR - spection.InspectionApplication - IntelliJ IDEA 2020.2.3 Build #IC-202.7660.26
2021-02-26 16:41:55,372 [ 8367] ERROR - spection.InspectionApplication - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2021-02-26 16:41:55,372 [ 8367] ERROR - spection.InspectionApplication - OS: Linux
2021-02-26 16:41:55,372 [ 8367] ERROR - spection.InspectionApplication - Last Action:
java.lang.IllegalArgumentException: The code below uses the same GUI thread to complete operations.Running from EDT would deadlock
The issue is solved in 2020.3.2 version of IntelliJ IDEA. Related issue in JB bugtracker: https://youtrack.jetbrains.com/issue/IDEA-263195

java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled

When I run my Ktor application with gradle run then I've got the following exception:
19:21:11.795 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11
19:21:11.811 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
19:21:11.812 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
19:21:11.812 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
19:21:11.814 [main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
at io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:225)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:219)
at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:273)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:225)
at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create(NettyApplicationEngine.kt:189)
at io.ktor.server.netty.NettyApplicationEngine.<init>(NettyApplicationEngine.kt:74)
at io.ktor.server.netty.EngineMain.main(EngineMain.kt:22)
19:21:11.814 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
19:21:11.815 [main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable
java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module #557caf28
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
at java.base/java.lang.reflect.Method.invoke(Method.java:558)
at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:335)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:326)
at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:273)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:92)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:225)
at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create(NettyApplicationEngine.kt:189)
at io.ktor.server.netty.NettyApplicationEngine.<init>(NettyApplicationEngine.kt:74)
at io.ktor.server.netty.EngineMain.main(EngineMain.kt:22)
the content of build.gradle.kts file
plugins {
application
kotlin("jvm") version "1.3.61"
}
group = "io.flatmap"
version = "1.0-SNAPSHOT"
val ktor_version = "1.3.0"
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
compile("io.ktor:ktor-server-netty:$ktor_version")
compile("io.ktor:ktor-server-core:$ktor_version")
compile("ch.qos.logback:logback-classic:1.2.3")
testCompile(group = "junit", name = "junit", version = "4.12")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
}
application {
mainClassName = "io.ktor.server.netty.EngineMain"
}
I am using Zulu OpenJDK 11:
java --version
openjdk 11.0.6 2020-01-14 LTS
OpenJDK Runtime Environment Zulu11.37+17-CA (build 11.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.37+17-CA (build 11.0.6+10-LTS, mixed mode)
What am I doing wrong?
The access level of each object member cannot be increased anymore. The operation is not allowed anymore since Java 9 and has been hardly disabled in release 11.
You need to run this application with Java 8.
See https://www.oracle.com/technetwork/java/javase/9-relnote-issues-3704069.html (search for "setAccessible"). There is a new Object which must now be used to allow it again: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/AccessibleObject.html

maven dependency:purge-local-repository causing dependency resolution errors

I have a parent Jenkins job (my-build-all) that invokes 2 child-maven-build-jobs (my-services followed by my-internal-api) in serial (wait for previous to finish before starting next).
Both builds happen on same machine and they share the local repo.
my-internal-api depends on my-services.
my-internal-api is built with goals: dependency:purge-local-repository clean install.
my-internal-api fails with Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:purge-local-repository (default-cli) on project my-internal-api: Failed to refresh project dependencies for: com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT: required artifacts missing:....com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT....for the artifact:....com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT
I know for sure that at the end of my-services job, snapshot jar was built and pushed to Artifactory.
Here is the log from my-services build:
[main] INFO org....ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) # my-services ---
[main] INFO org....PlexusContainer - Installing /home/ec2-user/workspace/my/Test/1. my-service/target/my-services-1.0-r0.0-SNAPSHOT.jar to /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.jar
[main] INFO org....PlexusContainer - Installing /home/ec2-user/workspace/my/Test/1. my-service/dependency-reduced-pom.xml to /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.pom
[main] INFO org....BuildInfoClientBuilder - Deploying artifact: http://artifactory.xxx.local/artifactory/libs-snapshot-local/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.jar
[main] INFO org....BuildInfoClientBuilder - Deploying artifact: http://artifactory.xxx.local/artifactory/libs-snapshot-local/com/kashyap/my-services/1.0-r0.0-SNAPSHOT/my-services-1.0-r0.0-SNAPSHOT.pom
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org....ExecutionEventLogger - BUILD SUCCESS
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org....ExecutionEventLogger - Total time: 35.123 s
[main] INFO org....ExecutionEventLogger - Finished at: 2018-05-03T20:18:21+00:00
[main] INFO org....ExecutionEventLogger - Final Memory: 37M/432M
[main] INFO org....ExecutionEventLogger - ------------------------------------------------------------------------
[Pipeline] stage (Push Artifactory)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Push Artifactory
Proceeding
[Pipeline] publishBuildInfo
Deploying build info to: http://artifactory.xxx.local/artifactory/api/build
Build successfully deployed. Browse it in Artifactory under http://artifactory.xxx.local/artifactory/webapp/builds/my%20::%20Test%20::%201.%20my-service/125
It works fine when I:
run with -U clean install instead OR
start the jenkins job to build my-internal-api from the Jenkins UI.
Here is the log excerpt:
Started by upstream project "my/Test/0. my-build-all" build number 5
+ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.37.amzn1.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.23-31.54.amzn1.x86_64", arch: "amd64", family: "unix"
Artifactory integration is enabled
[6. my-internal-api-mainline] $ java -classpath /home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3/boot/plexus-classworlds-2.5.2.jar -Dmaven.home=/home/ec2-user/tools/hudson.tasks.Maven_MavenInstallation/M3 -DbuildInfoConfig.propertiesFile=/tmp/buildInfo2752604435492193670.properties -Dm3plugin.lib=/home/ec2-user/cache/artifactory-plugin/2.10.3 -Dclassworlds.conf=/tmp/classworlds7843212232814826583conf "-Dmaven.multiModuleProjectDirectory=/home/ec2-user/workspace/my/Test/6. my-internal-api-mainline" org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -X dependency:purge-local-repository clean install
[main] DEBUG org....DefaultUpdateCheckManager - Skipped remote request for com.kashyap:my-services:1.0-r0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date.
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Resolved artifact: com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT:project from: /home/ec2-user/.m2/repository (enhanced) Context is: project
[main] DEBUG org....DefaultUpdateCheckManager - Skipped remote request for com.kashyap:my-services:1.0-r0.0-SNAPSHOT/maven-metadata.xml, locally installed metadata up-to-date.
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Resolved artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:project from: /home/ec2-user/.m2/repository (enhanced) Context is: project
[main] INFO org....PurgeLocalRepositoryMojo - Purging artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] INFO org....PurgeLocalRepositoryMojo - Deleting: /home/ec2-user/.m2/repository/com/kashyap/my-services/1.0-r0.0-SNAPSHOT
[main] DEBUG org....DefaultArtifactResolver - com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:compile (selected for compile)
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Could not resolve artifact: com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT:project
[main] INFO org....plugin.dependency.PurgeLocalRepositoryMojo - Could not find artifact com.kashyap:my-services:pom:1.0-r0.0-SNAPSHOT
[main] INFO org.apache.maven.plugin.dependency.PurgeLocalRepositoryMojo - Resolving artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] DEBUG org....ArtifactoryEclipseRepositoryListener - [buildinfo] Could not resolve artifact: com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT:project
[main] INFO org....plugin.dependency.PurgeLocalRepositoryMojo - Could not find artifact com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] ERROR org....cli.MavenCli - Failed to execute goal org....plugins:maven-dependency-plugin:2.8:purge-local-repository (default-cli) on project my-internal-api: Failed to refresh project dependencies for: com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT: required artifacts missing:
[main] ERROR org....cli.MavenCli - com.kashyap:my-services:jar:1.0-r0.0-SNAPSHOT
[main] ERROR org....cli.MavenCli - for the artifact:
[main] ERROR org....cli.MavenCli - com.kashyap:my-internal-api:jar:1.0-r0.0-SNAPSHOT
Any idea why maven is:
finding local snapshot version of my-services to be up to date
purging/deleting it and then
complaining that it couldn't resolve it (though I think it's during the re-resolution as part of purge-local-repository goal, not as part of compile goal).

ERROR SparkContext: Error initializing SparkContext.. IntelliJ and Scala

I'm using Window 10, Scala 2.10.2, Spark 1.6.1, and Java 1.8.
Below is the code I'm trying to run.
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
object WordsCount {
def main(args: Array[String]): Unit = {
val sparkConf = new SparkConf().setAppName("SparkWordCount").setMaster("local[2]")
val sc = new SparkContext(sparkConf)
val text = sc.textFile("shortTwitter.txt")
val counts = text.flatMap(line=>line.split(" ")).map(word=>(word,1)).reduceByKey(_+_)
counts.foreach(println)
}
}
and I got the following error.
"C:\Program Files\Java\jdk1.8.0_101\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_101\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\rt.jar;C:\Users\Administrator\IdeaProjects\choi_jieun_assignment1\out\production\choi_jieun_assignment1;C:\scala\lib\jline.jar;C:\scala\lib\scalap.jar;C:\scala\lib\diffutils.jar;C:\scala\lib\akka-actors.jar;C:\scala\lib\scala-swing.jar;C:\scala\lib\scala-actors.jar;C:\scala\lib\scala-library.jar;C:\scala\lib\scala-partest.jar;C:\scala\lib\scala-reflect.jar;C:\scala\lib\scala-compiler.jar;C:\scala\lib\typesafe-config.jar;C:\scala\lib\scala-actors-migration.jar;C:\Users\Administrator\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.10.2.jar;C:\Users\Administrator\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.2.jar;C:\spark\lib\datanucleus-core-3.2.10.jar;C:\spark\lib\datanucleus-rdbms-3.2.9.jar;C:\spark\lib\spark-1.6.1-yarn-shuffle.jar;C:\spark\lib\datanucleus-api-jdo-3.2.6.jar;C:\spark\lib\spark-assembly-1.6.1-hadoop2.4.0.jar;C:\spark\lib\spark-examples-1.6.1-hadoop2.4.0.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain WordsCount
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/spark/lib/spark-assembly-1.6.1-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/spark/lib/spark-examples-1.6.1-hadoop2.4.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
16/09/14 16:03:21 INFO SparkContext: Running Spark version 1.6.1
16/09/14 16:03:22 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/09/14 16:03:22 INFO SecurityManager: Changing view acls to: Administrator
16/09/14 16:03:22 INFO SecurityManager: Changing modify acls to: Administrator
16/09/14 16:03:22 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(Administrator); users with modify permissions: Set(Administrator)
16/09/14 16:03:23 INFO Utils: Successfully started service 'sparkDriver' on port 50762.
16/09/14 16:03:23 ERROR SparkContext: Error initializing SparkContext.
java.lang.NoSuchMethodException: akka.remote.RemoteActorRefProvider.<init> (java.lang.String, akka.actor.ActorSystem$Settings, akka.event.EventStream, akka.actor.Scheduler, akka.actor.DynamicAccess)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:77)
at scala.util.Try$.apply(Try.scala:161)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:74)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:85)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:85)
at scala.util.Success.flatMap(Try.scala:200)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:85)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:546)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:111)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:104)
at org.apache.spark.util.AkkaUtils$.org$apache$spark$util$AkkaUtils$$doCreateActorSystem(AkkaUtils.scala:121)
at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:53)
at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:52)
at org.apache.spark.util.Utils$$anonfun$startServiceOnPort$1.apply$mcVI$sp(Utils.scala:1988)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
at org.apache.spark.util.Utils$.startServiceOnPort(Utils.scala:1979)
at org.apache.spark.util.AkkaUtils$.createActorSystem(AkkaUtils.scala:55)
at org.apache.spark.SparkEnv$.create(SparkEnv.scala:266)
at org.apache.spark.SparkEnv$.createDriverEnv(SparkEnv.scala:193)
at org.apache.spark.SparkContext.createSparkEnv(SparkContext.scala:288)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:457)
at WordsCount$.main(WordsCount.scala:7)
at WordsCount.main(WordsCount.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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
16/09/14 16:03:23 INFO SparkContext: Successfully stopped SparkContext
Exception in thread "main" java.lang.NoSuchMethodException: akka.remote.RemoteActorRefProvider.<init>(java.lang.String, akka.actor.ActorSystem$Settings, akka.event.EventStream, akka.actor.Scheduler, akka.actor.DynamicAccess)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getDeclaredConstructor(Class.java:2178)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:77)
at scala.util.Try$.apply(Try.scala:161)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:74)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:85)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$3.apply(DynamicAccess.scala:85)
at scala.util.Success.flatMap(Try.scala:200)
at akka.actor.ReflectiveDynamicAccess.createInstanceFor(DynamicAccess.scala:85)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:546)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:111)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:104)
at org.apache.spark.util.AkkaUtils$.org$apache$spark$util$AkkaUtils$$doCreateActorSystem(AkkaUtils.scala:121)
at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:53)
at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:52)
at org.apache.spark.util.Utils$$anonfun$startServiceOnPort$1.apply$mcVI$sp(Utils.scala:1988)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
at org.apache.spark.util.Utils$.startServiceOnPort(Utils.scala:1979)
at org.apache.spark.util.AkkaUtils$.createActorSystem(AkkaUtils.scala:55)
at org.apache.spark.SparkEnv$.create(SparkEnv.scala:266)
at org.apache.spark.SparkEnv$.createDriverEnv(SparkEnv.scala:193)
at org.apache.spark.SparkContext.createSparkEnv(SparkContext.scala:288)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:457)
at WordsCount$.main(WordsCount.scala:7)
at WordsCount.main(WordsCount.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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Process finished with exit code 1
I have been struggling for a couple of hours to solve this problem but couldn't figure out. Can someone help me out? Thanks!
Try installing the Java 7 JDK and you may have better luck. Although the release notes for Scala 2.10.2 seem to be missing, 2.10.4 doesn't support Java 8:
New ByteCode emitter based on ASM
Can target JDK 1.5, 1.6 and 1.7
Emits 1.6 bytecode by default
Old 1.5 backend is deprecated
...and even 2.11.x only has experimental Java 8 support:
The Scala 2.11.x series targets Java 6, with (evolving) experimental support for Java 8. In 2.11.1, Java 8 support is mostly limited to reading Java 8 bytecode and parsing Java 8 source. Stay tuned for more complete (experimental) Java 8 support. The next major release, 2.12, will most likely target Java 8 by default.
Also see: Can I use java 8 in an mixed scala 2.10 / java project built by sbt?

sonarqube 5.0 giving Error getting generated key or setting result to parameter object message

I am trying to use SonarQube 5.0 with Hudson 3.2.1.
Sonar runner version 2.4.
Once Hudson invokes a sonar analysis, it ends with a build failure.
SonarQube is configured with Oracle 12c database using ojdbc7.jar driver.
The log output -
[workspace] $ /opt/sonar-runner-2.4/bin/sonar-runner -Dsonar.jdbc.driver=oracle.jdbc.xa.client.OracleXADataSource -Dsonar.jdbc.url=jdbc:oracle:thin:#//host:port/URL id pass -Dsonar.host.url=http://host:port id pass -Dsonar.projectBaseDir=/basedir -Dsonar.projectName=prjName -Dsonar.projectVersion=1.0 -Dsonar.projectKey=org:prj -Dsonar.sources=.
SonarQube Runner 2.4
Java 1.7.0_75 Oracle Corporation (64-bit)
Linux 2.6.18-308.el5 amd64
INFO: Runner configuration file: /opt/sonar-runner-2.4/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Work directory: /basedir
INFO: SonarQube Server 5.0
04:04:54.792 INFO - Load global referentials...
04:04:55.100 INFO - Load global referentials done: 311 ms
04:04:55.105 INFO - User cache: /var/lib/hudson/.sonar/cache
04:04:55.116 INFO - Install plugins
04:04:55.196 INFO - Install JDBC driver
04:04:55.205 INFO - Create JDBC datasource for jdbcURL
04:04:59.095 INFO - Initializing Hibernate
04:05:01.906 INFO - Load project referentials...
04:05:02.242 INFO - Load project referentials done: 336 ms
04:05:02.242 INFO - Load project settings
04:05:02.594 INFO - Loading technical debt model...
04:05:02.616 INFO - Loading technical debt model done: 21 ms
04:05:02.622 INFO - Apply project exclusions
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 9.050s
Final Memory: 16M/242M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Error getting generated key or setting result to parameter object. Cause: java.lang.NullPointerException
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Finished: FAILURE
I have replaced the actual parameters like host,port, jdbcurl with placeholders.
Chances are that you are running Oracle 12c version 12.1.0.1.0 and using the JDBC drivers that came with it. The Oracle 12c JDBC driver that comes with 12.1.0.1.0 has a bug with the oracle.jdbc.driver.AutoKeyInfo.initMetaDataColumnIndexes() method, which is now fixed with the 12.2.0 patch. I am guessing that your error "getting generated key" is related to this issue. You should enable logging within SonarQube so that you can verify the root cause.
Full post is here.

Categories