0
votes
1answer
12 views

c3p0 getConnection Hangs as Number of Connections are Increased

i"m running a web service on Heroku and using New Relic to monitor its performance. I'm using MySQL with Hibernate on top. My non default c3p0 settings are the following ...
-1
votes
1answer
30 views

Difference on information obtained running SQL from Java than from MySQL console

i read stackoverflow all the time and its been very helpful but its the first time that i post something. I have a JAVA aplication that makes some MySQL queries. One of them is to create a table from ...
0
votes
1answer
16 views

Unique value in coulmn2 respect to column1 in sql

I have an sql table in which there are two column State and SongInState. Now I am having a scenario here, where State and SongInState columns can have any non unique value but any State can't have ...
2
votes
0answers
28 views

session handling in android while logging into the server side in php

I am trying to do the session handling process in android. Here I have successfully logged into through android and now i waant to handle the session of the logged in user. this is my ...
0
votes
2answers
29 views

How to insert values into to mysql DataBase using Java servlet?

(Sorry for the amoount Of code I have, but I really don't know how much is enough) I'm having trouble inserting values into the mysql database. I'm using Jsp files instead of html files. I keep ...
2
votes
4answers
46 views

Connect to Mysql from Java securely?

Hello there I am curious how I can link to mysql from java securely. The only thing I cant figure out is how to keep the password out of plain text! Any help is great.
1
vote
1answer
26 views

How to setup Java application (tomcat and mysql) on Amazon AWS with Auto Scaleup and Load balancers? [on hold]

My current scenario is that I have a Java EE application built on Struts 2.0 and running on tomcat + mysql server. The app is currently hosted on Virtual Private Server with 2GB RAM and 60GB disk. ...
0
votes
5answers
40 views

Eclipse Compiler error saying connection variable cannot be resolved to a type

this is a Java Code i wrote in Eclipse to retrieve information from a MySQL Database.. But the Compiler is giving an error saying conn cannot be resolved to a type.. can anyone pls tel me what i may ...
1
vote
2answers
24 views

How to make database change cause updates to web clients' views

Environment: Java EE 7, Glassfish 4, MySQL 5.7 on Linux on an ARM7 server with 512MB ram (app must be memory frugal!) Application: A database-driven Java web app served to multiple Android tablet ...
0
votes
1answer
31 views

Hibernate: Object deleted but still can be loaded by Hibernate

It seems absurd how even after I deleted the object I can load it and print its Id. here's the class that I use to retrieve data from Prof entity : public class ProfCrud { SessionFactory ...
0
votes
1answer
38 views

not passing List of String as single parameters inside preparedStatement.setObject()

I want to pass a List of String coming from request parameter to the preparedStatement.setObject() as a single parameter.Here I have coverted list of Objects to a single String. So while passing this ...
0
votes
3answers
20 views

applet with swing mysql and a config file works in eclipse but fails in browser

Hi it's probably because i'm a noob, but i'm trying to get this working for days now so hope that someone can help me.... The idea: For a java training i need to make a Java applet that reads and ...
0
votes
2answers
37 views

How to update data for particular id in PHP MYSQL using Android

Question How to do changes in particular Appointment taken by User ? updateData.php $strUserID = $_POST["sUserID"]; /*** Update ***/ $strSQL = " UPDATE book_appointment SET Type = '".$strType."' ...
0
votes
1answer
61 views

Database Access Denied connection issue

I am trying to make mysql database connection from my war file using jdbc connection string as shown below:- String connectionURL = "jdbc:mysql://localhost:3306/DatabaseName? ...
0
votes
1answer
32 views

Glassfish JDBC: Do I have to use only jdbc/__default?

I try to use Glassfish/MySQL. I have created JDBC resource and JDBC connection pool for MySQL. But if I tried to put MySQL JDBC resource in jta-data-source, nothing works. Then if I tried to modify ...
1
vote
1answer
14 views

Implementing date_sub() function with intervals with jOOQ

I've been dealing with this since yestertay. The thing is I am migrating my queries to jOOQ and I got stuck when I tried to implement this part: select * from table where condition1 and date1 >= ...
-1
votes
2answers
29 views

Android, get basic Json response? [on hold]

I have a PHP web page which outputs Json strings called: deal1, deal2 and deal3. I need to get them into Android app. can somebody please write a very very short and as simple as possible code that ...
-1
votes
1answer
23 views

How should i edit manifest for jar?

I create an application - Instant Messenger - with connecting to MySQL and it required MySQL Driver, so I enclose this external library and this program works well. But I'd like to re-create this app ...
0
votes
1answer
61 views

Inserting string ›ÄX%ß=dÜgž=ŒT8ï8L]4C®° into sql shows error

