java.lang.ClassNotFoundException: com.redhat.ceylon.compiler.java.runtime.tools.Options - vert.x

Using Ceylon IDE 1.2.1 and Vert.x 3.2.1:
import io.vertx.ceylon.core {
vertx_=vertx
}
shared void run() {
value vertx = vertx_.vertx();
}
module has
shared import io.vertx.ceylon.web "3.2.1";
Run as Ceylon Java Application, results in:
Exception in thread "main" java.util.ServiceConfigurationError: io.vertx.core.spi.VerticleFactory: Provider io.vertx.lang.ceylon.CeylonVerticleFactory could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at io.vertx.core.impl.DeploymentManager.loadVerticleFactories(DeploymentManager.java:56)
at io.vertx.core.impl.DeploymentManager.<init>(DeploymentManager.java:51)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:139)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:114)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:110)
at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:34)
at io.vertx.core.Vertx.vertx(Vertx.java:79)
at io.vertx.ceylon.core.vertx_.vertx(vertx_.java:51)
(...)
Caused by: java.lang.NoClassDefFoundError: com/redhat/ceylon/compiler/java/runtime/tools/Options
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 40 more
Caused by: java.lang.ClassNotFoundException: com.redhat.ceylon.compiler.java.runtime.tools.Options from [Module "io.vertx.lang.ceylon:3.2.1" from Ceylon ModuleLoader: RootRepositoryManager: FileContentStore: /Users/axel/.ceylon/cache]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
... 45 more
Any ideas? I can't remember anything like this from the 1.2.0 Ceylon IDE release, so I am guessing there's a change there. Vert.x 3.2.0 gives the same error.

That's because Vert.x 3.2 is only compatible with Ceylon 1.2, not Ceylon 1.2.1. There will be a new version in the coming days to fix that.

Related

Incompatible OpenSearch 1.3 connector for Spark 3.x

We used to have Spark 2.4.4, Scala 2.11 and Elastic Search 6.8 in our servers.
Our servers were recently upgraded and Spark was upgraded to 3.1.2 and Scala to 2.12. We were getting the below error when writing records to Elastic Search. So we upgraded from ES 6.8 to 7.10 but we found that ES connectors are only available for 7.12 or higher versions to connect to Spark 3.x.
So I upgraded to OpenSearch 1.3.10 since AWS was migrated to OpenSearch from Elastic Search after 7.10. Even after that I'm getting the same error. The elastic search jar I'm using right know is elasticsearch-spark-30_2.12-7.13.2.jar.
We cannot downgrade the Spark version (as servers are not in our control) we need a solution to write data to OpenSearch 1.3.
code:
esconf={}
esconf["es.mapping.id"] = var_document_id
esconf["es.nodes"] = var_elasticsearch_host
esconf["es.port"] = var_elasticsearch_port
esconf["es.nodes.wan.only"]= "true"
dataframe.write.format("org.elasticsearch.spark.sql").options(**esconf).mode("append").save(var_elasticsearch_index+'/'+var_document_type)
Error:
Full Error Code is :{error_code: <class py4j.protocol.Py4JJavaError>, error_message: An error occurred while calling o123.save.\n: java.lang.NoClassDefFoundError: scala/Product$class\n\tat org.elasticsearch.spark.sql.ElasticsearchRelation.<init>(DefaultSource.scala:220)\n\tat org.elasticsearch.spark.sql.DefaultSource.createRelation(DefaultSource.scala:105)\n\tat org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:46)\n\tat org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)\n\tat org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)\n\tat org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:90)\n\tat org.apache.spark.sql.execution.SparkPlan.$anonfun$execute$1(SparkPlan.scala:194)\n\tat org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:232)\n\tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)\n\tat org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:229)\n\tat org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:190)\n\tat org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:134)\n\tat org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:133)\n\tat org.apache.spark.sql.DataFrameWriter.$anonfun$runCommand$1(DataFrameWriter.scala:989)\n\tat org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)\n\tat org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)\n\tat org.apache.spark.sql.execution.SQLExecution$.executeQuery$1(SQLExecution.scala:110)\n\tat org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:135)\n\tat org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)\n\tat org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)\n\tat org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:135)\n\tat org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:253)\n\tat org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:134)\n\tat org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)\n\tat org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:68)\n\tat org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:989)\n\tat org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:438)\n\tat org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:415)\n\tat org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:293)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)\n\tat py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\n\tat py4j.Gateway.invoke(Gateway.java:282)\n\tat py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\n\tat py4j.commands.CallCommand.execute(CallCommand.java:79)\n\tat py4j.GatewayConnection.run(GatewayConnection.java:238)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.ClassNotFoundException: scala.Product$class\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:382)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n\t... 40 more\n, error_at: EXCEPTION IN (/mnt/efs/home/svc-1019183/STORKAPP_DEV/app/utils/utility.py,LINE 2502 dataframe.write.format(org.elasticsearch.spark.sql).options(**esconf).mode(append).save(var_elasticsearch_index+\/\+var_document_type))}
2022-11-14 09:08:11,151
Error Message is :An error occurred while calling o123.save.
: java.lang.NoClassDefFoundError: scala/Product$class
at org.elasticsearch.spark.sql.ElasticsearchRelation.<init>(DefaultSource.scala:220)
at org.elasticsearch.spark.sql.DefaultSource.createRelation(DefaultSource.scala:105)
at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:46)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:90)
at org.apache.spark.sql.execution.SparkPlan.$anonfun$execute$1(SparkPlan.scala:194)
at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:232)
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:229)
at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:190)
at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:134)
at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:133)
at org.apache.spark.sql.DataFrameWriter.$anonfun$runCommand$1(DataFrameWriter.scala:989)
at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
at org.apache.spark.sql.execution.SQLExecution$.executeQuery$1(SQLExecution.scala:110)
at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:135)
at org.apache.spark.sql.catalyst.QueryPlanningTracker$.withTracker(QueryPlanningTracker.scala:107)
at org.apache.spark.sql.execution.SQLExecution$.withTracker(SQLExecution.scala:232)
at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:135)
at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:253)
at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:134)
at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:68)
at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:989)
at org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:438)
at org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:415)
at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:293)
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 py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: scala.Product$class
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 40 more
I ran the below satatement in the OpenSearch dev Tools as well
PUT /_cluster/settings
{
"persistent" : {
"compatibility.override_main_response_version" : true
}
}
Response of GET _cluster/settings?include_defaults=true
...
"compatibility" : {
"override_main_response_version" : "true"
}
},
...
Please let me know how to resolve this issue.
Thanks in advance
Have you looked at the opensearch-hadoop connector? It was written to address connectivity to OpenSearch from Spark.
https://github.com/opensearch-project/opensearch-hadoop

