I am getting errors during CQLSession initialization while executing triggers. The contact-points are [ “127.0.0.1:9042” ] with SSL enabled.
Seems like its caused by java.lang.IllegalArgumentException: ‘cluster_name’ is already in use
What could be the reason for this error? Any help appreciated! Thank you!:)

ERROR [Native-Transport-Requests-1] 2024-01-18 00:10:35,776 ErrorMessage.java:457 – Unexpected exception during request
java.lang.RuntimeException: Exception while executing trigger on table with ID: 646d8860-7dfa-11ee-a2c6-7d8ff396b60d
at org.apache.cassandra.triggers.TriggerExecutor.executeInternal(TriggerExecutor.java:247)
at org.apache.cassandra.triggers.TriggerExecutor.execute(TriggerExecutor.java:125)
at org.apache.cassandra.service.StorageProxy.mutateWithTriggers(StorageProxy.java:1037)
at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:476)
at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:454)
at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:244)
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:337)
at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:324)
at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:108)
at org.apache.cassandra.transport.Message$Request.execute(Message.java:242)
at org.apache.cassandra.transport.Dispatcher.processRequest(Dispatcher.java:86)
at org.apache.cassandra.transport.Dispatcher.processRequest(Dispatcher.java:106)
at org.apache.cassandra.transport.Dispatcher.lambda$dispatch$0(Dispatcher.java:70)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:165)
at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:137)
at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:119)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.datastax.oss.driver.api.core.AllNodesFailedException: Could not reach any contact point, make sure you’ve provided valid addresses (showing first 1 nodes, use getAllErrors() for more): Node(endPoint=localhost/127.0.0.1:9042, hostId=null, hashCode=73869e00): [com.datastax.oss.driver.api.core.connection.ConnectionInitException: [cassandra|control|connecting…] Protocol initialization request, step 1 (OPTIONS): failed to send request (java.lang.ExceptionInInitializerError)]
at com.datastax.oss.driver.api.core.AllNodesFailedException.copy(AllNodesFailedException.java:141)
at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:149)
at com.datastax.oss.driver.api.core.session.SessionBuilder.build(SessionBuilder.java:835)
at com.fanatics.dao.common.AbstractCassandraStore.(AbstractCassandraStore.java:49)
at com.fanatics.dao.triggers.CDCQueries.(CDCQueries.java:38)
at com.fanatics.dao.triggers.CartSchemaTriggers.augment(CartSchemaTriggers.java:43)
at org.apache.cassandra.triggers.TriggerExecutor.executeInternal(TriggerExecutor.java:235)
… 18 common frames omitted
Suppressed: com.datastax.oss.driver.api.core.connection.ConnectionInitException: [cassandra|control|connecting…] Protocol initialization request, step 1 (OPTIONS): failed to send request (java.lang.ExceptionInInitializerError)
at com.datastax.oss.driver.internal.core.channel.ProtocolInitHandler$InitRequest.fail(ProtocolInitHandler.java:356)
at com.datastax.oss.driver.internal.core.channel.ChannelHandlerRequest.writeListener(ChannelHandlerRequest.java:87)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:184)
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:30)
at com.datastax.oss.driver.internal.core.channel.ChannelHandlerRequest.send(ChannelHandlerRequest.java:76)
at com.datastax.oss.driver.internal.core.channel.ProtocolInitHandler$InitRequest.send(ProtocolInitHandler.java:193)
at com.datastax.oss.driver.internal.core.channel.ProtocolInitHandler.onRealConnect(ProtocolInitHandler.java:124)
at com.datastax.oss.driver.internal.core.channel.ConnectInitHandler.lambda$connect$0(ConnectInitHandler.java:57)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:300)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:335)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
… 2 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: null
at com.datastax.oss.driver.internal.core.channel.InFlightHandler.write(InFlightHandler.java:96)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808)
at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025)
at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:294)
at com.datastax.oss.driver.internal.core.channel.ChannelHandlerRequest.send(ChannelHandlerRequest.java:75)
… 21 common frames omitted
Caused by: java.lang.IllegalArgumentException: ‘cluster_name’ is already in use
at io.netty.util.ConstantPool.createOrThrow(ConstantPool.java:109)
at io.netty.util.ConstantPool.newInstance(ConstantPool.java:91)
at io.netty.util.AttributeKey.newInstance(AttributeKey.java:55)
at com.datastax.oss.driver.internal.core.channel.DriverChannel.(DriverChannel.java:50)
… 30 common frames omitted

The application config used in the triggers is

datastax-java-driver {
    basic {
        config-reload-interval = 0
        session-name = "cassandra"
        session-keyspace = "orders"
        contact-points = [ "127.0.0.1:9042" ]
        load-balancing-policy.local-datacenter = "dc3"
        request {
            consistency = LOCAL_QUORUM
            serial-consistency = LOCAL_SERIAL
            timeout = 6 seconds
        }
    }
    advanced {
        ssl-engine-factory {
            class = DefaultSslEngineFactory
            hostname-validation = false
        }
    }
}

New contributor

Dencil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.