here is my code key = KeyGenerator.getInstance(algorithm).generateKey(); byte[] keyBytes = key.getEncoded(); String k = new String(keyBytes); Class.forName("com.mysql.jdbc.Driver"); con = ...
1
vote
0answers
26 views

Retrieval of list of Output Parameter for a callable statement batch process

here this code will simply call my procedure and delete the user. CallableStatement CStatement = null; CStatement = conn.prepareCall("{call TESTPROC1(?,?,?)}"); for(int ...
0
votes
1answer
16 views

Keeping a log of user changes in web application

What is the best way to keep a log of user changes in my web application (java/tomcat/struts/mysql)? I give out accounts and each account has multiple users. I want the account administrators to be ...
-1
votes
4answers
76 views

Java : Hibernate is too much slow

I'm working on a a swing application, to handle the data I chose Hibernate because of its performance. now that I did 80% of the work. I found out that the application is too slow, like forever ...
0
votes
1answer
36 views

JDBC not working on production server

I have jdbc and hibernate working just fine on my local web app, but when I deploy it to a remote server, I get this error: HTTP Status 401 - Could not open Hibernate Session for transaction; nested ...
-1
votes
2answers
27 views

getSingleResult() in JPA thorws exceptions

I was querying using JPA, and when I used query.getSingleResult(); It was throwing exceptions. I am well aware that if more than one record matching the parameters the method throws an exception, ...
-5
votes
0answers
23 views

Max user connection pooling using Hibernate and My Sql

<property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">100</property> <property ...
0
votes
1answer
54 views

Do I have the right understanding of the web app architecture? HTML5 front end, Java back end, and JSON binding

I am building a web application that has an HTML5/JavaScript front end and a Java back end. I will be taking JSON objects and storing them in a MySQL database. At the moment, I have an elementary ...
-1
votes
1answer
39 views

Java MySql HashMap to save 3 values

Hy! I am working on my Java MySql app, and I need to save data about meals that are stored on my database on server, so I can later display it in combobox. User will choose what meal he wants in ...
0
votes
2answers
32 views

Created datetime is not updated after insert in JPA when using trigger in MySQL

ENVIRONMENT Glassfish 4.0 JPA - Eclipselink 2.5.0 MySQL 5.5.29 Trigger in MySQL to Survey table: Trigger's code CREATE TRIGGER `survey_BINS` BEFORE INSERT ON survey FOR EACH ROW SET NEW.created ...
-1
votes
2answers
38 views

Record not inserting into MySQL table

My records are inserting in all, but one table (enlisted_subject). Below is a part of the DDL I used to create the table in question: CREATE DATABASE iac_enrollment_system; USE ...
1
vote
1answer
21 views

Operation on mysql table

I have the following MySQL table ArticleId | AuthorId | Author | ArticleScore ----------|----------|--------|------------- 0 |0 |Albert |0.2 0 |1 |Bob |0.2 0 ...
0
votes
1answer
28 views

Image from my computer Saving in mysql table java help please

I'm a student learning java. I need to make an assignment. I need to make a student management software using java. here's the story where i need your help. I have to make a jframe for register ...
1
vote
1answer
78 views

Java Standalone runnable GUI application - can't get jar file to open the program

I am working on a GUI client that will be a standalone application to act as a front end to a MySQL database back end. I have all of the logic and coding done for the client but I can not for the life ...
1
vote
1answer
26 views

Java getting the auto-increment number of the current inserted row, to use it for another query?

public static void updateHistory(Client winner) { try { if (winner != null) { getDatabase().newQuery("INSERT INTO tournaments (`players`, `winner`, `winnerKills`, `map`, ...
0
votes
3answers
46 views

Size check of form input before saving to database

I have created an html form where input is going to be inserted into a database(mysql). Before I start inserting the data I perform some serverside form validation in java. I would like to make sure ...
0
votes
0answers
10 views

How to use ESAPI.encoder().encodeForSQL for exact search and Like search with Backslash for mysql

I am using ESAP encoder for escaping search parameter for search. Its escaping \ with \\ . But I having record with backslash (\) When i exact search with name\ ESAP encoder, escape it as \\ its ...
0
votes
2answers
38 views

Java MySql Coumn not found

Hy! I am working with JDBC MySql Java project and I am trying to save int values (Id Category) and String values(Name of meal) from my server database in simple java hash map. But every time I try to ...
-1
votes
1answer
62 views

Most popular technologies for developing websites [closed]

My site is currently developed using ASP.NET but I would like to switch over to a Linux based system. If possible I would like to have the server code written in Java since I already have lots of ...
-1
votes
2answers
58 views

Throws exception and return from finally - Tomcat hangs

Recently I was looking at the frequent hangs of the tomcat server and came across some exceptions thrown frequently in some part of the code. When I examined the code, this what it looked like ...
2
votes
0answers
14 views

Nested update with select deadlock

Background I am using some code that seems to deadlock often with itself. In Java, it produces a DeadLockLoserDataAccessException periodically, and the offending statement causing the deadlock is ...
-1
votes
2answers
54 views

Inserting NULL values into a MySQL table via JDBC program

I created a database in MySQL using below DDL: CREATE DATABASE iac_enrollment_system; USE iac_enrollment_system; CREATE TABLE course( course_code CHAR(7), course_desc VARCHAR(255) NOT NULL, ...
1
vote
3answers
29 views

In memory Database to test mysql database operation API using in memory database with maven

I have to test some api using JUnit test cases. Actually I have some simple JDBC database connection with API code to retrieve data from MYSQL database. But I need one inmemory databases to test ...
-1
votes
1answer
30 views

Delete selected checkbox rows in JSP page [closed]

I am using jsp , servlets, javascripts. Data is being retrieved from data base. i need to delete the rows of table using checkbox. pls help me on this.
1
vote
5answers
64 views

MySQL/Java error

Newbie programmer here. Upon doing mvn tomcat:run I get the following error: SEVERE: Servlet.service() for servlet appServlet threw exception ...
-3
votes
1answer
55 views

Why am I getting a NullPointerException with this code that's executing a prepared statement?

Why am I getting a NullPointerException with this code that's executing a prepared statement? public ArrayList<BeanStaff> getLeaveStatus(ArrayList<String> name,String date) throws ...
0
votes
0answers
29 views

How to generate getter and setter for radio buttons in Struts

I'm working on an online exam. Here i have 5 groups of radio buttons and the name attribute is appended with a random number(which is the PK in MySql DB). How do i generate getter and setter methods ...
-3
votes
2answers
56 views

What is the purpose of “String[] whereArgs” in “int delete (String table, String whereClause, String[] whereArgs)” function? [duplicate]

String[] whereArgs also present in update function of SQLiteDatabase class, what does it depicts?? I've read the documentation but not getting it,Please help. Thanks in Advance !!
0
votes
2answers
28 views

Explanation of execSQL (String sql) function of SQLiteDatabase

What does execSQL (String sql) function which belongs to SQLiteDatabase actually do? i've read android documentation for it but not getting it..Please someone explain it in easy words. Thanks in ...
0
votes
1answer
45 views

Mysql in java usage, while(result.next()) with if and else

I have a problem about if else usage in java with mysql. My code is : if (!result29.next() ) { System.out.println("No data"); } else { do { ...
0
votes
1answer
68 views

Error parsing data org.json.jsonexception end of input at character 0

I have been looking over my code all day and can not find why this is happening (or why its not actually returning the result form the mysql server it should. Hopefully a fresh pair of eyes will find ...
-1
votes
2answers
29 views

MySQLNonTransientConnectionException in JDBC

I created a database with one table in MySQL: CREATE DATABASE iac_enrollment_system; USE iac_enrollment_system; CREATE TABLE course( course_code CHAR(7), course_desc VARCHAR(255) NOT NULL, ...

1 2 3 4 5 122
15 30 50 per page