eclipse-vertx / eclipse-vertx/vertx-sql-client

Oracle: io.vertx.core.VertxException: URLs with multiple hosts are not supported

Open
#1,243 3 comments 0 reactions 1 assignee Claimed by @tsegismont View on GitHub
bug module:oracle
Dominant language
Java
Stars
912
Forks
212
Avg merge
17h 30m
Merged PRs (30d)
3

Description

### Version

vertx-oracle-client 4.3.2

### Context

I'm unable to connect to the oracle instance with failover/clustering configuration. The connectionURI is constructed in EZConnect format and passed to fromUri() method, below is the example snippet,

```
const connectOptions = OracleConnectOptions.fromUri("oracle:thin:@host1,host2...hostn:port/service_name?failover=on&retry_count=30&retry_delay=10")
.setUser(username)
.setPassword(password)

const poolOptions = new PoolOptions()
.setMaxSize(maxPoolSize)
.setShared(true)

client = OraclePool.pool(vertx, connectOptions, poolOptions)
```

An exception is thrown :
` java.lang.IllegalArgumentException: Cannot parse invalid connection URI: oracle:thin:@host1,host2,host3,host4:port/service_name?failover=on&retry_count=30&retry_delay=10 -> at io.vertx.oracleclient.impl.OracleConnectionUriParser.parse(OracleConnectionUriParser.java:55) -> at io.vertx.oracleclient.impl.OracleConnectionUriParser.parse(OracleConnectionUriParser.java:28) -> at io.vertx.oracleclient.OracleConnectOptions.fromUri(OracleConnectOptions.java:89) -> at io.reactiverse.es4x.impl.EventEmitterImpl.emit(EventEmitterImpl.java:44) -> at io.reactiverse.es4x.ESVerticleFactory.waitFor(ESVerticleFactory.java:184) -> at io.reactiverse.es4x.impl.JSVerticleFactory.access$100(JSVerticleFactory.java:25) -> at io.reactiverse.es4x.impl.JSVerticleFactory$1.start(JSVerticleFactory.java:84) -> at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:196) -> at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264) -> at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246) -> at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43) -> at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) -> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) -> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) -> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) -> at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) -> at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) -> at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) -> at java.base/java.lang.Thread.run(Thread.java:829) -> Caused by: io.vertx.core.VertxException: URLs with multiple hosts are not supported yet ->
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.