Questions tagged [java]

Use ONLY if Java is directly relevant to the question and likely to be the source of your problem, not just because you're using a Java library to connect to a database. Java is an object-oriented language and runtime environment. Java programs can run unchanged on most platforms in a Virtual Machine called the JVM. If you have a general programming question about Java, please ask it on Stack Overflow instead.

Filter by
Sorted by
Tagged with
1 vote
1 answer
43 views

Run MSSQL stored procedures containing SSIS packages using Windows Authentication from another computer

I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: PC400 (Computer/Server A), where SQL Server 2012 is installed ...
user avatar
0 votes
0 answers
12 views

Failed to run sqldeveloper in Ubuntu 22

I am trying to run Oracle sqldeveloper in my Ubuntu 22 VM. I downloaded the sqldeveloper zip file and ran below code sudo unzip ~/Downloads/sqldeveloper-3.2.20.09.87-no-jre.zip Then I ran cd ...
user avatar
  • 101
1 vote
0 answers
23 views

SSL connection error when connecting to MySQL, using JDBC

The problem that we are facing is well documented in https://stackoverflow.com/questions/34189756/warning-about-ssl-connection-when-connecting-to-mysql-database. We started facing this issue upon ...
user avatar
  • 235
0 votes
0 answers
28 views

why does external java function terminate recursive cte?

I made a peculiar observation regarding external functions written in java which I hope someone can shed a light on. I tried it with several functions, but I'll use one of them as an example here: ...
user avatar
  • 21.1k
1 vote
2 answers
95 views

I cannot create a table in mysql

create table Statistics_tbl with ( SELECT Todo_tbl.person, SUM(Todo_tbl.duration) FROM Todo_tbl JOIN Statistics_tbl on Todo_tbl.person = Statistics_tbl.person GROUP BY person; ); The issue is that ...
user avatar
0 votes
1 answer
25 views

How can I join two tables in mysql, so that whenever I add data to table 1, table 2 updates as well?

