jdbc

no suitable driver found error for JDBC DERBY

若如初见. 提交于 2021-01-29 05:34:58
问题 I have run this program over and over, and got no error. But when I packaged it up into an executable it wouldn't run. So I deleted my derbyDB file to run from scratch and get a better sense of the error from intellij. It is saying there is no suitable driver for the derby connection. I have checked the product structure, the jar is in the right place, and the DERBY_HOME variable is still correct. Does anyone have any ideas error message: "C:\Program Files\Java\jdk1.8.0_131\bin\java" -Dfile

jdbc to MYSQL error: “table airportdetails doesn't exist”

你。 提交于 2021-01-29 04:59:22
问题 I am trying to connect to a MySQL database from a jsp page using jdbc in the backend. I have the following code: public static void insertIntoDatabase(String code,String name,String temp,String hum,String del) { Connection con = null; if (del.length() == 0) { del="no data"; } name = name.replaceAll("\\(.+?\\)", ""); name = name.replaceAll(" ", "_"); del = del.replaceAll(" ", "_"); System.out.println("del "+del); String url = "jdbc:mysql://localhost:3306/test"; try { Class.forName("com.mysql

Include JDBC driver for Postgres in the JAR fo my simple demo app driven by Maven [duplicate]

蹲街弑〆低调 提交于 2021-01-29 04:13:24
问题 This question already has answers here : How can I create an executable JAR with dependencies using Maven? (31 answers) Closed 1 year ago . How to make Maven include the JDBC driver for Postgres inside my app's .jar file? I added this dependency element to the <dependencies> element in my POM. <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.8</version> </dependency> The

Hsql - create schema if not exists in spring boot application

邮差的信 提交于 2021-01-29 03:27:04
问题 I am using embedded hsql db in my spring boot application and want to create a schema only if does not exist in the db. Assuming the schema name is XXX, I have the below single statement schema-hsql.sql file: CREATE SCHEMA XXX IF NOT EXISTS However this is faing with below stack trace: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/xxx/schema-hsql.sql]: CREATE SCHEMA XXX IF NOT EXISTS; nested exception is java

Hsql - create schema if not exists in spring boot application

微笑、不失礼 提交于 2021-01-29 03:13:46
问题 I am using embedded hsql db in my spring boot application and want to create a schema only if does not exist in the db. Assuming the schema name is XXX, I have the below single statement schema-hsql.sql file: CREATE SCHEMA XXX IF NOT EXISTS However this is faing with below stack trace: org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/xxx/schema-hsql.sql]: CREATE SCHEMA XXX IF NOT EXISTS; nested exception is java

How can I get external table jdbc url in SnappyData

爱⌒轻易说出口 提交于 2021-01-29 01:37:37
问题 Previously I created an external table in SnappyData like this: create external table EXT_DIM_CITY using jdbc options(url 'jdbc:mysql://***:5002/***?user=***&password=***', driver 'com.mysql.jdbc.Driver', dbtable 'dim_city'); but now I forget the mysql jdbc url that EXT_DIM_CITY referred to. How can I get the jdbc url from SnappyData? 回答1: With the latest SnappyData release 1.0.2.1, all table properties can be seen with extended describe: describe extended EXT_DIM_CITY The properties will be

How can I get external table jdbc url in SnappyData

╄→尐↘猪︶ㄣ 提交于 2021-01-29 01:34:38
问题 Previously I created an external table in SnappyData like this: create external table EXT_DIM_CITY using jdbc options(url 'jdbc:mysql://***:5002/***?user=***&password=***', driver 'com.mysql.jdbc.Driver', dbtable 'dim_city'); but now I forget the mysql jdbc url that EXT_DIM_CITY referred to. How can I get the jdbc url from SnappyData? 回答1: With the latest SnappyData release 1.0.2.1, all table properties can be seen with extended describe: describe extended EXT_DIM_CITY The properties will be

Can't find jdbc driver? [duplicate]

主宰稳场 提交于 2021-01-29 00:59:02
问题 This question already has answers here : Connect Java to a MySQL database (14 answers) Closed 5 years ago . I've started learning how to connect MySQL database with Java. And since I'm total beginner I was looking for the most basic guide and found this . It looks easy, quite understandable and helpful. But when i run that code it shows an error and the table is empty. :( CODE: import java.sql.*; import java.util.Calendar; public class DatabaseClass { public static void main(String args[]){

Can't find jdbc driver? [duplicate]

谁都会走 提交于 2021-01-29 00:51:42
问题 This question already has answers here : Connect Java to a MySQL database (14 answers) Closed 5 years ago . I've started learning how to connect MySQL database with Java. And since I'm total beginner I was looking for the most basic guide and found this . It looks easy, quite understandable and helpful. But when i run that code it shows an error and the table is empty. :( CODE: import java.sql.*; import java.util.Calendar; public class DatabaseClass { public static void main(String args[]){

Can't find jdbc driver? [duplicate]

人走茶凉 提交于 2021-01-29 00:43:49
问题 This question already has answers here : Connect Java to a MySQL database (14 answers) Closed 5 years ago . I've started learning how to connect MySQL database with Java. And since I'm total beginner I was looking for the most basic guide and found this . It looks easy, quite understandable and helpful. But when i run that code it shows an error and the table is empty. :( CODE: import java.sql.*; import java.util.Calendar; public class DatabaseClass { public static void main(String args[]){