Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
33 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..#...
-3
votes
0answers
10 views

Any souce code to send an image from java using intellij ide to firebase and from firebase to app mobile [closed]

someone tell me a method to use or souce code for this problem please
1
vote
1answer
36 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 ...
0
votes
1answer
18 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 ...
0
votes
2answers
83 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 ...
0
votes
1answer
66 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")....
0
votes
1answer
273 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 ...
0
votes
1answer
43 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 ...
0
votes
1answer
81 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 ...
1
vote
1answer
54 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> ...
1
vote
1answer
155 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 ...
0
votes
0answers
36 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....
-2
votes
1answer
102 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 ...
0
votes
0answers
420 views

Unable to access LOB stream after importing a data-only dump from some tables

We've been working on an application for a long time and after all the tests and adding necessary features, we decided to change the phase from testbed to production. There were tables we needed the ...
2
votes
1answer
283 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 ...
1
vote
1answer
25 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 ...
3
votes
2answers
958 views

Check Java Driver version in clients from Db2 server

I have a Db2 database that is being used by many applications in different servers. I want to check from the Db2 server if the Java driver used in the different client applications is up-to-date. Is ...
1
vote
0answers
87 views

Encrypt through Java and Decrypt through SQL Server AES 256

Am trying to insert some value through JAVA Application with AES Algorithm and need to decrypt the data from the SQL Procedure and need to process a data. Which is the best practice to do so?
1
vote
0answers
93 views

How to get the hierarchy of particular employee using JPA spring boot?

I am trying to find a way to get the employee hierarchy in an organization using JPA and Spring boot. The problem is similar to the following link Similar Data Model If A reports to B and B reports ...
0
votes
1answer
50 views

How to install SWIFT OTD Java library

I would like to write a java stored procedure on Oracle 12. I never did that before. The java programm would check some IBAN and BIC elements. I read about a java library that would do that : SWIFT ...
0
votes
1answer
50 views

SOA and Oracle cascade data between two pdb

I am Java developer and need help for design and manage database . Please view this picture : I have two service named : 1) Authentication Service (Register new user and login) 2) Customer service (...
1
vote
0answers
46 views

Query latency increases when connections to DB increases without any change in query throughput

We are currently using HikariCP to manage our connection pool and our ORM is eclispelink. We have the following observation: On production, when the max number of DB connections to master database ...
1
vote
1answer
416 views

sql server query execution plan via jdbc driver

is there a way to fetch the XML generated by the "Actual Execution Plan" in SQL server 2012 - 2014, but via JDBC driver for Java -- sqljdbc_6.0.8112.100_enu? (preferable forward compatible with 2016) ...
1
vote
0answers
78 views

Issues with MySQL 5.7 user-created temp tables

i have a CREATE TEMPORARY TABLE query that creates a temp table in a particular database and multiple sub-select queries will use that same temp table.On MySQL 5.6, all the sub-select queries will ...
0
votes
0answers
279 views

SQLite Concurrent threads - Using prepared statement and commit

I'm trying to understand a bit how SQLite handles concurrent access from multiple threads from a java application. I have a java application that when executed crunches some data and writes the ...
0
votes
1answer
33 views

What sort of database setup is used for an App Store or Google Play Store? [closed]

I'm trying to build a desktop App Store, and it's just a small project for demonstration purposes, I'll be using java to create the application. In essence it's just a mock App Store that stores ...
2
votes
0answers
82 views

Inserting two NULLs values into an UNIQUE column in SQLite

I use: sqlite-jdbc-3.21.0.jar Error received: SQLite_CONSTRAINT_UNIQUE] A UNIQUE constraint failed: companies.ncf I ask a few things to the user, there is two fields that are optional to complete ...
0
votes
1answer
154 views

ERROR [XulParser] handler not found: W?NDOW

PDI(spoon.bat) crushes on startup. Here's /logs/spoon.log: 09:59:04,793 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled 09:59:08,932 INFO [KarafInstance] **************...
0
votes
0answers
250 views

Eliminating PostgreSQL/database network latency: PL/Java stored procedure VS. Java code running on localhost

A couple years ago, I learned the hard way that having my Java application sitting on one server, with the database sitting on another, and having complex transactions that issue lots of queries each, ...
-1
votes
2answers
790 views

Fetch data from view vs query?

Approach_1 Through SQL query Select * from employee where id = 100 Approach_2 Here is the db view(employee_view) Select * from employee Then use the DB view in sql query from java select * ...
2
votes
3answers
208 views

How to create a normalized database to manage inventory for a small business? [closed]

I am writing a Java application to manage the inventory of a small furniture business. I know little about databases, I have a bit of experience with SQL queries and more experience with Java ...
0
votes
1answer
270 views

How to handle many connections to a large MySQL database