elasticsearch 1.6 elasticsearch command and code is not working in jdk11

i am using elasticsearch-1.6 its working fine when i have java 1.8 sbt version 0.13 and scala version 2.11.1 after then i updated to java version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
sbt 1.2.8 and scala 2.12.8
when i initiate elasticsearch command
:/opt/elasticsearch-1.6.0/bin$ elasticsearch
it shows
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
and when i try to create a client in the code
val clusterName=config.getString("es.clusterName")
val host=config.getString("es.host")
val settings = ImmutableSettings.settingsBuilder().put("cluster.name", clusterName).build();
client = new TransportClient(settings);
client.addTransportAddress(new InetSocketTransportAddress(host,9300));
and here is the config file
es.clusterName="myCluster"
es.host="172.18.0.2"
i got the following exceptions
org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) Error injecting constructor, java.lang.ExceptionInInitializerError
at org.elasticsearch.cache.recycler.PageCacheRecycler.<init>(Unknown Source)
while locating org.elasticsearch.cache.recycler.PageCacheRecycler
for parameter 0 at org.elasticsearch.common.util.BigArrays.<init>(Unknown Source)
while locating org.elasticsearch.common.util.BigArrays
for parameter 3 at org.elasticsearch.transport.netty.NettyTransport.<init>(Unknown Source)
while locating org.elasticsearch.transport.netty.NettyTransport
while locating org.elasticsearch.transport.Transport
for parameter 1 at org.elasticsearch.transport.TransportService.<init>(Unknown Source)
while locating org.elasticsearch.transport.TransportService
Caused by: java.lang.ExceptionInInitializerError
at org.elasticsearch.common.unit.MemorySizeValue.parseBytesSizeValueOrHeapRatio(MemorySizeValue.java:42)
at org.elasticsearch.common.settings.ImmutableSettings.getAsMemory(ImmutableSettings.java:401)
at org.elasticsearch.cache.recycler.PageCacheRecycler.<init>(PageCacheRecycler.java:74)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:830)
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:195)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:125)
at models.ElasticSearchConnectionInfo$.createClient(ElasticSearchConnectionInfo.scala:31)
at models.ElasticSearchConnectionInfo$.getClient(ElasticSearchConnectionInfo.scala:41)
at esconnection.ESconnectionStart.ESconStart(ESconnectionStart.scala:9)
at com.ifkaar.hazelcastserver.HazelcastServer.main(HazelcastServer.java:35)
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 sbt.Run.invokeMain(Run.scala:98)
at sbt.Run.run0(Run.scala:92)
at sbt.Run.execute$1(Run.scala:68)
at sbt.Run.$anonfun$run$4(Run.scala:80)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
at sbt.TrapExit$App.run(TrapExit.scala:253)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.UnsupportedOperationException: Boot class path mechanism is not supported
at java.management/sun.management.RuntimeImpl.getBootClassPath(RuntimeImpl.java:99)
at org.elasticsearch.monitor.jvm.JvmInfo.<clinit>(JvmInfo.java:77)
... 60 more
2) Error injecting constructor, java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.monitor.jvm.JvmInfo
at org.elasticsearch.cache.recycler.PageCacheRecycler.<init>(Unknown Source)
while locating org.elasticsearch.cache.recycler.PageCacheRecycler
for parameter 0 at org.elasticsearch.common.util.BigArrays.<init>(Unknown Source)
while locating org.elasticsearch.common.util.BigArrays
for parameter 3 at org.elasticsearch.transport.netty.NettyTransport.<init>(Unknown Source)
while locating org.elasticsearch.transport.netty.NettyTransport
while locating org.elasticsearch.transport.Transport
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.monitor.jvm.JvmInfo
at org.elasticsearch.common.unit.MemorySizeValue.parseBytesSizeValueOrHeapRatio(MemorySizeValue.java:42)
at org.elasticsearch.common.settings.ImmutableSettings.getAsMemory(ImmutableSettings.java:401)
at org.elasticsearch.cache.recycler.PageCacheRecycler.<init>(PageCacheRecycler.java:74)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:837)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:830)
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:195)
at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:125)
at models.ElasticSearchConnectionInfo$.createClient(ElasticSearchConnectionInfo.scala:31)
at models.ElasticSearchConnectionInfo$.getClient(ElasticSearchConnectionInfo.scala:41)
at esconnection.ESconnectionStart.ESconStart(ESconnectionStart.scala:9)
at com.ifkaar.hazelcastserver.HazelcastServer.main(HazelcastServer.java:35)
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 sbt.Run.invokeMain(Run.scala:98)
at sbt.Run.run0(Run.scala:92)
at sbt.Run.execute$1(Run.scala:68)
at sbt.Run.$anonfun$run$4(Run.scala:80)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
at sbt.TrapExit$App.run(TrapExit.scala:253)
at java.base/java.lang.Thread.run(Thread.java:834)
also i have a doubt that my /root folder is running low space, so is that possible that was causing the issue ?if not what else is wrong here please guide
Elasticsearch 1.6.x is not supported on Oracle/OpenJDK 11. You will need to either downgrade your Java installation or install the latest patch version of JVM 8 alongside JVM 11 to try and run Elasticsearch 1.6.x. See the JVM / Elasticsearch compatibility matrix.
Running both an outdated JVM and an outdated Elasticsearch instance can cause security problems and other headaches, so I highly recommend upgrading both to their latest versions if you can. You'll need to reindex your data, at least going from 1.6 to 7.

