WSO2 Api Manager's Carbon and Publisher Links Not Working
After starting up wso2-am server as mentioned in its documentation: WSO2 API Manager Documentation / Running the Product only store link is working while accessing the other two components (i.e. carbon and publisher) following exception is occurring every time I'm hitting their URLs:
java.lang.RuntimeException: java.security.NoSuchAlgorithmException: class configured for AlgorithmParameters (provider: SunEC) cannot be found.
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1373)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:529)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:807)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:775)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.tomcat.util.net.SecureNioChannel.handshakeUnwrap(SecureNioChannel.java:335)
at org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:193)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1715)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.security.NoSuchAlgorithmException: class configured for AlgorithmParameters (provider: SunEC) cannot be found.
at sun.security.util.ECUtil.getECParameters(ECUtil.java:141)
at sun.security.util.ECUtil.getCurveName(ECUtil.java:214)
at sun.security.ssl.JsseJce.getNamedCurveOid(JsseJce.java:389)
at sun.security.ssl.SupportedEllipticCurvesExtension.getCurveIndex(SupportedEllipticCurvesExtension.java:161)
at sun.security.ssl.HandshakeMessage$ECDH_ServerKeyExchange.<init>(HandshakeMessage.java:1011)
at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:884)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:213)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:936)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:876)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:873)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1313)
at org.apache.tomcat.util.net.SecureNioChannel.tasks(SecureNioChannel.java:285)
at org.apache.tomcat.util.net.SecureNioChannel.handshakeUnwrap(SecureNioChannel.java:343)
... 7 more
Caused by: java.security.NoSuchAlgorithmException: class configured for AlgorithmParameters (provider: SunEC) cannot be found.
at java.security.Provider$Service.getImplClass(Provider.java:1649)
at java.security.Provider$Service.newInstance(Provider.java:1592)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at java.security.Security.getImpl(Security.java:695)
at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:146)
at sun.security.util.ECUtil.getECParameters(ECUtil.java:139)
... 20 more
Caused by: java.lang.ClassNotFoundException: sun.security.ec.ECParameters
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.security.Provider$Service.getImplClass(Provider.java:1636)
... 26 more
I'm also getting the same exceptions with WSO2 Api Manager's latest version: 2.0.0.
Kindly show me how to tackle it and what's the main cause of such an exception. By the way I'm using Windows 7 Ultimate and JDK 1.8.
Related
I'm getting the below exception while trigerring the email service at remote server(EC2 linux instance). but it is working fine in my local. Although I have tried with the same war(from my local) on remote server but it failed again giving the same exception.
22-Mar-2021 13:10:47.510 SEVERE [TP-Source-6e5b00ec-14a3-4a73-896b-44e2428c0afa-3] org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler.handleUncaughtException Unexpected exception occurred invoking async method: public void com.myproject.web.service.EmailService.sendMessageWithAttachment(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
java.lang.ExceptionInInitializerError
at clojure.core$clojure_version.<clinit>(core.clj:6788)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.amazonaws.util.VersionInfoUtils.languageVersion(VersionInfoUtils.java:281)
at com.amazonaws.util.VersionInfoUtils.clojureVersion(VersionInfoUtils.java:204)
at com.amazonaws.util.VersionInfoUtils.getAdditionalJvmLanguages(VersionInfoUtils.java:191)
at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:161)
at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:137)
at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:100)
at com.amazonaws.internal.EC2ResourceFetcher.<clinit>(EC2ResourceFetcher.java:44)
at com.amazonaws.auth.InstanceMetadataServiceCredentialsFetcher.<init>(InstanceMetadataServiceCredentialsFetcher.java:36)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.<init>(InstanceProfileCredentialsProvider.java:102)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.<init>(InstanceProfileCredentialsProvider.java:82)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.<init>(InstanceProfileCredentialsProvider.java:66)
at com.amazonaws.auth.InstanceProfileCredentialsProvider.<clinit>(InstanceProfileCredentialsProvider.java:49)
at com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper.initializeProvider(EC2ContainerCredentialsProviderWrapper.java:64)
at com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper.<init>(EC2ContainerCredentialsProviderWrapper.java:53)
at com.amazonaws.auth.DefaultAWSCredentialsProviderChain.<init>(DefaultAWSCredentialsProviderChain.java:49)
at com.amazonaws.auth.DefaultAWSCredentialsProviderChain.<clinit>(DefaultAWSCredentialsProviderChain.java:43)
at com.amazonaws.services.s3.AmazonS3ClientBuilder.standard(AmazonS3ClientBuilder.java:46)
at com.myproject.web.service.EmailService.sendMessageWithAttachment(EmailService.java:85)
at com.myproject.web.service.EmailService$$FastClassBySpringCGLIB$$f3f8deb8.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:76)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
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.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath.
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:412)
at clojure.lang.RT.doInit(RT.java:454)
at clojure.lang.RT.<clinit>(RT.java:330)
... 32 more
I'm using the AWS SES and S3 jar (version 1.11.795) to send email instead of aws-java-sdk jar.
I tried installing the clojure at the server but it is failing and giving the same error.
please suggest.
I got the below error :
org.apache.hive.service.cli.HiveSQLException: Error running query:
java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:266)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:252)
at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:309)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:250)
at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:434)
at HiveRead.(HiveRead.java:37)
at HiveRead.main(HiveRead.java:24)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.NoClassDefFoundError:
org/apache/tez/runtime/api/Event
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:225)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:499)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:486)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:506)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event
at org.apache.hadoop.hive.ql.parse.TezCompiler.runStatsDependentOptimizations(TezCompiler.java:282)
at org.apache.hadoop.hive.ql.parse.TezCompiler.optimizeOperatorPlan(TezCompiler.java:133)
at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:134)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10947)
at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:246)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:477)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1242)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1229)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
... 15 more
Caused by: java.lang.ClassNotFoundException: org.apache.tez.runtime.api.Event
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 25 more
org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:266)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:252)
at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:309)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:250)
at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:434)
at HiveRead.(HiveRead.java:45)
at HiveRead.main(HiveRead.java:24)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.NoClassDefFoundError:
org/apache/tez/runtime/api/Event
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:225)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:276)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:324)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:499)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:486)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:506)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event
at org.apache.hadoop.hive.ql.parse.TezCompiler.runStatsDependentOptimizations(TezCompiler.java:282)
at org.apache.hadoop.hive.ql.parse.TezCompiler.optimizeOperatorPlan(TezCompiler.java:133)
at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:134)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10947)
at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:246)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:477)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1242)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1229)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:191)
... 15 more
Caused by: java.lang.ClassNotFoundException: org.apache.tez.runtime.api.Event
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 25 more
I want to use Tez for hive instead of mr. I changed hive.execution.engine to tez in hive-site.xml and run hiveserver2 .
I am using Hive Java API to run Hive queries and when I run queries using Tez, I get that error. I am using Maven to get all required jars and I have
tez jar, tez commons, 'tez runtime api`.I am also following this tutorial to configure tez
I am having the following Stacktrace:
[2015-10-15 19:29:09,264] WARN
com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin
gerrit-owners-autoassign-1.1
com.google.common.util.concurrent.ExecutionError:
com.google.common.util.concurrent.ExecutionError:
java.lang.NoClassDefFoundError:
com/google/gerrit/extensions/events/GitReferenceUpdatedListener$Update
at
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937) at
com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941) at
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at
com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
at
com.google.inject.internal.FailableCache.get(FailableCache.java:48)
at
com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:50)
at
com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:136)
at
com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:533)
at
com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:160)
at
com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
at
com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:123)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at
com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:226)
at
com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:233)
at
com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:190)
at
com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:170)
at
com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:461)
at
com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:390)
at
com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:295)
at
com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
at com.google.gerrit.pgm.Daemon.start(Daemon.java:293) at
com.google.gerrit.pgm.Daemon.run(Daemon.java:205) at
com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606) at
com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)
at
com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
at
com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
at Main.main(Main.java:25) Caused by:
com.google.common.util.concurrent.ExecutionError:
java.lang.NoClassDefFoundError:
com/google/gerrit/extensions/events/GitReferenceUpdatedListener$Update
at
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937) at
com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941) at
com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at
com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
at
com.google.inject.internal.FailableCache.get(FailableCache.java:48)
at
com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:68)
at
com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:74)
at
com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
at
com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
at
com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
at
com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
at
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
... 31 more Caused by: java.lang.NoClassDefFoundError:
com/google/gerrit/extensions/events/GitReferenceUpdatedListener$Update
at java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Class.java:2615) at
java.lang.Class.getDeclaredMethods(Class.java:1860) at
com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:688)
at
com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
at
com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:93)
at
com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:37)
at
com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:45)
at
com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:42)
at
com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
at
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at
com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
... 46 more Caused by: java.lang.ClassNotFoundException:
com.google.gerrit.extensions.events.GitReferenceUpdatedListener$Update
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at
java.net.URLClassLoader$1.run(URLClassLoader.java:355) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:354) at
java.lang.ClassLoader.loadClass(ClassLoader.java:425) at
java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 60 more
I am not really sure what I should look into to fix it.
This looks like a mismatch between the API version that the plugin was built against, and the API version of the Gerrit server.
java.lang.NoClassDefFoundError: com/google/gerrit/extensions/events/GitReferenceUpdatedListener$Update
The GitReferenceUpdatedListener.Update class was removed from the API in Gerrit version 2.8.
To fix this you should first check which version of Gerrit your server is running, and then make sure you've built the plugin against the API with the corresponding version.
I followed the instruction and ended up compiling the plugin with both changes submitted in here: https://github.com/vadims/gerrit-owners/issues/6 (look for the 2 forked repo) and it did work.
It was painful but the plugin does an awesome job so worth the effort!
This question already has an answer here:
Is it necessary/important to set a classpath in the RMI registry?
(1 answer)
Closed 8 years ago.
I am trying lo learn RMI by following the Oracle documentation for RMI
I have created the classes for server side and client side, the class details are as follows:
compute.Compute -- Remote interface
compute.Task -- Normal interface
engine.ComputeEngine -- Class that implements remote interface
The code details can be seem from the document at these links:
http://docs.oracle.com/javase/tutorial/rmi/designing.html
http://docs.oracle.com/javase/tutorial/rmi/implementing.html
I have followed the steps given in below link to compile the code, all I am doing these are on my machine which has Ubuntu OS.
http://docs.oracle.com/javase/tutorial/rmi/compiling.html
Now as per below link I have placed the policy files for client and server at path : /home/user/public_html
http://docs.oracle.com/javase/tutorial/rmi/running.html
one more difference is I have tomcat server so I placed the class files under Tomcat webapps and under my web application, so I am running the class using the command:
java -cp /home/user/src:. -Djava.rmi.server.codebase=http://myipaddress:8080/myapp/classes/compute.jar -Djava.rmi.server.hostname=myipaddress -Djava.security.policy=server.policy engine.ComputeEngine
Now when I run this application I am getting exception as:
ComputeEngine exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: compute.Compute
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:378)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at engine.ComputeEngine.main(ComputeEngine.java:31)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: compute.Compute
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:409)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: compute.Compute
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.rmi.server.LoaderHandler$Loader.loadClass(LoaderHandler.java:1206)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at sun.rmi.server.LoaderHandler.loadClassForName(LoaderHandler.java:1219)
at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:729)
at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:673)
at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:610)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:646)
at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:311)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:255)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1558)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1e exce514)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
... 13 more
The exception says java.lang.ClassNotFoundException: compute.Compute. But I have the class file in compute.jar that is located at my path /home/user/src and also I can download it using URL at http://myipaddress:8080/myapp/classes/compute.jar
Also FYI, I am doing all the steps on my machine only without any separate client and server machines.
Can someone please help me how can I fix this issue? Please let me know if you need any further details so I can provide them.
Update:
I followed the asnwer given by #EJP at this post - Is it necessary/important to set a classpath in the RMI registry?
then I started rmiregistry from directory where I have the jar file that has Compute.class and then ran the below command:
java -cp /home/user/src:/home/user/public_html/classes/compute.jar -Djava.rmi.server.codebase=http://myipaddress:8080/myapp/classes/compute.jar -Djava.rmi.server.hostname=myipaddress -Djava.security.policy=server.policy engine.ComputeEngine
But still I am getting same exception.
That class isn't on the Registry's CLASSPATH.
I have an Infinispan Server, version 6.0.x, the one derived from JBoss 7.2, and it is working fine for caching.
However, when I try to monitor it by JMX I can't. This is URL I type in jconsole.bat :
service:jmx:remoting-jmx://MY.IP.ADDRESS.HERE:9999
But I get this error :
Exception in thread "VMPanel.connect" java.util.ServiceConfigurationError: javax.management.remote.JMXConnectorProvider: Provider org.jboss.remotingjmx.RemotingConnectorProvider could not be instantiated: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:472)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:341)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:370)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292)
Caused by: java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jboss.remotingjmx.RemotingConnectorProvider.<clinit>(RemotingConnectorProvider.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 14 more
Exception in thread "VMPanel.connect" java.util.ServiceConfigurationError: javax.management.remote.JMXConnectorProvider: Provider org.jboss.remotingjmx.RemotingConnectorProvider could not be instantiated: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.remotingjmx.RemotingConnectorProvider
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:472)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:341)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:357)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.remotingjmx.RemotingConnectorProvider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 7 more
Maybe I should create some managed beans somewhere? How can I fix this?
Remark 1 : In the documentation they include the necearry configuration between <global></global>, but in my case the settings should respect JBoss Schema...
Remark 2 : I tried with JBoss 7.2, and it could show me graphs and so on, and by the way I used the same URL. The difference is that I used jconsole.bat of JBoss instead of Infinispan.
Please, any idea about the necessary configuration?
Thank you.
I'm a Windows 7 user, and this is the fix that worked for me.
Open jconsole.bat for editting.
At the top, turn on the echoing.
#echo on
Then go down and find this line
call :SearchForJars "%JBOSS_MODULEPATH%\system\layers\base\org\jboss\logging\main"
Insert the following line before it:
echo "%JBOSS_MODULEPATH%\system\layers\base\org\jboss\logging\main"
I'm not sure why that worked, but it did. If you get different ClassNotFound exceptions, try echo statements above the other jar searches.