I have multiple java hibernate apps connecting to 1 single mysql DB. Sometimes some of the apps hangs on DB select query. I think it is because of many connections the apps are to DB and remains open. ...
0
votes
1answer
65 views

Update Server JDK and JRE after Oracle Database Installation and creation

Will there be any impact on existing Oracle Database if we upgrade the server JDK/JRE versions in Linux?
0
votes
1answer
14 views

More efficient to do SELECT and compare in Java or DELETE and INSERT

I am hitting a REST API to get data from a service. I transform this data and store it in a database. I will have to do this on some interval, 15 minutes, and then make sure this database has latest ...
0
votes
1answer
263 views

What is the new JDBC 4.3 Connection Request feature with `beginRequest` & `endRequest` methods?

The JDBC 4.3 update arrived with Java 9 2017-10. Amongst its few changes is the new feature on Connection where the beginRequest and endRequest methods signals… Hints to the driver that a request, ...
-1
votes
2answers
1k views

After inserting the character ñ in a table the character will be converted like ñ

when we are inserting the character ñ from application in a table the character will be converted like ñ. I have verified general log and binlog the charecter is showing correctly ñ but when ...
1
vote
1answer
89 views

And Java Justice For All [closed]

Recently, I thought I was gettint into a Oracle Database Administration and Development project, with a heavy load of plsql programming in the form of stored procedures and such. I was struck when, ...
0
votes
2answers
23 views

Is it possible to keep track of which rows were selected and fetched last in MySQL?

I am working on a small website using Java where the user posts are stored in MySQL, I am getting the posts 5 at a time (5 rows using LIMIT 5) by most recent one (using timestamp DESC) and send it to ...
0
votes
1answer
4k views

Database Wrapper Design issue: No operator matches the given name and argument type(s)

I'm building a wrapper for DB access using AWS' Lambda functions Java, the issue I'm having is that Lambda parameters are JSON, thus typeless, so all incoming params are de-JSON'd into Strings, and ...
0
votes
1answer
2k views

Java and SQL error: Unknown column 'newID' in 'where clause'

I have a table called colleagues and it has 6 columns: userid, firstname, lastname, title, squad, and email. The code I have typed for updating the first name is String ID = textID.getText(); String ...
1
vote
1answer
315 views

Do too many subquries create multiple sleeping processes in MySQL?

I am using java & MySQL to make an app. When I check the process list. I see a lot of sleeping processes. It also reaches to a points when no further connection is allowed. I have read many ...
0
votes
0answers
21 views

MariaDB server dropping query from application, other cluster members record said query

Back again with a weird problem; at least to me, someone who hasn't worked with databases all too much. This is a continuation in the two previous questions before but now everything is working for ...
0
votes
1answer
523 views

Getting deadlock on insert and select statement(sql server 2014) in java application

In my application there are many threads which uses insert and select statement to store/retrieve data from database. I am getting deadlock in my production environment, I have observe deadlock from ...
1
vote
1answer
8k views

IO Error: Got minus one from a read call [closed]

I am very new with Oracle, I have installed 11g 64 bit on my Windows 10. And only started the oracle database using emctl start dbconsole. I have the following code to be connected to my database, ...
2
votes
1answer
158 views

Fetch just inserted data in master/slave model?

Say I have MySQL master DB(used for updates) and corresponding Slave DB(used for reads). Now user inserts the data into MASTER through application(java), just after insertion he tries to retrieve the ...
6
votes
1answer
7k views

How to UPDATE a SQLITE Column with an INNER JOIN on TWO FIELDS

How can I translate this query to SQLite: UPDATE Table_1 INNER JOIN Table_2 ON (Table_1.Field1 = Table_2.Field1) AND(Table_1.Field2 = Table_2.Field2) SET Table_1.Field3 = Table_2.Field3 This is ...
1
vote
2answers
562 views

Java application unable to connect to MariaDB Galera cluster

I was debating whether to post this question here or on Stack Overflow but through my own examination, I believe this to be a server-side issue over Java code being wrong. My goal for this project is ...
1
vote
2answers
84 views

Need a database recommendation [closed]

I am developing a small application and I need some advice on how to move forward with it. At it's core the program generates PDF checklists to help configure devices. All devices have a different ...
8
votes
2answers
1k views

Why does Oracle use a different byte length than java for the supplementary unicode character chipmunk?

I have java code trimming a UTF-8 string to the size of my Oracle (11.2.0.4.0) column which ends up throwing an error because java and Oracle see the string as different byte lengths. I've verified my ...
1
vote
1answer
1k views

Query input must contain at least one table or query error

I'm working on a java program that connects to a Microsoft Access database and displays the data in a GUI. I'm currently trying to code a button that adds a new row to a table called Grade that holds ...