How to solve IllegalArgumentException error? - java

I am trying to deploy my R application using ShinyProxy and docker. As soon as run the command, java -jar I get a nested exception in docker terminal stating Illegal argument exception. I am attaching the last traceback error. I referred https://www.databentobox.com/2019/11/05/deploy-r-app-with-shinyproxy/ tutorial for deploying R application. Any suggestion on how to overcome this error?
java -jar shinyproxy-2.3.0.jar
Caused by: java.lang.IllegalArgumentException: An HTTPS URI for DOCKER_HOST must be provided to use Docker client certificates
at com.spotify.docker.client.DefaultDockerClient.<init>(DefaultDockerClient.java:441) ~[docker-client-8.15.2.jar!/:8.15.2]
at com.spotify.docker.client.DefaultDockerClient$Builder.build(DefaultDockerClient.java:3194) ~[docker-client-8.15.2.jar!/:8.15.2]
at eu.openanalytics.containerproxy.backend.docker.AbstractDockerBackend.initialize(AbstractDockerBackend.java:83) ~[containerproxy-0.8.3.jar!/:0.8.3]
at eu.openanalytics.containerproxy.backend.ContainerBackendFactory.createInstance(ContainerBackendFactory.java:83) ~[containerproxy-0.8.3.jar!/:0.8.3]
at eu.openanalytics.containerproxy.backend.ContainerBackendFactory.createInstance(ContainerBackendFactory.java:36) ~[containerproxy-0.8.3.jar!/:0.8.3]
at org.springframework.beans.factory.config.AbstractFactoryBean.afterPropertiesSet(AbstractFactoryBean.java:141) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706) ~[spring-beans-5.0.4.RELEASE.jar!/:5.0.4.RELEASE]
... 84 common frames omitted

It worked for me by degrading shinyproxy version to 2.0.0 from 2.3.0.

Related

Hybris, ant clean all command failes with message Error occurred during initialization of VM

I'm getting this error while trying to build my Hybris project via ant clean all && ./hybrisserver.sh debug:
Error occurred during initialization of VM
java.lang.Error: Could not create SecurityManager
at java.lang.System.initPhase3(java.base#11.0.9.1/System.java:2065)
Caused by: java.lang.ClassNotFoundException: allow
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.9.1/BuiltinClassLoader.java:581)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.9.1/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.9.1/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.9.1/Native Method)
at java.lang.Class.forName(java.base#11.0.9.1/Class.java:398)
at java.lang.System.initPhase3(java.base#11.0.9.1/System.java:2050)
Maybe I put a typo somewhere (see Caused by: java.lang.ClassNotFoundException: allow
) but I can't find anything and my repo's up to date with master which is correctly working, Is there a way to find the problem?
Note: i have Ubuntu 20.04.5 LTS
Thank you
Solution was simple:
Somehow I lost my setantenv.sh configuration, i had to re-run it in /platform

Keycloak server problem Could not find or load main class

I can't run keycloak server, when I try to run kc.bat in windows powershell or cmd with
.\kc.bat
I get the error
Error: Could not find or load main class io.quarkus.bootstrap.runner.QuarkusEntryPoint
Caused by: java.lang.ClassNotFoundException: io.quarkus.bootstrap.runner.QuarkusEntryPoint
I installed quarkus but it doesn't work even tho I installed it
There is an open bug related to this issue.
You have to edit kc.bat line 127 replace : with ;

How to debug java.lang.ClassNotFoundException during Tomcat startup?

When Tomcat loads my war, I get this error:
Exception in thread "ClientMessageReceptor0" java.lang.NoClassDefFoundError: java/net/Inet6Address
at org.jacorb.orb.iiop.IIOPAddress.getNetworkInetAddresses(IIOPAddress.java:675)
at org.jacorb.orb.iiop.IIOPAddress.getLocalHost(IIOPAddress.java:591)
at org.jacorb.orb.iiop.IIOPAddress.getLocalHostAddress(IIOPAddress.java:574)
at org.jacorb.orb.listener.SSLListenerUtil.processException(SSLListenerUtil.java:73)
at org.jacorb.orb.iiop.IIOPConnection.handleCommFailure(IIOPConnection.java:77)
at org.jacorb.orb.etf.StreamConnectionBase.read(StreamConnectionBase.java:139)
at org.jacorb.orb.giop.GIOPConnection.getMessage(GIOPConnection.java:389)
at org.jacorb.orb.giop.GIOPConnection.receiveMessagesLoop(GIOPConnection.java:541)
at org.jacorb.orb.giop.GIOPConnection.receiveMessages(GIOPConnection.java:533)
at org.jacorb.orb.giop.MessageReceptor.doWork(MessageReceptor.java:69)
at org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:60)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [java.net.Inet6Address]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1375)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1226)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
Our application uses Tomcat v9.0.41 and JDK 1.8.0_111 . This same combination works for others in my team and also it worked for me sometime back. I'm not sure what changed now. I have looked at other similar posts and they suggest mismatch between Tomcat and JDK version. But above combination of Tomcat and JDK works for others.
I have removed all other JDK and JRE version on my system.
Ensured JAVA_HOME points to JDK 1.8.0_111 and PATH points to correct JRE.
Any pointers on how to debug this further? Can I turn on some logging during Tomcat startup to see what paths are being used by Tomcat? Any suggestions are highly appreciated :).

