Java is an object-oriented language and runtime environment. Java programs can run unchanged on most platforms in a Virtual Machine called the JVM.

learn more… | top users | synonyms

4
votes
2answers
2k views

How to separate out individual sql statements from Oracle SQL script for execution from java code

I have Oracle DB 11g Enterprise Edition and I want to execute sql script from my java code. I am reading this sql script from a .sql file and the script contains statements such as create table, ...
1
vote
2answers
39 views

Causing ORA errors in a program using JDBC. How can I find what's causing them?

So I'm building a java app to interface with the company's database. Whenever it causes an ORA error, it just prints something like the following to system output: ORA-00911: invalid character Is ...
2
votes
1answer
219 views

How to connect DB2 with eclipse on mac?

I tried to connect the DB2 Express-C Version 10.1 to Eclipse Mars but it returns an exception when I tried to run the program. com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: Error ...
1
vote
1answer
88 views

Error in loading data using DB2 load command in DB2 10.5

I have a IBM DB2 database in our application. We have a monthly Java batch process which loads data in the tables using "load Replace" sql command. Around millions of record will be updated every ...
0
votes
1answer
48 views

what is the consequence of setting enableQueryTimeouts to FALSE?

MySQL Connector-J has a property enableQueryTimeouts which is TRUE by default. However, in the documentation it is mentioned as : When enabled, query timeouts set via Statement.setQueryTimeout() ...
0
votes
1answer
204 views

JDBC Exception JZ0BE: BatchUpdateException: A user with System Administrator (SA) role must reconfigure the system to enable Java

I am using Sybase JDBC JConnect3 driver to insert large data in a table using Batch Insert feature of JDBC. I am preparing a batch of 100 inserts and executing the batch. But it is throwing below ...
0
votes
1answer
297 views

Tracking the update or changes in mysql table

