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

0
votes
1answer
17 views

Sorting Table and get Position of row

I have a Table with 3 rows. Player, Time, Server. Now, I want 2 things and I don't know how. For Server there are 3 worths available. 1, 2 and 3. Server and Player are a Primary Key together. User ...
0
votes
2answers
67 views

Split a string in different columns on basis of no of spaces

i want to split a string in different columns in the following manner through oracle Input String: hello how are you doing Output: hello how, how are, are you, you doing please help guys.. !! ...
0
votes
4answers
21 views

Pros and cons of a particular DB design approach for single vs multiple tables

I just got a new project (in JAVA) where I am thinking of all the pros and cons of a particular DB design approach. Some pointers: Our app has many "content" entities like News, Blogs, CMS pages, ...
1
vote
1answer
597 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 ...
-2
votes
0answers
18 views

no such column name [migrated]

I am doing this query: SELECT univ._id, univ.firstName, univ.lastName, univ.status, univ.veikla, univ.cellPhone, univ.homePhone FROM universitetas univ in order ...
0
votes
0answers
7 views

Points/Scores display from and to the Database in Android app

I am an absolute beginner to the Android programming and I am trying to develop an Android application using Eclipse where user is able to login/register and is able to see his "white" points based on ...
0
votes
1answer
123 views

Transfer all read request to Slave in Master-Slave MySQL

I have configured master slave on my system (MYSQL). Now, is there is any script or way available or possible to transfer all read request to SLAVE. So, let me make my question here more clear. I ...
1
vote
2answers
45 views

Add function parameter to SQL query WHERE clause

I have a web application in java and it uses a query. I don't want to write the query into Java, so I made a function: CREATE OR REPLACE FUNCTION testFunc(inputs text) RETURNS TABLE(...) AS $$ ...
3
votes
1answer
813 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, ...
0
votes
0answers
6k views

can anyone help “Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/<<hostname>>.pid)” [closed]

Upset because there is no help from the related answer I found here. The version of mysql on my host is 5.6.14-1. The error occured when I start the server as below. Sorry for I can't show the ...
0
votes
2answers
88 views

How to implement a dynamic string into a (prepared) sql statement?

I have some spatial datasets which are available in a open source metadata catalog software GeoNetwork and in a PostGIS database. The problem is that the student who created the database used ...
1
vote
4answers
3k views

How to migrate from MySql to HSQLDB?

I have large amount of data in a MySQL database. There are many databases schemas in the database. How I can migrate from MySQL to HSQLDB? Is there some tool for this? I've exported the data ...
2
votes
1answer
95 views

What are possible causes for consistently volatile INSERT performance in MySQL tables?

I have a Java program running on a VM that is sequentially feeding a queue of single row INSERTs through a single connection to a MySQL server on the same VM. The queue execution is not artificially ...
0
votes
0answers
18 views

MySQL what is the order of the table lock for this query?

An example query looks like this: INSERT INTO Adventure (sword, fighter, quest) SELECT Swords.id, Fighters.id, Quests.id FROM swords Swords, fighters Fighters, quests Quests WHERE Swords._id = ...
1
vote
1answer
24 views

at least one member of a list within another list when querying over a join