EAP 7.X ClassNotFoundException during migration

I am migrating an application to EAP 7.x, My project structure is
-Ear
-War
-Ejb Jar
I am getting ClassNotFoundException, those classes are in the jar. The below is the stack trace. All exception showing in the classes that are in the ejb jar.
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.ttt.xxx.ejb.sessionbeans.messagebroker.MessageHandlerSessionBeanCHI with ClassLoader ModuleClassLoader for Module "deployment.xxx-dev-3.3.0-SNAPSHOT.ear.ejbModule-3.3.0-SNAPSHOT.jar" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/ttt/xxx/ejb/sessionbeans/messagebroker/MessageHandlerSessionBeanCHI$xmlException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: com.ttt.xxx.ejb.sessionbeans.messagebroker.MessageHandlerSessionBeanCHI$xmlException from [Module "deployment.xxx-dev-3.3.0-SNAPSHOT.ear.ejbModule-3.3.0-SNAPSHOT.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more
The jar packing with ear is.
META-INF/
META-INF/MANIFEST.MF
aopalliance-1.0.jar
axiom-api-1.2.12.jar
axiom-impl-1.2.12.jar
axis2-adb-1.6.1.jar
axis2-adb-codegen-1.6.1.jar
axis2-codegen-1.6.1.jar
axis2-kernel-1.6.1.jar
axis2-transport-http-1.6.1.jar
axis2-transport-local-1.6.1.jar
commons-beanutils-1.7.0.jar
commons-cli-1.2.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-lang-2.3.jar
commons-logging-1.1.1.jar
commons-pool-1.5.5.jar
displaytag-1.2.jar
displaytag-export-poi-1.2.jar
displaytag-portlet-1.2.jar
ejbModule-3.3.0-SNAPSHOT.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-jta_1.1_spec-1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
httpcore-4.0.jar
itext-1.3.jar
jaxen-1.1.1.jar
jcl104-over-slf4j-1.4.2.jar
jsr311-api-1.0.jar
jstl-1.1.2.jar
log4j.xml
META-INF/application.xml
META-INF/jboss-app.xml
META-INF/jboss-deployment-struture.xml
xxx-dev-3.3.0-SNAPSHOT.war
neethi-3.0.1.jar
poi-3.2-FINAL.jar
slf4j-api-1.4.2.jar
slf4j-log4j12-1.4.2.jar
spring-asm-3.0.0.RELEASE.jar
spring-beans-3.0.0.RELEASE.jar
spring-context-3.0.0.RELEASE.jar
spring-core-3.0.0.RELEASE.jar
spring-expression-3.0.0.RELEASE.jar
spring-web-3.0.0.RELEASE.jar
spring-webmvc-3.0.0.RELEASE.jar
standard-1.1.2.jar
woden-api-1.0M9.jar
woden-impl-commons-1.0M9.jar
woden-impl-dom-1.0M9.jar
wsdl4j-1.6.2.jar
wstx-asl-3.2.9.jar
XmlSchema-1.4.7.jar
META-INF/maven/
xMETA-INF/maven/com.ttt.xxx/ear/
META-INF/maven/com.ttt.xxx/ear/pom.xml
META-INF/maven/com.ttt.xxx/ear/pom.properties
Please help to solve, I am suspecting issue is coming due to wrong class loading. But i am not able to fix it.

Error When Trying Sample In Accessing MongoDB Data with GORM

I was following the tutorial for Accessing MongoDB Data with GORM but I am having a problem with the sample Groovy code. I copied the sample Groovy code into a file called app.groovy. When I run the code from the spring boot cli the code works fine. If I compile the code into a jar by running
spring jar my-app.jar *.groovy
and then running
java -jar my-app.jar
I get an IllegalStateException
java.lang.reflect.InvocationTargetException
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 org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.reflect.InvocationTargetException
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 org.springframework.boot.cli.jar.PackagedSpringApplicationLauncher.run(PackagedSpringApplicationLauncher.java:41)
at org.springframework.boot.cli.jar.PackagedSpringApplicationLauncher.main(PackagedSpringApplicationLauncher.java:61)
... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cityController': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Method on class [City] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:648)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:909)
... 12 more
Caused by: java.lang.IllegalStateException: Method on class [City] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.
at City.currentGormStaticApi(app.groovy)
at City.withTransaction(app.groovy)
at City$withTransaction.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at CityController.populateCities(app.groovy:30)
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 org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
... 27 more
Anyone have any idea how I fix this or what I am doing wrong?
Probably a bug: https://github.com/spring-projects/spring-boot/issues/686. Maybe a classloader thing, I'm not sure, but we'll look at it and update here when it's fixed. You should be able to use the Gradle or Maven build to create an executable JAR in the meantime.
Update: we might be able to fix this in Spring Boot and/or GORM, but in the meantime if you just declare a package in your app.groovy (e.g. package app) it should work.

ClassNotFoundException / NoClassDefFoundError when running a Scala jar

Having a Scala project exported to a .jar with eclipse, the application started with java -jar app.jar dies with the error java.lang.ClassNotFoundException: scala.Predef$.
Full output:
Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
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:490)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:829)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:150)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoClassDefFoundError: scala/Predef$
at main.App$.debug(App.scala:69)
at main.App.start(App.scala:23)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:772)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:260)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:223)
at com.sun.javafx.application.PlatformImpl$5$1.run(PlatformImpl.java:220)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:220)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:94)
Caused by: java.lang.ClassNotFoundException: scala.Predef$
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:353)
at java.lang.ClassLoader.loadClass(ClassLoader.java:422)
at java.lang.ClassLoader.loadClass(ClassLoader.java:355)
... 9 more
The referenced line at main.App$.debug(App.scala:69):
object App {
//...
def debug(s: String) {
println("DEB: "+s)
}
// ...
}
This seems to be caused because the Scala libraries are not contained in the jar. How do I fix this?
I have read about solutions with maven plugins but I would prefer a manual option.
Manually push the libs there in jar.. or you have good option to script it down