I need to stream the changes to elasticsearch to keep in sync with my database(mysql). What will be best way to do this ? I have thought for below approaches Using trigger( but my table will have ...
0
votes
1answer
27 views

What are the type of drivers for Communication with Java?

I am developing one application using core java and Mysql Database. As i read in Most of the site, they suggest that use type 4 driver for communication using JDBC. In JDBC Connection i have use ...
0
votes
1answer
1k views

Oracle Database 10g JRE Error

I am trying to install Oracle Database 10.2 on OEL5U6(Linux System). I followed all the instructions from HERE. When I am executing installer this return: Preparing to launch Oracle Universal ...
-1
votes
1answer
111 views

Database design for timetable in mysql

I have to make a web application in java. The web application is like a online appointment book. Everyday of the week has 1 column with times from 9.00am to 10.00pm (only full hours). I already ...
2
votes
0answers
1k views

h2 Java server synchronization and caching

I'm happily coding a client-server application in Java using H2 as database. The server runs the database as an embedded local database while clients connect to it via TCP. Now more and more I see ...
1
vote
0answers
527 views

How to drop invalid Java classes from Oracle?

I tried to load some jars into my database, but I think I messed up something, because I tried as DBA and then with some oracle user... This was my first command: call dbms_java.loadjava('-genmissing ...
1
vote
0answers
67 views

HQL pagination returns same result on different pages - with SQL

We have the following query in the server (using sql): Query query = this.entityManager.createQuery( "SELECT type, id, date, amount FROM Transaction ORDER BY type ASC"); The type field ...
1
vote
0answers
8 views

JDBC - maximum allowable cursors - how do I see my open statements?

I've got some resource leaking and I'm trying to find what's causing them. I think I have some statements or resultsets that aren't being closed properly. Is there any way to see all of the cursors ...
1
vote
0answers
86 views

Is it a good idea to have too many named locks?

I am using MySQL as a data store and a Java App on the top. There are many state changes that happen, and I am seeing some concurrency bugs in there. I wanted to know if I can use named locks ...
1
vote
0answers
49 views

Database tuning and possibly unexpected results

(This is cross-posted from stackoverflow; I initially put it in the wrong place.) So I have a database that's working a bit slower than I would expect and I'd like to describe what I'm doing so ...
1
vote
0answers
2k views

'oracle.jdbc.driver.OracleSQLException': ORA-01031: insufficient privileges. (SYS.DBMS_XMLSAVE)

I have this function (written here by someone), placed in the package ENVER.ENCODING_VERIFIER: FUNCTION loadxml_table (p_owner IN VARCHAR2, p_tablename IN VARCHAR2, p_format IN VARCHAR2, p_tmpClob IN ...
1
vote
0answers
1k views

Best way to synchronize several databases in different computers

I must to do a POS program for college in Java, the problem is that I don't know how to link the different computers to a master computer that handles the changes of the database and sends them to the ...
1
vote
0answers
679 views

jTDS + stored procedures + prepareSQL = nesting level error?

Situation A (Tomcat) Java web application using jTDS to connect to a MSSQL 2008 database. This Java application for 99% executes MSSQL stored procedures using user input. Problem The jTDS driver ...
1
vote
0answers
736 views

Cannot remove .bak file

I have a java application that: Reads a .bak file from a windows fileshare and restores it in SQL Server on a remote windows server Does various modifications on the database restored from the .bak ...
1
vote
0answers
355 views

Populate database column with drop-down menu item

I'm quite new to Apex and Oracle in general, but I would like to know how to populate a database column with the data from the drop-down list Currently I'm not getting further than simply creating ...
1
vote
0answers
363 views

mysql server is not sending result set back after query execution to client and staying in sending data state

When I pass a query from my Java application to mysql server, it stays in Sending Data state and not returning result set back to application. When I execute the same query in SQLYog directly, it ...
0
votes
0answers
5 views

What is the advantage of using Spring beans for DB connection?

I am new to java spring and I'm just wondering if placing the db connection in spring beans has a great advantage?
0
votes
0answers
13 views

Hibernate not using the max id while inserting record

I have a table with over 54000 entries. I had imported this data from a CSV file. When I use hibernate and try to insert a new row into this table, its not picking up the max id adding one and ...
0
votes
0answers
19 views

NoSQL : Getting latest item from DynamoDB table

I'm implementing chat server currently, with dynamoDB. Here is keys from ChatData table Primary partition key : roomNo Primary sort key : seq Chat server, can created many instant rooms, ...
0
votes
0answers
35 views

Query hung or way too long?

As part of the proccess of new items added to our system, some tables and relations are created programmaticaly via trigger, but it seems to be failing quite often right now. The DDL seems to be ...
0
votes
0answers
27 views

Mongo aggregation query on time series data

I am storing some user frequency data on site. Data looks like this { "uid" : "5b2db719-1943-408f-ec06-f88f663f5d56", "pgAccessTime" : NumberLong("1457073369030"), "day" : ...
0
votes
0answers
32 views

Mariadb Prepared Statements stopped working, they were OK last week, I need help locating the issue

I have a number of stored procedures that were working perfectly well last week, but this week are causing me problems. The first problem is I seem to be getting the following: Mariadb SQL ...
0
votes
0answers
51 views

Oracle session leaks

We use an API made by IBM that appears to not properly close Oracle sessions in certain cases. IBM suggested we file a bug report but it is unlikely that this will be resolved soon, and so we are ...
0
votes
0answers
15 views

Is it possible to call java API from mysql stored procedure?

I am using stored procedure to migrate data from one schema to another schema. I need to use some complex logic which is already implemented as java API. Is it possible to call java API from mysql ...
0
votes
0answers
46 views

DB table design for attributes with multiple entries (eg: Person -> Social Media)

I am trying to decide the structure of a DB table to store Employee data. I am bit confused on how to design attributes such as Address, Social Media etc. There should be provision for multiple Social ...
0
votes
0answers
46 views

postgresql columns are inside quotes - “ ” and uppercase but occurs relation does not exist error when queried in java

I'm using Java and Postgresql and I've created a relation "UserTable", and when I open PgAdmin, this is how I see my database. But when I query the UserTable, in Spring Tool Suite using Java, I get ...
0
votes
0answers
23 views

Performance issue for daily calculations - Sybase Adaptive Server

I need an advice from the community, there is no wrong answer I'd like to have as many advice that I can ! I manage a process that does every day a lot of financial calculations and they are ...
0
votes
0answers
80 views

SQLite no such column: table.columnName

I have a query SELECT Bookies.Name, Exchanges.Name, Bets.Completion_Date, Bets.BMStake, Bets.Liability, Bets.Profit, Bets.Type, ...
0
votes
0answers
63 views

MYSQL- concurrency issue

I use JDBC to connect to MySQL. order_items table order_item_id order_id quantity unit_price shipping_price business_id workflow_id delivery_id item_id Orders table billing_address_id ...
0
votes
0answers
127 views

How to generate a JSON file from stored procedure(SQL) result

I want to get the data from DB using stored procedures in the form of a JSON file. In simple words, my output should be a JSON file which should be the result of data in DB (collected by a stored ...
0
votes
0answers
58 views

Need to make sure database is fully normalised and all is accessible using MySQL and Java EE

So as per the picture: I need to create the roster table with all the data from the connecting ones - Each Roster entry will have the country,state and city, tech and subtech and client. Then ...
0
votes
0answers
145 views

Buffer too small for CLOB to CHAR or BLOB to RAW

I am trying to select a clob from database to put it in a jasper report. The query is: <queryString language="SQL"> <![CDATA[ select to_char(PLAN_DESCRIPTION) as PLAN_DESCRIPTION ...
0
votes
0answers
313 views

Out of memory error from Java stored procedure

I have a Java stored procedure inside Oracle 11g database. The procedure uses lots of memory, so I'm setting the max memory size in same session: create or replace function setMaxMemorySize(num ...
0
votes
0answers
99 views

New Table vs Java Beans to allow user to dynamically change data representation?

I am building a database to store the assessment records of students, along with other relevant information and functionality like reporting on average scores etc. Currently my company uses Excel for ...
0
votes
0answers
253 views

Saving String as unique number in Mongo

I have a field in my collection which is a String in nature. When i run aggregation for this field in data it takes considerable time in aggregation. Total 6 million records are in collection which ...
0
votes
0answers
52 views

User or Role is Missing

I'm using a stored procedure in oracle 11g r2 but when I call it from java it says that I'm missing the user or role name when it executes this sql sentence: no_dml := 'CREATE USER ' || no_carne || ' ...
0
votes
0answers
162 views

How can I trace Oracle database transaction

I'm developping a JavaEE app deployed on IBM WebSphere 7. We are facing performance issues, especially a high amount of transaction commits. We are using JPA with Hibernate as a provider. Does ...
0
votes
0answers
180 views

MySQL insert Needed data only then send it to crystal report

I'm Working on a big project more than 200 table, I'm using MySQL(Percona), Java & Crystal Report JRC. I have some reports which so big & has a lot of joins between multiple tables. Inside the ...
0
votes
0answers
262 views

Where can I download jvm files for oracle on ubuntu

I want to install Java packages for oracle, and I found following files in the internet. @?/javavm/install/initjvm.sql; @?/xdk/admin/initxml.sql; @?/xdk/admin/xmlja.sql; @?/rdbms/admin/catjava.sql; ...
0
votes
0answers
150 views

non-optimized regex and substr with injected list in mysql query

edit: I can replace phone, -10 (that is last 10 digits of phone ) with full phone digits. on tip i got is SELECT….FROM… WHERE phone IN (…) UNION SELECT … FROM … WHERE email IN (…) edit end I am ...
0
votes
0answers
178 views

My transaction's max time is going beyond a minute

I have a transaction called "updatePolicyStatus" whose response time is usually under a 3 seconds for many instances during a peak load. This transaction processes bunch of business rules and fires ...
0
votes
0answers
853 views

how to restore sqlite dump file to sqlite database using java?

I generated dump file from java using .dump command so my back-up is ready now I want to restore it to once again so can anyone help me how to restore? In stackoverflow I got this but nothing restore ...