0
votes
1answer
14 views

Inserting mysql entry if doesn't exist, updating if it does exist java

I'm wanting to insert an entry if it does not exist otherwise update the entry, I couldn't use the ON DUPLICATE KEY UPDATE, I got confused with the syntax. So I tried to do something like this: ...
-1
votes
1answer
20 views

Access denied for root@localhost to execute .jar file

Im trying to run a java client/server chatting project. http://undergroundim.net/download.php?p=1 http://undergroundim.net/how_to.php?p=9 which has .exe file. After running .exe file it ask for ...
-2
votes
0answers
26 views

forlooping through a mysql database with a java sql statement

I have a database with the column task situations. The column stores int variable: 0= task not done, 1= busy with task, 2= task completed I want to query in my java class through the task ...
1
vote
1answer
21 views

How to use inner join statement with Hibernate

I have two tables in a MySQL database: 1. Device table with some device specific values. 2. Vendor table with only a id value and name value Now, I would like to get two values, model name and the ...
0
votes
1answer
10 views

JPA eclipse link Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

I want to persist entity object to database that contain some null values and one of the null value is a foregin key of another table that i have to fill it later and here is the sessionbean /* ...
-1
votes
2answers
41 views

What am I doing wrong in inserting data to mysql table?

After executing code I get the Data saved message but no data is recorded in my clients table? I'm new to databases with Java, What am I doing wrong or how can I fix my code? String sqlUrl = ...
-2
votes
0answers
28 views

On-line database accessed from an Android application [on hold]

I'm developing an android application (road traffic system) and I would like to store the data in an on-line database, so different users can view this data. What exactly should I use? (I'm using ...
0
votes
0answers
14 views

soap web service client using jsf and richfaces

recently i created a soap web service to insert user registration information into mysql database. i created a consumer for that application using jsf and rich faces for client interaction... i ...
0
votes
0answers
14 views

Unable to start activity ComponentInfo{com.testes/com.testes.View_data}: android.os.NetworkOnMainThreadException [duplicate]

There is no error on my code but when I run the android application the logcats shows: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.testes/com.testes.MainActivity}: ...
0
votes
1answer
15 views

JPA join tables through query

I have strange problem. I want to create database like this: One student can has a lot of subjects. Student has one evaluation for one subject. So I have class student with ID, Name, Surname and A_I ...
0
votes
2answers
20 views

Set max-connections on MysqlConnectionPoolDataSource

I use MysqlConnectionPoolDataSource. I had to migrate from jndi definitions to a custom solution. The old definition looks like : <data-source ...
-2
votes
0answers
19 views

What shall be the backend for the event scheduler app [on hold]

I am working on a project which has two user interfaces and I have to schedule an event. 1st user provides 'city' and 'date' and 'subjects' 2nd user also provides 'prefered city' and 'date' and 'area ...
-5
votes
0answers
37 views

Guidance needed to get started with the project [on hold]

I have to do a university project wherein i need to get inputs from colleges and professors of various colleges. The inputs from colleges that are to be taken are ...
0
votes
1answer
44 views

Java set difference, may I use java object or database?

I need to get the difference between two set of integers (record ids). The first set is stored in text file, the second set is stored in mysql database. I have two options: 1- Read all ids from ...
0
votes
3answers
57 views

Start Date and End Date Query not working

Following is the Requirement If the search date range is 5/15/2013 to 5/21/2013, then events with the following event date ranges would be included or excluded: 1/01/2013 to 6/30/2013 include ...
-1
votes
1answer
36 views

remote DB connection via JDBC and mysql

I got the below error when i try to connect remote database I use mysql server 5.5,installed all jar files and ran grant previlidge scripts also, Pls help me to resolve the same ...
0
votes
0answers
25 views

Display blob image from database into jlabel

public void displayPhoto() { rs = null; String displaySQL = "select * from images where USERNAME ='" + temp.getUsername() + "'"; try { con = getDBConnection(); rs = ...
5
votes
4answers
45 views

upload csv file containing million values to a particular column in mysql

Database: MySQL CSV file having around million records like the following: 234546,345674,464368,563236,684269,707853,... Data should get added into db in following manner: id|number|status| ... ...
0
votes
0answers
17 views

RFID TagID saving into SQL using Java program

My question is in this code i am unable to install save the rfid tag id into my database basically this code is just sending the variable into the database and not the rfid tagID which is a ...
0
votes
2answers
63 views

switching databases in spring petclinic

I am trying to switch from hsql to MySQL in the spring petclinic sample application. Can someone show me what I am doing wrong? I followed the instructions in the petclinic_db_setup_mysql.txt file, ...
0
votes
1answer
29 views

Unable to link Java program to SQL database

I've been attempting to implement a JDBC based database connection in my Java program to any database management systems. First I tried using Microsoft SQL Server Management Studio, my code looked ...
1
vote
1answer
33 views

Error when trying to save multiples records in Hibernate

When I try to save multiples records in my database I verify before if exist one record like that with this function. public boolean hasNotaFiscal(Pojo pojo) { String sql = "SELECT ...
0
votes
0answers
50 views

Searching database using seconds from Time

In my database table I have a column with Time data, with a HH:MM:SS format, that contains the following type of data (the data type is time): 12:12:02 12:12:03 12:12:05... 12:13:01... I need to ...
0
votes
0answers
39 views

Mysql error on INSERT Unknown column in 'field list'

Hi I'm having an error using MySQL in Java. I keep getting this unknown column error everytime I try to insert into my table (when I run "testOne" below). public static void sendMessage(String ...
0
votes
2answers
32 views

Java Cannot Connect to MySQL Server

I am trying to write a program in Java that in order to work, needs to have access to a MySQL database. Below is the code for the program so far, with the I.P. address, username, and password removed ...
0
votes
1answer
7 views

Connect Android / MySQL with JDBC

I have an application that try to connect to MySQL with JDBC by the following code in the MainActivity public class MainActivity extends Activity { @Override protected void onCreate(Bundle ...
0
votes
3answers
22 views

Connecting to MySQL Database from java in IDE Netbeans

So this is my thing. I am trying to connect do MySQL Database from java. I have downloaded connector driver from MySQL ( Its called "mysql-connector-java-5.0.8-bin.jar" ) and I added to my libraries ...
0
votes
2answers
34 views

Is there any way to merge columns from multiple table to single list?

I have gathered records from 3 different tables using common key i.e common column for three tables and stored in 3 lists per,deg,deg. Query query2 = s.createQuery("from StuPersonal where FRID = ...
-2
votes
1answer
33 views

How to access mysql data through java by using IP address as Host name?

String name = ""; String port = "3306"; String user = "root"; String pass = ""; String dbname = "atm"; String host="192.168.5.219"; // my local host ip address // I want ...
0
votes
1answer
11 views

Hibernate Reset (Start PK from 0) using Code

I have a table that fills every day by some batch process. I delete all the records and add new records through program using hibernate. But in this case my ID (Auto increment PK) +1 every time. I ...
-1
votes
2answers
45 views

getDateTime doesn't exist - what to use instead?

I have this problem that I have used DateTime from Joda and when I try to getDateTime it of course won't work because ResultSet doesn't have the method. What should I use instead? I asked a similar ...
-3
votes
0answers
20 views

how to populate a jtable from a mysql database [on hold]

I am just starting Java and I have a quetions. What is the simpelest way( I mean as simple as it can be) to populate a JTable with data from a mysql database? thanks guys!
0
votes
1answer
29 views

Unable to import mysql table to hadoop using sqoop

I am trying to import table from mysql table using sqoop, but I am getting error no database found. While running the following command: sqoop import --connect jdbc:mysql://localhost/EOD --username ...
0
votes
0answers
9 views

How to decrease response time by Cache Management in Enity Manager with Active Object?

I 'm using net.java.ao.EntityManager in my java web application backend is mySql and i'm using active object for ORM. Since I'm using progress monitoring in my system ,I need to refresh cache ...
0
votes
0answers
6 views

Creation of Inverted bar chart dynamically by fetching it from database

How to create a inverted bar chart in java by dynamically fetching values from the mysql database??? Please I need this code... Thanks in advance...
0
votes
1answer
25 views

modify carbon based products and use mysql

all. I hope it's not a wired dev-user case. just a simple scenario,if developers want to insert a jsp in AS, the configs (like how to link to the jsp) is set. In the jsp, he wants to create a form and ...
0
votes
1answer
27 views

How do you get multiple resultset from a single CallableStatement?

When I call the stored proc from command line I get the following. CALL `events`.`get_event_by_id`(10) ...
-4
votes
1answer
20 views

Java database programming with networking [on hold]

i have created a java application that uses MySQL database i however would like that database to be manipulated by other systems connected by a local area network i am not experienced in networking at ...
0
votes
0answers
46 views

How to loop through a mysql table [on hold]

I have a question. I need to create a chart in Java. In that chart i will have on the x-axis the date and on the y axis the amount of lost bags. In my mysql database i have a table called customer ...
0
votes
1answer
32 views

App gives 404 error on Tomcat when compiled in MYSQL (Java) with Struts2 and Hibernate on Eclipse

I am attempting to run a simple struts app that presents fields for the user to enter which OS type and version they use with an optional field for notes. It will then present the results on a new ...
0
votes
3answers
23 views

PreparedStatement and DateTime

I am trying to use DateTime from the Joda library and I realized that PreparedStatements doesn't support DateTime. What can I do instead? I can set TimeStamp but that's not really what I want. Is ...
0
votes
1answer
21 views

XAMPP jdbc drivers doesnt load

im a young programmer from switzerland. My english isn't so good but i try to explain my problem: I just made a simple mysql connction program but it doesnt work! :( package main; import java.sql.*; ...
0
votes
0answers
25 views

Hibernate query oscillating between two sets of results

We have a jsp page on a spring mvc 3 project with hibernate that has two datatables displaying two groups of users. Clicking on a user's name in one table sends a POST transferring the user to the ...
-3
votes
0answers
37 views

Why the table gets deleted by the server in mysql? [migrated]

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 ...
1
vote
1answer
34 views

Java Connection Pool with BoneCP STRANGE error

I'm a newbie of java programming, and I'm trying to learning. I have a database mysql and I manage the connection with connection Pool, BoneCP is the library that I use. The code for create a Pool ...
-1
votes
0answers
42 views

How to close resultset and statement in a finally when called in many functions?

We have the following code snippet. We initialize each statement and resultset and close it immediately after using it with the try and catch. The problem is that we cant use one finally to close all ...
0
votes
0answers
16 views

Reference for columnDefinition and MySQL data types

I am trying to provide default values for my application entities columns for example: @Column(name = "status", nullable = false, columnDefinition = "varchar(20) default 'New'") yet there are ...
2
votes
0answers
34 views

Hibernate unique field creation

I am trying to add the following column in one of my application domain classes: @Column(name="USER_NAME",length=20,nullable=false,unique=true) private String userName; Reason I am making this ...
-1
votes
1answer
43 views

Filtering a Table using a Combobox in java

I have got a table and four combo-boxes namely "Asset Categories","Department:","Branches:" and "Asset State". problem: Now i want to be able to filter my table in such a way that i can select a ...
0
votes
2answers
46 views

how to compare resultset two objects

Plase help,How to checked check box based on resultset object comparison? i have two tables in db. one is subjects, it contains category | sub_category --------------+------------- ...

15 30 50 per page