Gerrit upgrade to 3.4.1 Failed with NoClassDefFoundError ChangeKeyAdapter

I came into an error of NoClassFound Error when I exec cmd 'bash gerrit.sh run'.
Before that I have make my Gerrit version upgraded from 3.2.3 to 3.4.1 by
jar -jar gerrit.3.4.1.jar init -d ${MY-GerritSite}.
And it returned Initialized success.
Here is my Error log when start Gerrit server.
Any help is appreciate.
Thank you.
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) [Guice/ErrorInjectingConstructor]: NoClassDefFoundError: com/google/gerrit/server/change/ChangeKeyAdapter
at Log4jMessageLogger.<init>(Log4jMessageLogger.java:38)
at Log4jMessageLogger.class(Log4jMessageLogger.java:38)
while locating Log4jMessageLogger
while locating LifecycleListener annotated with #UniqueAnnotations$Internal(value=59)
Learn more:
https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR
Caused by: NoClassDefFoundError: com/google/gerrit/server/change/ChangeKeyAdapter
at EventGsonProvider.get(EventGsonProvider.java:80)
at Log4jMessageLogger.<init>(Log4jMessageLogger.java:40)
at Log4jMessageLogger$$FastClassByGuice$$745685493.GUICE$TRAMPOLINE(<generated>)
at Log4jMessageLogger$$FastClassByGuice$$745685493.apply(<generated>)
at DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
at ConstructorInjector.provision(ConstructorInjector.java:114)
at ConstructorInjector.construct(ConstructorInjector.java:91)
at ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
at ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at SingletonScope$1.get(SingletonScope.java:169)
at InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at FactoryProxy.get(FactoryProxy.java:60)
at InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
at InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
at InternalInjectorCreator.build(InternalInjectorCreator.java:113)
at InjectorImpl.createChildInjector(InjectorImpl.java:239)
at Daemon.createSysInjector(Daemon.java:521)
at Daemon.start(Daemon.java:361)
at Daemon.run(Daemon.java:279)
at AbstractProgram.main(AbstractProgram.java:61)
at java.base/NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/Method.invoke(Method.java:566)
at GerritLauncher.invokeProgram(GerritLauncher.java:224)
at GerritLauncher.mainImpl(GerritLauncher.java:120)
at GerritLauncher.main(GerritLauncher.java:65)
at Main.main(Main.java:28)
Caused by: ClassNotFoundException: ChangeKeyAdapter
at java.base/URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/ClassLoader.loadClass(ClassLoader.java:588)
at java.base/FactoryURLClassLoader.loadClass(URLClassLoader.java:899)
at java.base/ClassLoader.loadClass(ClassLoader.java:521)
... 28 more

Tomcat not running for a JAR file

I am using Postman alongside a JAR file that runs a REST service that holds some contacts. However when I try to run the JAR file by using: java -jar ContactListRESTService.jar in Powershell, I am seeing a bunch of errors that Apache Tomcat could not run. Postman also doesn't recognize the localhost.
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:159)
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletCntainer.java:159) ~[spring-boot 1.3.7.RELEASE.jar!/:1.3.7.RELEASE]
I have tried uninstalling and reinstalling JAVA SE per some guidance from a mentor with no results.
If anyone can point me in the right direction please.

Categories

Resources