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
0answers
25 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 ...
4
votes
0answers
86 views
+100

MySQL Commited data not seen to select query

Context: The framework used is Spring and all queries are run with JdbcTemplate. Mysql Server version is 5.6.19. The table is an InnoDB table and defaults like auto commit and isolation level ...
1
vote
0answers
9 views

Connection Reset by Peer Socket Write Error - How to solve in SQL Server?

We have a vendor working on Java (JDBC) application saying they are getting the error "Connection Reset by Peer: Socket Write Error". They are insisting that the SQL Server (SQL Server 2012) is ...
0
votes
0answers
8 views

Java error: The url cannot be null ( netbeans and wampserver) [migrated]

I'm creating a java application (stock management) with Netbeans and Wampserver, I create the stock_db_connection class and the Login class, and I want to test if it's work or not, when I click run ...
0
votes
1answer
33 views

What is the best way to take backup for Remote DB Server

I am building a software, which will supports multiple database like MySQL, Oracle and PostgreSQL. These databases are installed on remote machines. i wanted to use java technology in a non-database ...
1
vote
0answers
5 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 ...
0
votes
0answers
34 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 ...
0
votes
0answers
34 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 ...
1
vote
1answer
16 views

JDBC prepared statement - make a token null

So, I have an insert statement in a Java program I'm writing. Under some conditions, I want it to insert some values as null. However, before I can execute the statement, I have to set all of the ...
0
votes
1answer
51 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 ...
1
vote
1answer
113 views

Syntax error using preparedstatements with postgresql

I have a Java application connecting to a PostgreSQL database. Using straightforward code like: ps = con.prepareStatement(sql); if (dataTypes != null && dataTypes.size() ...
1
vote
2answers
33 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 ...
0
votes
2answers
68 views

Query syntax is checked at java level or Database Level?

If i used normal JDBC Connection for accessing database of Mysql, The syntax of query is checked at java level or Mysql level. Example String Query="Select * fromEMP" above wrong query syntax throw ...
0
votes
0answers
22 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 ...
-1
votes
1answer
80 views

MongoDB denying API access, while console shell works

I am a MongoDB newbie, with a MongoDB instance running on a Ubuntu machine. If I login onto the machine's console and run mongo -u username -p password databasename I have permissions for the ...
0
votes
2answers
136 views

Install JVM for Oracle 11g XE

I am trying to configure JavaMail in my Oracle 11g XE(11.2.0.2.0) database, which requires loadjava utility. But after some research I came to know that XE version of Oracle doesn't provide Java/JVM ...
0
votes
0answers
92 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 ...
1
vote
1answer
85 views

SQL Server 2012 CPU usage spikes to 100%

I am using SQL Server 2014 in AWS and the AWS image configuration is 4 cores and 16GB RAM(m3.xlarge). I am running the following simple query, SELECT * FROM user_table WHERE user_id = '10' ...
0
votes
2answers
177 views

No suitable driver found Orientdb jdbc driver

I have some problems with Orientdb driver for jdbc. i´m using Netbeans, i have include the library JDBC+OrientDB libraries (orientdb-jdbc-2.0.8-all.jar) in the directory and in netbeans, i have also ...
0
votes
1answer
51 views

In MySQL why is the first batch executed through client-side prepared statement slower?

I have around a million lines to be inserted into a MySQL (InnoDB) database, so to speed things up I turned to batch/multi-line insert. To be specific, I connect to the database (I'm using Java, so ...
0
votes
0answers
47 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
65 views

HSQLDB like datasource to JAVAEE APP on JBOSS 7 FAIL

I am having problems while starting a sample app on JBoss server 7.0. Below follow piece of start log: 12:19:10,156 ERROR [org.jboss.as] (MSC service thread 1-7) JBoss AS 7.0.0.Final "Lightning" ...
0
votes
1answer
214 views

Can mutli-threading java client cause high CPU utilization of SQL Server 2008?

I am a Java Developer, not a DBA, and would like to consult about an issue encountered in high CPU utilization in the SQL Server 2008 (not in the Java app server). The Java client uses ...
2
votes
2answers
250 views

Database-agnostic stored procedure call passing array of name/value pairs

Background Looking to pass a set of name/value pairs into a stored procedure in a database-agnostic way, using JDBC. A database structure is defined as follows: CREATE TYPE array_parameters AS ( ...
0
votes
0answers
101 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
1answer
548 views

Can't find sun.jdbc.odbc package in Java version 8 [closed]

I am trying to connect a database query to my class while I compile the package name sun.jdbc.odbc package but it is not found in Java version 8.
0
votes
0answers
83 views

Database design of role permission on resource

I have this database design to manage resources, roles and permissions. role_permission.permission contains an integer as combination of many privileges. The value are power of 2. For example: 2 ...
2
votes
1answer
324 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 ...
1
vote
4answers
151 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, ...
0
votes
0answers
60 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 ...
1
vote
2answers
697 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 $$ ...
0
votes
0answers
33 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 = ...
2
votes
1answer
64 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, ...
1
vote
2answers
219 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
32 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
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
23 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
99 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
2answers
609 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
0answers
106 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
348 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 ...
0
votes
1answer
509 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=" + ...
0
votes
2answers
213 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; ...
4
votes
1answer
3k 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
0answers
128 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
1answer
119 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
1
vote
1answer
637 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
304 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 ...
0
votes
1answer
74 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
1answer
33 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 ...