Installing sprinboot cloud failing - spring

I'm trying to install springboot cloud but i'm getting this error dnt know how to solve it. I managed to install spring successful
spring --version
Spring CLI v2.1.6.RELEASE
spring install org.springframework.cloud:spring-cloud-cli:2.0.0.BUILD-SNAPSHOT
Installing into: /usr/local/Cellar/springboot/2.1.6.RELEASE/lib/ext
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (jar:file:/usr/local/Cellar/springboot/2.1.6.RELEASE/lib/spring-boot-cli-2.1.6.RELEASE.jar!/BOOT-INF/lib/groovy-2.5.7.jar!/) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$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
And after when i'm running this command
spring encrypt mysecret --key foo
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:47)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:86)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.NoSuchMethodError: org.springframework.cloud.cli.command.encrypt.BaseEncryptOptionHandler.option(Ljava/util/Collection;Ljava/lang/String;)Ljoptsimple/OptionSpecBuilder;
at org.springframework.cloud.cli.command.encrypt.BaseEncryptOptionHandler.options(BaseEncryptOptionHandler.java:51)
at org.springframework.boot.cli.command.options.OptionHandler.getParser(OptionHandler.java:68)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:83)
at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:53)
at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:218)
at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:170)
at org.springframework.boot.cli.SpringCli.main(SpringCli.java:63)
... 8 more

Related

After the Spring boot source code is compiled, it starts to report an error in debug mode

I am trying to analyze the source code of spring boot.
I compiled the source code of spring boot 2.2.9 RELEASE, and no errors were reported. And use this version as a dependency of my test project, and the test project can be started normally in IDEA.
But when I start the project in debug mode in IDEA it produces an error.
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/collections/AbstractMutableMap
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:825)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:723)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:646)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at kotlinx.coroutines.debug.internal.DebugProbesImpl.<clinit>(DebugProbesImpl.kt:30)
at kotlinx.coroutines.debug.AgentPremain.<clinit>(AgentPremain.kt:26)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.ClassNotFoundException: kotlin.collections.AbstractMutableMap
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 17 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at ./open/src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Disconnected from the target VM, address: '127.0.0.1:64553', transport: 'socket'
Process finished with exit code 1
I've looked at many resources online, but no one seems to have encountered a similar error.
I've tried multiple variations of this, but none of them seem to work. Any ideas?
Thanks in advance.
This has been fixed in IntelliJ IDEA 2021.3 in the scope of https://youtrack.jetbrains.com/issue/KTIJ-15750
Feel free to upgrade your installation

Hive not starting up

I am trying to get hive started on my Linux system. It gives the following error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.hadoop.hive.ql.plan.TableDesc.setProperties(TableDesc.java:133)
at org.apache.hadoop.hive.ql.plan.TableDesc.<init>(TableDesc.java:71)
at org.apache.hadoop.hive.ql.plan.PlanUtils.getDefaultTableDesc(PlanUtils.java:458)
at org.apache.hadoop.hive.ql.exec.Utilities.<clinit>(Utilities.java:681)
at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:709)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:654)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:586)
at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:553)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:750)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private volatile java.lang.String java.net.URI.string accessible: module java.base does not "opens java.net" to unnamed module #3e849b9e
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at org.apache.hadoop.hive.common.StringInternUtils.<clinit>(StringInternUtils.java:57)
... 16 more
I am unable to figure out why this is happening. I even changed the JAVA version to 8 on my system, but the error persists.
I know I'm too late but here's the solution that worked for me in Intellij for the same problem:
Please add "--add-opens java. Base/java.net=ALL-UNNAMED" to your VM option.
For intellij : Open Run/debug Configurations > Create an application for your file if its already not there > Add VM Option > add this config in VM "--add-opens java. Base/java.net=ALL-UNNAMED"

Reactive version of quarkus-keycloak-admin-client extension?

Is there a reactive version of the quarkus-keycloak-admin-client extension?
When I add the dependency:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-keycloak-admin-client</artifactId>
</dependency>
I am getting the following exception:
2021-11-21 18:27:51,546 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.steps.CapabilityAggregationStep#aggregateCapabilities threw an exception: java.lang.IllegalStateException: Please make sure there is only one provider of the following capabilities:
capability io.quarkus.rest.client is provided by:
- io.quarkus:quarkus-rest-client-reactive::jar:2.5.0.Final
- io.quarkus:quarkus-rest-client::jar:2.5.0.Final
at io.quarkus.deployment.steps.CapabilityAggregationStep.aggregateCapabilities(CapabilityAggregationStep.java:147)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:887)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:832)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:93)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:450)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:67)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:105)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
We don't have that yet. You can track this issue for updates on when that will change.
Actually, the error is saying that we have to choose one of the providers:
Build step io.quarkus.deployment.steps.CapabilityAggregationStep#aggregateCapabilities threw an exception: java.lang.IllegalStateException: Please make sure there is only one provider of the following capabilities:
capability io.quarkus.rest.client is provided by:
io.quarkus:quarkus-rest-client-reactive::jar:2.5.0.Final
io.quarkus:quarkus-rest-client::jar:2.5.0.Final
So, go to your pom.xml file and make sure to have one of them (quarkus-rest-client or quarkus-rest-client-reactive).
I believe you have to remove the quarkus-rest-client dependency and use only the quarkus-rest-client-reactive.