assume the current layout in a Mysql datbase Activity (id,etc) [id is primary key] AcitivityMapper (activityID, targetYearID) [composite key] Years (targetYearID, targetYearName) [id primary key, ...
6
votes
2answers
13k views

How to view contents of table in mysql-workbench

Hi everyone am fairly new to mysql, I made a java program that stores data in mysql database. I am using this tool called mysql-workbench that can create databases, tables and much more. What I wanted ...
0
votes
0answers
7 views

How to handle filenotfound condition in java agent running and reading files 24*7 [migrated]

I am having application which runs 24*7 Its java standalone application. it reads log file line by line from configured location. When it doesn't find log file, then it just put exception statck ...
1
vote
2answers
79 views

Are there any special characters that are never allowed in SQL?

I am a Java programmer. We always make database-related things configurable so that they can be easily modified by the DB team as per their requirements. I want to make some queries as configurable, ...
0
votes
0answers
14 views

Can't execute a MySQL stored procedure from Java [duplicate]

I am using MySQL. I gave below permission to Java to execute stored procedures: CREATE USER rateervice@'%' IDENTIFIED BY 'rate$123'; GRANT EXECUTE ON Ratetest.* TO 'rateervice'@'%'; But here Java ...
0
votes
0answers
25 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
2answers
464 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 ...
0
votes
0answers
18 views

Assigning Parent Node Value using IDs

I am using iReport to build a report and I am trying to find the parent node "group_name" value based on a parent_id given, and return the value the parent, as the child's value. For example: Table: ...
0
votes
0answers
45 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
44 views

store code/script value as text in database

I have the following situation: I have to work with software, developed in Java, that allows the user to input some custom scripts in order to do some calculations. so i have to store/save the ...
0
votes
2answers
152 views

Getting a Deadlock,

I have this code : public void saveItems(List<Pair<Item, MapleInventoryType>> items, int id) throws SQLException { PreparedStatement ps = null; PreparedStatement pse = null; ...
0
votes
1answer
152 views

Can't restore from mysql dump file

I used mysqldump command to export/dump .sql file with rows like: String cmd1 = mysqldump + " -h" + host + " -u" + username + " -p" + password + " " + "--compact --no-create-info " + "--where=ID=" + ...
4
votes
1answer
994 views

duplicate key violates unique constraint when using multi-threading

I am using ExecutorService with a fixed thread pool of 50, and a fixed database connection pool of 50, using HikariCP. Each worker thread processes a packet (a "report"), checks if it is valid (where ...
0
votes
1answer
65 views

Java-Hibernate-Oracle: Can a fluctuating DB connection duplicate insert statement?

  Is it possible that a fluctuating DB connection causes insert statement to execute multiple times? Thanks
0
votes
0answers
75 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 ...
1
vote
1answer
188 views

How does Sybase store datatime information?

We have a Sybase database that currently stores datetime values in some of the tables. If we move that server with the Sybase database to another country which is in another time zone, will the ...
0
votes
1answer
44 views

Transforming Huge Database table to Another Table

We are migrating lot of data from our old database to new database. Presently, both of them are actively[writing/reading] used based on flows/activity as migration is in progress. Here's the real ...
0
votes
2answers
1k views

java.sql.SQLException: Login failed for user 'sa'

I am having trouble connecting to my Microsoft SQL Server database through a jTDS connection: Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433 ...
0
votes
1answer
28 views

Oracle structural synchronization [duplicate]

I'm having two oracle databases. A is used for production, B is some kind of staging instance where people are preparing content that is brought to the production system over night. It is a fully ...
1
vote
1answer
136 views

Command line switch to disable Coherence?

We have a Java app that happens to have the coherence jar in the path. My application doesn't need it, so I'd like to pass some type of -D variable to the JVM to tell it to ignore coherence, or ...
0
votes
1answer
60 views

Testing multiple queries from input file

I have set of tables and need to execute select query based on different users. Table names are stored in file and I am looking forward to write a script to execute a script to read table name from ...
0
votes
3answers
279 views

Mongo takes too much memory when insert data

I'm using mongo as a database log. I store on it all the logs of an application, so I have a high rate of inserts, for example 100 inserts per second. To accomplish that I developed a part of the ...
1
vote
1answer
5k views

Oracle XE 11g (ORA-12514: TNS:listener does not currently know of service requested in connect descriptor )

I have already seen the questioned in the stack overflow that might relate to my problem but let me emphasize that none of them could resolve my issue. issue is: when I wanted to integrate OWASP ...
0
votes
0answers
150 views

Bcrypt in Oracle

I am trying to save the user password using Bcrypt algorithm in Oracle 11g. I know this can be done in Java easily, but in this case i want to do this in DB side. Can any one help me in achieving ...
1
vote
1answer
335 views

SpringData MongoDB - infinite getmore on mongo logs

Doing 2 queries on MongoDB through Spring Data on around 160 000 rows, query 1 is executed in few seconds (about 20 results) but query 2 never finish. I'm getting this line over and over on mongodb ...
0
votes
0answers
92 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
1answer
45 views

monitoring sql execution perfomance of an application that makes use of SP_prepare

we have an application that makes heavy use of sp_prepare and sp_execute and we would like to start monitoring the execution plans of the sql. but this is made difficult by the use of sp_prepare ...
4
votes
0answers
264 views

Postgresql JDBC Table Valued Parameters [closed]

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent in PostgreSQL, if ...
0
votes
1answer
154 views

SQl comand works in Workbench but not from Java Program

I am working on a program that manages a database of client information. I am currently stuck on a problem where the SQL statement created by my java program but get the error SQLException: You ...
0
votes
0answers
170 views

oracle timesten in-memory database connection

I am going to connect to Oracle timesten database inside java application. For this purpose I wrote a simple connection class. When I try to run this java class an error " Problems with loading native ...
1
vote
0answers
147 views

how do I debug postgresql 9.1 server terminating

my /var/log/postgresql/postgresql-9.1-main.log shows 2014-03-25 10:39:30 CET HINT: In a moment you should be able to reconnect to the database and repeat your command. 2014-03-25 10:39:30 CET LOG: ...
1
vote
0answers
44 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 ...
0
votes
0answers
352 views

Postgres Backup on linux server [closed]

I am trying to take backup of postgres from InstallAnyWhere which is installer for linux and windows machine. I am calling pg_dump from Java process builder as command line below cmdLine: ...
0
votes
1answer
151 views

Why the table gets deleted by the server in mysql?

I have a table in mysql. I have one java application which will keep inserting the data into this table. So the size of the table grows drastically and at one point it gets deleted automatically by ...
0
votes
0answers
1k 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 ...
0
votes
0answers
88 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 ...