Based on the below error is see , Presto does not seem to be a valid dataSource that is compatible with Spring JPA
Description:
Failed to bind properties under 'spring.jpa.database' to org.springframework.orm.jpa.vendor.Database:
Property: spring.jpa.database
Value: presto
Origin: class path resource [application.yml]:101:22
Reason: failed to convert java.lang.String to org.springframework.orm.jpa.vendor.Database
Action: Update your application's configuration. The following values are valid: DB2 DEFAULT DERBY H2 HANA HSQL INFORMIX MYSQL ORACLE POSTGRESQL SQL_SERVER SYBASE
Thoughts or advise please ?
Related
My project uses non stop SQL/MX as RDBMS database, a product from HP.I am not able to connect to the data source using Spring Boot's standard practice of defining JDBC URL, user, password inside application.properties file.
spring.datasource.driverClassName = com.tandem.sqlmx.SQLMXDriver
spring.datasource.url = jdbc:sqlmx:
spring.datasource.username=
spring.datasource.password=
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SqlmxDialect
spring.datasource.hikari.connection-test-query=SELECT 1 FROM $USER1.TLFM3SQL.IF09CSTB
This is the error:
com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Driver does not support get/set network timeout for
connections. (com.tandem.sqlmx.SQLMXConnection.getNetworkTimeout()I)
JdbcEnvironmentInitiator: could not obtain connection to query metadata: Unable to resolve name
[org.hibernate.dialect.SqlmxDialect ] as strategy [org.hibernate.dialect.Dialect]
I had not included SQLMX hibernate jar in project.
It worked after I included that jar in my pom.
So i upgraded spring-boot-parent-starter to 2.2.8.RELEASE, which results in jooq 3.12.4 . Previously i had 3.11.5.
I am getting the following error
Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:
Property: spring.jooq.sqldialect
Value: MYSQL_5_7
Origin: "spring.jooq.SQLDialect" from property source "applicationConfig: [classpath:/config/application.yaml]"
Reason: failed to convert java.lang.String to org.jooq.SQLDialect
Here is what my application.yaml was before
spring:
jooq:
sql-dialect: mysql_5_7
If you read the whole error message you will see this:
Failed to bind properties under 'spring.jooq.sql-dialect' to org.jooq.SQLDialect:
Property: spring.jooq.sql-dialect
Value: MYSQL_5_7
Origin: class path resource [application.properties]:2:25
Reason: failed to convert java.lang.String to org.jooq.SQLDialect
Action:
Update your application's configuration. The following values are valid:
CUBRID
DEFAULT
DERBY
FIREBIRD
H2
HSQLDB
MARIADB
MYSQL
POSTGRES
SQL99
SQLITE
MYSQL_5_7 is not a value supported by jOOQ open source. It's only availble in the pro version
MYSQL_5_7
#Pro
public static final SQLDialect MYSQL_5_7
The MySQL 5.7 dialect.
This dialect is available in commercial jOOQ distributions, only.
I'm facing issue while connecting Zetezza database from confluent source jdbc connector.
source-jdbc connector properties:
name=source-netezza
connector.class=io.confluent.connect.jdbc.JdbcSourceConnector
tasks.max=1
connection.url=jdbc:netezza://10.245.*.*:5480/DATABASE=mydb,user=admin,password=password
table.whitelist=netezza_str
mode=bulk
topic.prefix=netezza_str_
After executing the command I'm getting below errors
Invalid value java.sql.SQLException: No suitable driver found for jdbc:netezza://10.245.*.*:5480/mydb,user=admin,password=password for configuration Couldn't open connection to jdbc:netezza://10.245.*.*:5480/mydb,user=admin,password=password
I've tried with netezza-3.2.2 jar and nzjdbc jar.
I am still new in Play! Framework universe I i'd like to ask you folk a question. I am trying to connect Oracle to my application. Thus, I added this in the application.conf file:
db.default.driver=oracle.jdbc.driver.OracleDriver
db.default.url="jdbc:oracle:thin:#localhost:1521/test"
db.default.user=scott
db.default.password="tiger"
And of course added the dependenies... But it still not working and throws me a beautiful exception :
"Configuration error : Cannot connect to database [default]"
Am I wrong in something ? Please I really need help.
Thanks.
#
#Frank Schmitt : nope I didn't tried this.
#wwkudu : by running my application, I get this :
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sle
eping for 0ms and trying again. Attempts left: 0. Exception: null
[error] application -
! #6h70iggbo - Internal server error, for (GET) [/] ->
play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [
default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configura
tion.scala:81) ~[play_2.10.jar:2.1.5]
at play.api.Configuration.reportError(Configuration.scala:559) ~[play_2.
10.jar:2.1.5]
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:251) ~[pla
y-jdbc_2.10.jar:2.1.5]
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:242) ~[pla
y-jdbc_2.10.jar:2.1.5]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244) ~[scala-library.jar:na]
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike
.scala:244) ~[scala-library.jar:na]
Caused by: java.sql.SQLException: Exception d'E/S: Got minus one from a read cal
l
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112) ~[ojdbc14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:146) ~[ojdbc14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:255) ~[ojdbc14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) ~[ojdb
c14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
414) ~[ojdbc14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) ~[ojd
bc14-10.2.0.2.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
Check if the Database named test exists
everyone. I use hibernate jpa in play2.0. First I use H2 and it goes well. Then I use oracle instead, and the jpa create tables for me correctly. But when I send any request to play, it report errors:
[info] play - datasource [jdbc:oracle:thin:#58.215.201.110:1521:orcl2167] bound
to JNDI as DefaultDS
[info] play - database [default] connected at jdbc:oracle:thin:#58.215.201.110:1
521:orcl2167
[warn] application - play_evolutions table already existed
[error] application -
! #6b43j2ce2 - Internal server error, for request [GET /] ->
play.api.UnexpectedException: Unexpected exception [sqlexception ora-00942 table or view does not exist]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$3$$anon
fun$1.apply(ApplicationProvider.scala:134) ~[play_2.9.1.jar:2.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$3$$anon
fun$1.apply(ApplicationProvider.scala:112) ~[play_2.9.1.jar:2.0]
at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.2]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$3.apply
(ApplicationProvider.scala:112) ~[play_2.9.1.jar:2.0]
at play.core.ReloadableApplication$$anonfun$get$1$$anonfun$apply$3.apply
(ApplicationProvider.scala:110) ~[play_2.9.1.jar:2.0]
at scala.Either$RightProjection.flatMap(Either.scala:277) ~[scala-librar
y.jar:0.11.2]
Caused by: java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:111) ~[classes12.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330) ~[class
es12.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287) ~[class
es12.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:742) ~[classes12.ja
r:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:206) ~[clas
ses12.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:
789) ~[classes12.jar:Oracle JDBC Driver version - "10.2.0.1.0"]
Try connecting to the database and verify the table does exist(readonly).
In your application.conf file do something like,
evolution=disabled.