Karaf never comes up with Java 11 and PAX-EXAM 4.13.1

Trying to update a Karaf based application to Java 11. The Pax Exam tests are broken and I don't see the cause. Below is the stack trace. Can one of you OSGi gurus tell me how to fix this?
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender (file:/projects/reflex-wps/itests/itests-wps/target/exam/acd907f2-8a4a-4ac3-8014-be93bb82e439/system/org/apache/felix/org.apache.felix.framework/5.6.12/org.apache.felix.framework-5.6.12.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender
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
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 180.625 sec <<< FAILURE! - in org.codice.wps.itests.ClientFeatureIntegrationTest
org.codice.wps.itests.ClientFeatureIntegrationTest Time elapsed: 180.576 sec <<< ERROR!
java.lang.RuntimeException: Cannot get the remote bundle context
at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.java:261)
at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.waitForState(RemoteBundleContextClientImpl.java:218)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.waitForState(KarafTestContainer.java:659)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.startKaraf(KarafTestContainer.java:262)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:194)
at org.ops4j.pax.exam.spi.reactors.SingletonStagedReactor.beforeSuite(SingletonStagedReactor.java:128)
at org.ops4j.pax.exam.spi.reactors.PerSuiteStagedReactor.beforeSuite(PerSuiteStagedReactor.java:72)
at org.ops4j.pax.exam.spi.reactors.ReactorManager.beforeClass(ReactorManager.java:455)
at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:97)
at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.rmi.NotBoundException: cd7e16b9-fb73-4a78-b9d4-ac18c7fdc792
at java.rmi/sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:234)
at java.rmi/sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:133)
at java.rmi/sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:468)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:298)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
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.lang.Thread.run(Thread.java:834)
at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:380)
at java.rmi/sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:123)
at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.java:248)
at org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.waitForState(RemoteBundleContextClientImpl.java:218)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.waitForState(KarafTestContainer.java:659)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.startKaraf(KarafTestContainer.java:262)
at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:194)
at org.ops4j.pax.exam.spi.reactors.SingletonStagedReactor.beforeSuite(SingletonStagedReactor.java:128)
at org.ops4j.pax.exam.spi.reactors.PerSuiteStagedReactor.beforeSuite(PerSuiteStagedReactor.java:72)
at org.ops4j.pax.exam.spi.reactors.ReactorManager.beforeClass(ReactorManager.java:455)
at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:97)
at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Java - openjdk version "11.0.10"
Karaf - 4.2.6
Pax Exam - 4.13.1
The solution was to pass additional JVM arguments to the Pax Exam configuration. Below is a link to a long list of VM options one project used to get Pax Exam running in the JRE11. I copied and pasted them all. Now the integration tests run correctly on JRE11. However, the integration tests cannot be run in JRE8. The Java 8 JVM does not understand all of the arguments (some are specific to later verssion of the JVM). The JRE8 simply crashes.
See:
https://github.com/codice/ddf/blob/6ad716e4e4be6cdad64fa1c7df6d9890a8b07385/distribution/test/itests/test-itests-common/src/main/java/org/codice/ddf/itests/common/AbstractIntegrationTest.java#L669

Hadoop HiPi - hibImport NoClassDefFoundError

I'm using Hadoop 2.9.1 and the latest HiPi from Github. It's running on an Ubuntu 18.04.3 with OpenJDK 10.
The installation was successful and I tried to run the example from HiPi. After downloading a set of images I tried to convert it into HipiImageBundle. The following result is:
hadoop#master:~/workspace/hipi$ tools/hibImport.sh ~/workspace/SampleImages ~/workspace/SampleImages/sampleimages.hib
Input image directory: /home/hadoop/workspace/SampleImages
Input FS: local FS
Output HIB: /home/hadoop/workspace/SampleImages/sampleimages.hib
Overwrite HIB if it exists: false
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/opt/hadoop/share/hadoop/common/lib/hadoop-auth-2.9.1.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
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
Exception in thread "main" java.lang.NoClassDefFoundError: org/hipi/imagebundle/HipiImageBundle
at org.hipi.tools.HibImport.main(HibImport.java:124)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
Caused by: java.lang.ClassNotFoundException: org.hipi.imagebundle.HipiImageBundle
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 7 more
Problem solved. There is a bug in Hipi.
In tools/build.gradle there is the wrong line commented out:
hadoop#master:/opt/hipi/tools$ cat build.gradle
subprojects {
dependencies {
compile project(':core')
}
jar {
manifest {
# Uncomment this line
attributes("Class-Path" : configurations.runtime.collect { it.getAbsolutePath() }.join(' '));
# Comment this line out
// attributes("Class-Path" : configurations.runtime.collect { it.toURI() }.join(' '));
}
}
}
A second problem were problem with corrupted images. When you load them you'll get a NullPointerException.

Resources