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
votes
0answers
11 views

basic access to the mysql database in java [closed]

I need some basic code which can be used to Access mysql database in java. How To Access MySQL Database From Java Applications?Thanks
1
vote
1answer
39 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 ...
-2
votes
1answer
27 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 ...
1
vote
1answer
61 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 ...
0
votes
1answer
32 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: [...
0
votes
0answers
40 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 ...
1
vote
1answer
47 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 ...
1
vote
2answers
63 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 ...
1
vote
3answers
43 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 ...
1
vote
0answers
35 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 ...
0
votes
1answer
48 views

Connection denied from Java application

I try to connect from my little Java class to Oracle11g database and connection was refused whit SQL error. From Client (SQL Developer) connection works. This is the ERROR when I try to run java ...
0
votes
1answer
117 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..#...
1
vote
1answer
46 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
20 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
110 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
120 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
842 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
159 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
241 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
202 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
355 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 ...
1
vote
0answers
64 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
190 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 ...
2
votes
1answer
600 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
31 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
2k 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
122 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
125 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
72 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
53 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
71 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
511 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
89 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
1answer
34 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
101 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
198 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
306 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
1k 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
393 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 ...
-1
votes
1answer
314 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
67 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
334 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
2k 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
24 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
5k 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
341 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
1answer
652 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 ...