Quarkus Devservice for Oracle Database is not working - oracle

I am working on Quarkus Microservice application in which trying to use Quarkus Devservice to start Oracle DB with below configuration in application.yml file. But it's throwing exception.
application.yml:
quarkus:
datasource:
db-kind: oracle
username: root
password: password
devservices:
image-name: oracle
Exception:
Failed to load steps from class 'io.quarkus.devservice.oracle.deployment.OracleDevServicesProcessoer'

Related

Failed to obtain R2DBC Connection with Oracle R2DBC driver

I try to connect to oracle db (v19) via oracle's r2dbc driver and spring data r2dbc but receive Failed to obtain R2DBC Connection error. Did not observe any item or terminal signal within 10000ms in 'Connection Allocation'
I suspect that my r2dbc-pool configuration is not correct. I tried several combinations but none of them fixed the issue.
I referred this issue https://github.com/spring-projects/spring-data-r2dbc/issues/810, and adjusted my pool configuration, but it didn't work. I increased max-create-connection-time but i didn't work also.
Spring Boot version: 3.0.1
Spring Boot Data R2DBC: 3.0.0
Project Reactor: 3.5.1
R2DBC SPI: 1.0.0.RELEASE
R2DBC Pool: 1.0.0.RELEASE
JDK version: 17
this my configuration which I use for connection.
r2dbc:
name: demo-db
url: r2dbc:oracle://192.168.1.98:1521/testdb
username: testdb
password: testdb
pool:
enabled: true
initial-size: 10
validation-query: SELECT 1 FROM DUAL
max-life-time: 120000
max-create-connection-time: 10000
validation-depth: remote

Not able to connect to H2 database in Spring Boot

I have the below in my yaml file.I keep getting the below error.how to resolve the below error.I am using latest spring boot version .
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database
"C:/Users/mynname/test" not found, either pre-create it or allow
remote database creation (not recommended in secure environments)
[90149-214]
I can see the H2 console in http://localhost:8080/h2.But when i click on connect button i get the error.
spring:
h2:
console:
enabled: true
path: /h2
datasource:
url: jdbc:h2:mem:testdb
username: sa
password:
driverClassName: org.h2.Driver
jpa:
spring.jpa.database-platform: org.hibernate.dialect.H2Dialect
hibernate.ddl-auto: create
On the h2 console change the default ur that appears there (jdbc:h2:mem:test) to jdbc:h2:mem:testdb
And you should be able to connect

Cannot find database driver: net.snowflake.client.jdbc.SnowflakeDriver

I was following getting started with liquibase on snowflake to set up Snowflake db connection to liquibase, but with the following liquibase.properties file:
driver: net.snowflake.client.jdbc.SnowflakeDriver
classpath: ./liquibase-snowflake-1.0.jar
url: jdbc:snowflake://XXXXXXX.snowflakecomputing.com
username: YYYYYYYYY
password: ZZZZZZZZZZ
changeLogFile: mySnowflakeChangeLog.xml
I get a Snowflake driver error from liquibase:
Unexpected error running Liquibase: java.lang.RuntimeException: Cannot find database driver: net.snowflake.client.jdbc.SnowflakeDriver
I checked that the driver being used is the correct one mentioned on the official documentation https://docs.snowflake.net/manuals/user-guide/jdbc-configure.html . This is on JDK 13.0.1 and liquibase 3.8.2.
What is going wrong here / any suggestions on a workaround? Thanks in advance!

how to configure both mongodb and postgres in spring boot application.yml?

We have spring boot project , in which we need to use mongo and postgres , but i thought am failing in configuring mongo and postgres details applicaiton.yml , below my what i configured , can any one please help me
spring:
profiles: stage
data:
mongodb:
host: mongodb-host
port: 27017
password: password
username: username
authentication-database: database
database: database
datasource:
driver-class-name: org.postgresql.Driver
url: postgres-url
username: user-name
password: password
tomcat:
validation-interval: 30000
test-on-borrow: true
validation-query: SELECT 1
when i start my spring-boot application , it is failing to start with below error
Caused by: java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.
can any one please help
Solution 1: remove spring.datasource.driver-class-name property
Solution 2: rename the spring.datasource.url property to spring.datasource.jdbc-url.
For solution 1 Spring Boot will figure out the default driver class name based on the spring.datasource.url property value.

How to fix mysql connectivity issues on bosh-lite for a cf.org sample spring boot app?

I am trying to cf push this code from this github repo after running mvn package, but I get a failed app deployment.
I have created a user defined service for mysql since cleardb is not available on my bosh-lite local vm. I created the mysql service and named it as 'mysql' as well as guided by this.
The application.yml in this spring boot app points to localhost. That doesn't work even for a local (non cf) build without corrrecting the jdbc url. Here is the stack trace from the bosh-lite vm when I try to cf push this app and read the logs using cf logs springpong --recent.
Also, why do we need both, the manifest.yml and the application.yml providing database details ?
vagrant#vagrant-ubuntu-trusty-64:~$ cat pong_matcher_spring/src/main/resources/application.yml
---
spring:
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost/pong_matcher_spring_development
username: springpong
password: springpong
jpa:
hibernate.ddl-auto: none
show_sql: false
vagrant#vagrant-ubuntu-trusty-64:~$ cat pong_matcher_spring/manifest.yml
---
applications:
- name: springpong
buildpack: java_buildpack
path: target/pong-matcher-spring-1.0.0.BUILD-SNAPSHOT.jar
services:
- mysql
vagrant#vagrant-ubuntu-trusty-64:~$
Can someone help me fix this ?
TIA
This was happening as the security groups were not setup to allow for network access. A sample gist of commands can be seen here -> https://gist.github.com/menicosia/2e9c414430138064f945
Caveat: This is only for bosh-lite and development purposes.

Resources