Tagged Questions
0
votes
0answers
18 views
How can I connect to my website database? java
Connection baglanti=(Connection)DriverManager.getConnection("jdbc:"+"mysql://localhost:3306/mydatabase?useUnicode=true&"+";characterEncoding=latin5","id","password");
Now, how to connect my ...
3
votes
1answer
39 views
Is there any short way to add multiple items
I am adding data to table. Table looks like this:
I am getting multiple data from my JSP page that should be entered uniquely each time.
Means in table prod_id and sc_id will remain same for this ...
0
votes
1answer
42 views
Out of memory java heap spcae with MySQL
I'm getting the above error when trying retrieve some data from a MySQL statement, as the error states the error is in line 118; here is the MySQL:
.prepareStatement("SELECT ...
0
votes
1answer
23 views
My servlet throws exception ResourceClosed
My servlet is contacted simultaneously by three devices that read the result.
A strange thing happens: the first device displays the result, often the second, while the third device receives 500 ...
0
votes
1answer
33 views
error “ Operation not allowed after ResultSet closed” on Mysql connection closing
I'm calling to this class from other part of my appiclation and it's working fine. However I would like to close every single mysql connection which has been open.
This is my class to connect to my ...
0
votes
1answer
16 views
save XML to mysql using hibernate
I want to save an XML file into LONGTEXT field mysql through hibernate. I'm a bit new to hibernate and really appropriate your advice.
mysql table was created.
CREATE TABLE testdata (
TD_ID ...
0
votes
2answers
65 views
how to check null value in html textbox?
I have a JSP page where i am fetching value from html textbox.
I want to insert that value into MySQL database.
I want if textbox in empty,null,zero and undefined then insert 0 in database otherwise ...
0
votes
1answer
28 views
This codes can't check NoResultException
This is the Code I was made. It shouldn't get and enter to NoResultException, but it doesn't as expected. There is an unused data. I try to print out, here is the output : "[ ]"
private void ...
2
votes
1answer
29 views
Get response from MySQL multithreading Java
Lets say, for example I have a large, time consuming processing task which often needs to query a MySQL database. I want the main thread to keep processing when waiting for the response from the SQL ...
2
votes
1answer
18 views
On duplicate key based on two columns
I'm having a bit of trouble with my java app,either i don't know enough or this isn't possible in a simple manner.I'm hoping it is the first option since i'm a beginner.
This is my table :
CREATE ...
-1
votes
1answer
17 views
Ajax inline editing mysql results
I'm getting a list of rows from a MySQL query showing a list of usernames, and I need to be able to edit them inline using ajax, but with this script I'm using I can only edit the first one listed in ...
0
votes
3answers
27 views
Test database availability on server startup
I'm developing a Spring webapp that uses Hibernate. Currently, if my MySQL database is not available (for example simply not launched), the server starts up normally, and an exception get thrown the ...
0
votes
1answer
27 views
is there any way to access web server databases by android?
i want to access to my web mysql databases from android application.how can i do this?
i have searched all over the internet but i didnt get anything like that.
allthough i know how to recieve data ...
0
votes
1answer
29 views
slow read query causes other c3p0 threads to block on acquireStatement
I have a table articles with 500k rows. I only use select queries on it via a web app. All of my pages load fast (~20ms) and each consists of one or two fast queries (~10ms each). Those fast queries ...
0
votes
1answer
39 views
Why is it difficult to type mysql queries in Netbeans?
I googled this issue so many times and could not find a correct answer. I really do not know is that only me facing this issue.
Ok here is the issue. I am using netbeans 7.4 which supports PHP only. ...
-3
votes
2answers
32 views
Not unique table/alias 'GPS'
Here is the creation of my table :
"CREATE TABLE GPS ("+
"id int NOT NULL AUTO_INCREMENT,"+
"name VARCHAR(30),"+
"x REAL,"+"y REAL,"+
...
0
votes
0answers
14 views
To get values from the mysql database and display it in the JCombo box
I have to retrieve values from mysql database and want to dispaly it in the JCombo Box.In detail explanation for example if have a table with column names as project_number and Project_Name i have to ...
-5
votes
2answers
38 views
I need a suitable query from the date picker between dates [on hold]
i have created a date picker. I have to write a select query for the table below
table name: mark
id user start_time end_time marks
1 sad 28-01-2012 28-02-2012
2 ten 27-08-2013 ...
0
votes
2answers
40 views
unable to connect to MySQL database using JDBC
I have this Java application in which I am now developing a module that can read and execute SQL statements from a file and output the results of the queries. If I launch the module via its main ...
0
votes
0answers
19 views
Map Object containing an other object using java reflection
I try to map an object in my database.
It works fine for simple type like int, string ect... However i got a problem about a class containing an other object.
For example i got a class order :
...
0
votes
1answer
31 views
How to interact with (MySQL) Databases in JSF
I come from PHP and am trying to build a Web Application with JSF. I really like the simplicity of some tasks with JSF, (for instance the use of Ajax) but when it comes to database integration I am ...
1
vote
0answers
35 views
Mysql function not returning response to Hibernate
I have a mysql function that is being called from a service class of a web application using HibernateCallback class of Spring. This function selects some rows using a cursor, then does some update ...
0
votes
0answers
19 views
Hibernate Constraint update not working
i created a Entity Bean with an Attribute and an Annotation @Max.
When i change the value of @Max without building a new Database Schema then i get a DataViolationException.
An Update, with ...
0
votes
2answers
21 views
Connect phpMyadmin and JAVA [on hold]
Iam trying to connect phpMyadmin & Java together .So I am using the jdbc driver from mysql . I have a database created in phyMyadmin : "192.168.0.4/myDATAbase/".But i get an error saying :NO ...
0
votes
0answers
13 views
Acess Tomcat server over VPN network [on hold]
I have a web application developed with Java and MySQL. In my LAN I can access to the application fine, but when I try to access to this over internet (with a VPN) I can't, the navigator not founds ...
0
votes
3answers
41 views
ResultSet populating JTable column names but not data
Note: this is not a duplicate, I have already checked out: I can't get my JTable to show anything and I get the Jtable but no data
Although these seem to have very similar problems, they aren't ...
-2
votes
0answers
15 views
CRUD application in struts2 [on hold]
How to develope a CRUD application in struts2.
Because the application I am trying to access mysql database in struts2 but is is giving an error to see JNDI binding.
1
vote
1answer
28 views
How can I avoid changes in DB while making a set of queries?
In my web application (Java + Spring + JPA) I have a method executing a set of related queries. In particular I need to know the total row count of a table and the row count of the result set for a ...
0
votes
2answers
48 views
JDBC PreparedStatement results in MySQL syntax error
I am getting the error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''orderr'' at line 1" - so I assume the ...
0
votes
1answer
38 views
How to get path of the file in Java, if some condition includes [on hold]
I'm an beginner in this site..
CONDITION:
File is in the first directory on files project, but sometimes the files project can be moved
I have searched through internet about this question, but ...
0
votes
1answer
32 views
JPA MySQL Connection in Java EE project
I am running a local MySQL Server, later I want to use one on a remote computer and I have a question how to setup JPA in my Java EE project correctly.
First of all, do I have to setup the database ...
1
vote
1answer
31 views
Slow Hibernate flush
I try to save my data to MySql(local DB) throw HibernateTemplate -
getHibernateTemplate().execute(new HibernateCallback<Void>() {
@Override
public Void ...
0
votes
0answers
29 views
Hibernate: How to map to static table?
I have the role and permission tables with a join table role_permission using the annotation:
@OneToMany
@JoinTable(name="ROLE_PERMISSION", joinColumns=@JoinColumn(name="role_id"),
...
1
vote
1answer
28 views
Getting Error com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
I have some data migration scripts ( shell scripts generated from talend data migration tool) which connects to MySQL and perform some operations.
One of the script is performs heavy calculations and ...
2
votes
1answer
54 views
How to detect (in Hibernate) when the database goes down?
We are using Hibernate to connect to MySQL database. Need a way to get an alert when the database goes down. Was reading about the listeners in Hibernate but not sure if any one of them can be used to ...
0
votes
0answers
22 views
Hibernate - Mapping ont-to-one with table having composite key
I'm a newbie in hibernate. I would like to know if this is possible in hibernate.
I have 3 tables Payments,Case and Custom_Fields.
Payments columns:
payment_id (primary key)
amount
Case columns:
...
0
votes
0answers
19 views
Trouble migrating from MySQL to Derby: Invalid cursor state - no current row
My program was working fine while connected to a MySQL database, but now that I have it connected to an embedded Derby file database, it is no longer inserting new rows.
Whenever I try to insert a ...
0
votes
3answers
27 views
Error connecting mySQL to java netbeans on mac os mavericks
Here is the code for the connection to the database:
public void database()
{
String temp="";
Connection conn = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = ...
-3
votes
0answers
20 views
Java-MySQL connection
I'm wondering how can I access/connect a MySQL database, created using phpMyAdmin, from Netbeans 7.4. Right now I'm trying to develop a server in Java which search for data in the database and then ...
0
votes
0answers
22 views
bash script program java client connect external mysql server
it has come to my attention that i could make a series of bash scripts in Terminal.app (OSX), though i am not quite sure if I should make an executable (and in case how) file (from a textdocument and ...
-1
votes
0answers
24 views
Can we develop the multiple application each with different technology (and language) but use single database? [on hold]
Here is my problem. I want to develop Enterprise application in WPF initially but after that I also want to build same application in java for benefit of platform in-dependency, same app using PHP ...
1
vote
4answers
36 views
Non-static … static what?
I know about the concept static and non static as I found the explanation on here. But I am not sure if I understand it. My code generates the following error: non-static method getWerknemers() cannot ...
1
vote
3answers
42 views
MySQL, Before start of resultset [duplicate]
I am getting the error Before start of result set I thought that I had to use next() on the ResultSet before retrieving data from the ResultSet ?
public void getPersonsOrders(String firstName){
...
0
votes
3answers
44 views
MySQL before start of resultset
I am trying to get the personID from one table and use it in the second table, and the print each column value from
the second table, however I am getting an the error column index out of range, 3 ...
0
votes
2answers
28 views
No such file or directory in MySQL SQL script
I have a SQL script that contains the following
LOAD DATA LOCAL INFILE '.\\datafiles\\customers.txt' INTO TABLE Customers`
I open and run it in MySQL workbench and I get following error:
Error ...
1
vote
0answers
26 views
Advices in error logs
We're using java + hibernate + c3p0. In some cases there is such error:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from ...
-3
votes
0answers
42 views
what is the best algorithms to detect contacts duplicates and matching on server ? with user suggestions? [on hold]
what is the best way to do this, using PHP functions? or saving all the contacts to the database and solve this using queries?
with sending to the client all the possible matches using some thing ...
-2
votes
4answers
37 views
casting mysql.Array to String[]
I am using the Java Mysql connector and I have a problem with extracting results:
This is the query and prepared statement that needed to be executed:
String statement1 = " select sentence from ...
0
votes
0answers
12 views
Store jade agent details in MySQL table
I am creating a Multi-Agent System for auction domain. In that I need to store buyer agents' details in MySQL table. Is there any way to do that?
I have tried. My code is below.
package ...
0
votes
2answers
27 views
Not able to insert CAFÉ in mysql, even after setting encoding correctly
I inserted the word CAFE in name field mySQL table.
Unexpectedly, I get a row containing CAFE when I execute below statement
SELECT * FROM myTable where name='CAFÉ';
, which is wrong. In my ...