This is the code creating my first table create table Todo_tbl ( id INT auto_increment, person VARCHAR(45) , task VARCHAR(45) , duration INT(4), deadline_day VARCHAR(2), deadline_month VARCHAR(2), ...
user avatar
0 votes
1 answer
34 views

How to automatically update table, whenever data added to another table?

I have created two tables in MySQL. One (Todo_tbl) holds the data while the other (Statistics_tbl) hold the sums one of the variables from Todo_tbl. Following the definitions of these tables: create ...
user avatar
0 votes
0 answers
73 views

How to load Java in Oracle Database using SQL Developer?

I'm running Oracle 19. I would like to load some Java classes using SQL Developer, but the option is greyed out. Is there any necessary grants to do that? Or is there any other way to do it via SQL ...
user avatar
  • 131
0 votes
1 answer
47 views

When should I use Index on PostgreSQL? [closed]

In my Java (Spring Boot app), I have the following entity definition which has a relationship with Company entity via companyUuid property. I will also let users to search by name field. We do not ...
user avatar
  • 3
0 votes
1 answer
102 views

how do I copy oracle java stored procs from one database to another?

I have an oracle database with some java stored procs. I am creating a dockerized version of the database for our developers to use. I can use oracle sql developer to copy all normal pl/sql procs to ...
user avatar
  • 127
-1 votes
1 answer
29 views

I want to drop existing table space and add the freed space to the new table space in oracle

I want to drop existing table space and add the freed space to the new table space in oracle. I am trying drop an existing tablespace on oracle db, and then use the freed space for a new table space. ...
user avatar
  • 1
0 votes
0 answers
10 views

Optimal way of running hundreds of thousands of DDL/DML statements MySQL

I have about 500k DDL/DML statements that need to be run against a MySQL 5.7 INNODB RDS instance from scratch. A significant portion of these are created table statements. I'm currently employing a ...
user avatar
0 votes
0 answers
36 views

SQL connections to java applications

I have an MSSQLServer2000 database that seems to have been working just fine until today. The DB connects to a java application on a remote server that passes the database data (login credentials, ...
user avatar
  • 75
1 vote
0 answers
192 views

Error occurred in Spring boot + Gradle + Oracle jdbc + jsp project

I'm doing Spring boot project, and I'm trying to add dependencies which are ojdbc8 and tomcat-embed-jasper. ojdbc8 library is for connecting Oracle database by using Hikari, and tomcat-embed-jasper is ...
user avatar
1 vote
1 answer
2k views

Can Microsoft JDBC Driver 4.0 connect to SQL Server 2019 and perform DML without issue?

The SQL version compatibility BOL article advises that the minimum compatible JDBC driver version for SQL Server 2019 is 7.4. Can an older JDBC driver still connect to SQL Server 2019? Or can only the ...
user avatar
  • 1,437
0 votes
1 answer
75 views

What is the format of EXTERNAL NAME argument?

When a Java class cl with a method mth resides in a package pck, what should I put into the EXTERNAL NAME clause of CREATE PROCEDURE? I tried CREATE PROCEDURE mth (arg1 INTEGER) LANGUAGE JAVA EXTERNAL ...
user avatar
1 vote
1 answer
2k views

How to configure TCPS in JDBC thin client for oracle

An Java Application running with JDBC thin wtih TCP connection, Now require is to convert in TCPS for encryption transmission from application to database. String url = "jdbc:oracle:thin:@(...
user avatar
0 votes
1 answer
62 views

Queries of MySQL from Java are executed serially from multiple threads

I have REST API developed in spring + java and hosted on Tomcat server. I have a MySQL database where i store all my data. API makes just simple select from db as descripted below. I failed ...
user avatar
0 votes
1 answer
43 views

does using optimizer_mode=first_rows_n for application that using Oracle database is a best practice?

So I'm working in application that involving display of data in table/grid. And the grid will invoke paging query to oracle. So does by tuning my application to get the best query cost with ...
user avatar
0 votes
0 answers
31 views

Update table_name set column1 from where column2 (column2 mutiple diffirent value)?

Hi I'm working with this Query to update all the row in the table using a String of multiple values. I'm trying some Query but i get an error the error is "Truncated incorrect DOUBLE value" this is ...
user avatar
2 votes
1 answer
146 views

How to determine if Oracle Java classes are being used

Oracle EE 12.1.0.2 As part of a general clean up of a legacy application prior to a migration I'm trying to determine what objects are actually in use. There are some 230 JAVA class objects in my ...
user avatar
0 votes
1 answer
492 views

Install Oracle Weblogic: Unsupported major.minor version 52.0 [closed]

I tried to install Oracle Weblogic on Redhat Linux 8 using command java -jar fmw_12.2.1.4.0_wls_quick.jar but got an error: Unsupported major.minor version 52.0 Java version java version "1.7....
user avatar
0 votes
1 answer
148 views

how to get data from two tables in mysql query with where Pk of one table is set as foreign key on PK column for other table?

The query I am using to retrieve data is as "select sum(totalbill) as tbdb, sum(discinamount) as tddb, sum (billafterdisc) as tbaddb," + " sum(totalqt) as tqdb," + " sum(payed) as tpdb," + " sum(...
user avatar
0 votes
1 answer
123 views

Use quoted schema in an insert statement executed thorough PreparedStatement in Java

I created an unquoted table my_table under a quoted schema "Quoted_User". When executing the statement INSERT INTO "Quoted_User".my_table (custom_id) VALUES (DEFAULT) using the Intellij Oracle ...
user avatar
0 votes
1 answer
278 views

pg replication connection not returns wal events to java code client , it hangs some times

Describe the issue We are facing issue of pg replication slot not listen database wal events. Once pg database restarted and we attach Driver Version: 42.2.6 Java Version: JDK1.8 OS Version: Window ...
user avatar
1 vote
2 answers
1k views

Does oracle client 12c requires Java on windows

if I install Oracle 12c client on window server, does it get Java installed? can we install oracle driver/client without Java?
user avatar
  • 173
1 vote
1 answer
249 views

Oracle save mandarin characters with we8iso8859p1

Im trying to save Mandarin characters into Oracle instance database 11g. Field datatype - NVARCHAR2 ; NLS_LANG - AMERICAN_AMERICA.WE8ISO8859P1 If I change NLS_LANG, it will affect other data already ...
user avatar
  • 11
-2 votes
1 answer
31 views

Should I use the LIKE predicate or fetch all rows and process them on the client?

I am optimizing my application, while this task, I find one query which is fetching data from database using like . and database rows are around 10000. So is this a good way to use like in query or I ...
user avatar
1 vote
1 answer
143 views

Troubleshooting oracle database errors from cloud application

I am trying to troubleshoot an issue that presents as different database errors such as, ORA-01000: maximum open cursors exceeded or Unable to create DB Connection. I have reviewed the PLSQL to ...
user avatar
0 votes
1 answer
1k views

How to determine/set the Java classpath for an Oracle DB?

l am trying to make use of some proprietary Oracle Java classes/methods using an Oracle provided virtual machine (E-Business Suite Vision, Oracle 12.2.28) On my test server I define a function: [...
user avatar
  • 101
0 votes
0 answers
573 views

SQLServer JDBC Driver]Object has been closed

I had few queries in code which were running in loop. They all were wrapped inside a code function. There were frequent deadlock with the queries. Because I do not understand the logic too well, I was ...
user avatar
1 vote
1 answer
426 views

Which java JDK is compatible with oracle instant client 10g

I'm an intern stuck trying to retrieve data from Oracle 8i (a database that is as as I am) The problem: I need to write a java script that pulls data from Oracle 8i into a newer server. The last ...
user avatar
1 vote
2 answers
158 views

Reading data from oracle 8 in 2019

I'm an intern stuck dealing with a database system that is as old as I am. The Issue: I have a perl script pulling data from a server running Oracle 8 (8.1.7) and placing the data into a .csv. The ...
user avatar
1 vote
3 answers
90 views

When I connect to DB, always connects as tempdb

I am trying to run a sybase DB query from a jsp session. I can connect to the DB fine, but when I run my query, by default it always runs against tempdb. Is there a way I can make a connection to ...
user avatar
  • 11
1 vote
0 answers
119 views

Is there a way to open an encrypted Oracle Database wallet through weblogic JDBC drivers?

I encrypted a column in an Oracle 12c database using the TDE method, The said column was being used in my application, The column becomes unavailable due to the Database wallet being closed. To open ...
user avatar
0 votes
2 answers
412 views

Connection denied from Java application

I try to connect from my little Java class to Oracle11g database and connection was refused with a SQL error. From client (SQL Developer) connection works. This is the ERROR when I try to run java ...
user avatar
-1 votes
1 answer
383 views

executing SQL query with temp tables using 1.6jdk

I created a batch to run a query that has temp tables as the below example IF OBJECT_ID ('tempdb..#TEMP1') IS NOT NULL DROP TABLE #TEMP1 select * into #TEMP1 from cutomer IF OBJECT_ID ('tempdb..#...
user avatar
1 vote
1 answer
81 views

Pitfalls when using Java stored procedure

Recently I have worked on a project that I assume could be solved by using Java stored procedure (more precisely some recieving/sending email package). Аfter a while I've found that there are very ...
user avatar
  • 141
0 votes
1 answer
46 views

Accessing mysql database without logging in (from android java application) (using php server side) [closed]

Just like all e-commerce applications (like amazon) let you access the database and browse items without logging in or signing up, how can i do this with mysql database (without logging in with ...
user avatar
  • 1
0 votes
2 answers
497 views

Restore or reset Oracle database (No Flashback features)

I am running Oracle Database 11g Release 11.2.0.4.0 - 64bit Production Seem it not Enterprise edition, so I not able to use flashback features SQL> ALTER DATABASE FLASHBACK ON; ALTER DATABASE ...
user avatar
1 vote
1 answer
1k views

Insert Into queries take too much time in Apache spark

I am using Oracle Database with Apache spark 2.3.0 In my code I am writing final output (after all the processing) in three tables using below spark command. billableChargeKDF.write().mode("append")....
user avatar
3 votes
1 answer
7k views

Keep H2 in-memory database between connections

I create and use a H2 database in-memory (no writing to storage) for demos and quick tests using this code in Java: Connection conn = DriverManager.getConnection( "jdbc:h2:mem:example_db" ) ; This ...
user avatar
0 votes
1 answer
747 views

MySQL MONTH Clause: Want to get Month Name instead of number

My query is SELECT MONTH(`hire_date`) AS month FROM `emp_tbl` I'm getting output in Java fx if(resultSet.next()){ int month = resultset.getInt('month'); // output is like 11 } Then I ...
user avatar
1 vote
2 answers
2k views

PostgreSQL: PreparedStatement to execute set schema command

I need to execute in a Java application a SET schema ? statement, where the placeholder is replaced by a value provided at runtime by the caller. I assumed I could use PreparedStatement to overcome ...
user avatar
1 vote
1 answer
1k views

mysql deadlock when update some items whose id are selected from another table

I'm sorry, I just can speak a little English. I have two machines(10.10.102.101, 10.10.102.104) which connect to the same mysql datebase. This is a table and deadlock happened on it. mysql> ...
user avatar
1 vote
1 answer
528 views

Is it overkill to encrypt an already hashed BCrypt password?

I'm using BCrypt to hash my passwords on the server side. Before I store it in my MySQL database, would it be overkill to encrypt my hashed-BCrypt password or would storing the hash directly in the ...
user avatar
  • 39
1 vote
0 answers
604 views

Db2 and java11?

Any rumors on when Db2 (LUW) will officially support Java 11? As of now, the officially supported version is 8: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.db2.luw.qb.server....
user avatar
  • 21.1k
-2 votes
1 answer
495 views

Database design for a timesheet app?

I'm designing the database schema for a time tracking application and I need a little piece of advice. The application must permit the user: To enter for each day of the week the amount of time he ...
user avatar
3 votes
1 answer
8k views

Trying to connect a PostgreSQL database to Eclipse

I have a Postgres (version 9.2) database running on a Centos 7 machine, and I'm trying to connect to it from Eclipse Oxygen on a Windows 10 machine using the Data Source Explorer. When I put in all ...
user avatar
1 vote
1 answer
41 views

@OneToMany mapping but only one is needed

I have to create a new table to store version numbers of Terms&Conditions user have accepted and the time stamp of when they click accept. (This table only contains info related to user. Info ...
user avatar

1
2 3 4 5