Tagged Questions
0
votes
1answer
19 views
Accessing database with sqlite in Java
I am trying to access a database to then insert new data, but the code below gives me this output:
Opened database successfully
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database ()
...
-1
votes
0answers
22 views
Multiple DataSource in Java get wrong Database
I have a strange problem in java:
After I get the Connection from the datasource ds2, I get from the next call of ds1.getConnection() the database that is in ds2 datasource.
For the first call of ...
0
votes
3answers
25 views
Error : null value being entered in table through jsp code
My code snippets are as below :
ShopRegister2.jsp :
<%
session = request.getSession();
session.setAttribute("s_id", s_id);
out.println("Your id is : "+s_id);
%>
...
0
votes
1answer
32 views
Tomcat JDBC connection works in Eclipse but not stand-alone
We are going through the process of upgrading our database software and also going from Tomcat 5.5 to Tomcat 7. As a result I am using a new JDBC driver, in this case the recommended SQL Anywhere JDBC ...
0
votes
2answers
40 views
JDBC driver - ClassNotFoundException, NetBeans
I've searched a lot and spent many time trying register JDBC driver.
First, I copied my ojdbc7.jar file (downloaded from Oracle) into directory shown below:
Driver File(s): ...
0
votes
0answers
28 views
How to use JdbcInterceptor to retry queries
I want to retry MySql queries in cases of deadlock which will be removed if I can simply retry.
I use apache tomcat jdbc pool library for mysql connection pooling and it has concept of ...
-1
votes
1answer
19 views
Java Database Connectivity doesn't work
I have problem to connect to my Database from my Java Code. I am using MS Access Database. I have created DSR Name and selected appropriate Database for my DSR Name.
DSR Name : connectionExample
...
0
votes
0answers
12 views
At least one JAR was scanned for TLDs yet contained no TLDs whilst creating database connectivity
<%@ page language="java" contentType="text/html; charset=US-ASCII"
pageEncoding="US-ASCII"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="sql" ...
0
votes
4answers
30 views
Unknown column error in where clause, using MySQL and Java
Following is my code line :
ResultSet rs3 = stmt6.executeQuery("SELECT * FROM ShopSystem.Order where s_id="+s_id+" AND status="+Pending);
I am getting the following error :
Unknown column ...
0
votes
0answers
34 views
Use Spring Framework and connect to MS SQL-Server 2008 database?
I have two instances of SQL Server on the same machine.
A Sql 2000 and another in 2008 sql
I'm not able to connect in the second instance (2008) with spring framework using the xml configuration ...
0
votes
0answers
7 views
how to connect OOBase to Netbeans
I saved my database in Open Office Base (*.odb) and wanted it to access through NetBeans. How can I establish connection from NetBeans?
As far as I researched, I need to zipped the odb /save it as ...
0
votes
1answer
52 views
JBOSS AS 7.1.1.Final Closing Leaked Connections?
I have already done the following settings in standalone.xml as:
<datasource jta="true" jndi-name="java:jboss/datasources/myDS" pool-name="java:jboss/datasources/myDS" enabled="true" ...
1
vote
1answer
34 views
Why does the Java App lose connection after MongoDB restarted?
The MongoDB is in a replica set with three members. Sometimes one or two MongoDB instances restarted, the Java Apps lose connection and show the following error and then I have to restart the Java ...
0
votes
3answers
17 views
Connection Closed even when the connection is closed below the code
I have a basic code snippet below but it is not working.What may be the problem with it.
public List<String> getStores() throws SQLException{
List<String> store_id=new ...
0
votes
2answers
19 views
The result set is not updatable java-Mssql
I am working with java and Mssql. But I am a beginner. I have connected sql but when I want to insert data in sql, I have a problem.
code:
private void ...
0
votes
1answer
21 views
Audit To Database Plugin - Jenkins : org.hibernate.HibernateException
I want to use the Audit to Database Plugin to record the build information to database. I have installed the plugin properly and I user the following config:
JDBC Driver class: ...
0
votes
0answers
19 views
How should i separate production and dev connection settings
I have an application which I am working on which will eventually of course need a development and production environment. The key is the database connection settings which obviously I want to ...
-2
votes
1answer
45 views
Java JAR File and Database Connection
I would like to ask a question about jar and database connection. I performed an application and converted to jar file. Jar file works if I open NetBeans's Service which is server(I have created my ...
-1
votes
2answers
25 views
Connecting to multiple databases efficiently
Referring to similar question :
Pattern for connecting to different databases using JDBC
I am using different Connection Strings/Drivers for each database.This is what I am doing, not very sure if ...
-7
votes
2answers
61 views
connect android to mysql database [closed]
I dont understand why my app crash....
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.os.StrictMode;
import ...
0
votes
1answer
38 views
Why does Oracle/Java creates multiple records in one execution?
I'm debugging a java based web application. There is an issue reported from our production
environment where multiple records were inserted in table, but other records was not valid
Production issue ...
3
votes
2answers
118 views
c3p0 maxIdleTime is same as wait_timeout of mysql?
I am having an Spring MVC + Mysql (JDBC 4) + c3p0 0.9.2 project.
In c3p0 maxIdleTime value is 240 (i.e 4 mins.) and wait_timeout in my.ini of Mysql to 30 seconds.
According to c3p0
maxIdleTime:
...
1
vote
1answer
38 views
Can I use database IP address instead of hostname in JDBC connector?
Currently none of my hostnames are resolving to my server which uses no-ip DDNS related to this issue. Is it possible to use the server IP address instead of the DDNS domain name in the JDBC ...
1
vote
2answers
52 views
EclipseLink JPA 2.1 User supplied connection
I would like to use EclipseLink as my JPA engine.
We are using a subclass of java.sql.Connection and I would like to know if I can force EclipseLink to use my connection. I would like to set the ...
0
votes
0answers
23 views
Connection pool management
I am writing a client pool implementation,
The client is my class that contains stub to axis 1.4 webService
Is there an open source Client Pool library that can help me manage my clients instead of me ...
0
votes
0answers
36 views
Websphere application server connection pooling
In my WAS 7, I have installed 3 applications which are connected to different datasources configured in same server (eg. jdbc/Datasource1, jdbc/Datasource2, jdbc/Datasource3).
While working with one ...
0
votes
1answer
22 views
Will JDBC database connections get released if they're used in a thread when Tomcat server shuts down?
We have a Tomcat stack for our web app, and use javax.sql.DataSource for our database connections. We have some methods that do a lot of database work that users don't really need to wait for that we ...
0
votes
0answers
43 views
JBoss AS 7.1.1 DataSource Connection Pooling using ojdbc14.jar?
I am able to configure DataSource using ojdbc6.jar successfully as:
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module ...
0
votes
1answer
64 views
Update query is not working in java swing
I am working on a project "Hospital Management System" in java swing.
On update page there are various text field, text area, combo box and accordingly various columns in MS Access table named ...
0
votes
0answers
23 views
Pass SQLConnection to Web service
I have to pass a SQL Connection (java.sql.Connection) to a Web service. It seems impossible to serialize the SQLConnection object, so I was wondering if there is an easy way to share the same ...
-1
votes
4answers
29 views
Connection to database in NetBeans unsuccessful (error ora-00933)
For school project I'm doing Music player using a simple database (for name, artist, length, album...) and I've done it 1/2 already but now when I'm trying to connect to school database it gives me an ...
0
votes
1answer
54 views
Hibernate 4.3.5 ignores v$session.program configuration property
I previously used hibernate 3.2 and boneCP but I just upgraded to hibernate 4.3.5 and the Hikari connection pool to connect my java application to my oracle database. I set v$session.program to the ...
0
votes
2answers
39 views
connecting with Derby from within the java application
this program works fine when i connect the java db under the 'Services' tab in netbeans but when i try to open the executable jar file of the prog outside neatbeans it doesn't work at all. I want this ...
0
votes
4answers
37 views
When i run the app logcat give me 3errors in register.java file has anyone any idea what may be the wrong?
//The Register.java code and the errors is in line 101,91,73
package com.panos.mysqltest;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
...
0
votes
0answers
23 views
How to get a play.api.Application object for Db.getConnection method?
I'm using Java Play Framework v2.2.1. I need to get a a database connection object to execute a script. I've found at the documentation (Docs) that this is the way to do it:
Connection conn = ...
0
votes
2answers
34 views
Java SQL PreparedStatement and maintaining connection
I'm creating a server-side Java task that executes the same SQL UPDATE every 60-seconds forever so it is ideal for using a java.sql.PreparedStatement.
I would rather re-connect to the database every ...
0
votes
1answer
24 views
Error S1000 trying to execute more MySql queries in a Java Application
I have a problem trying to execute more than one query into my Java Application code.
I have a procedure that is called in main and is in the class "Fant":
public void XXX(){
Connectivity ...
-1
votes
1answer
37 views
headache with “where” condition in statement sended to SQL
when I send statement to SQL,netbeans does not recognize ? to replace it with strings,int. I suggest, synatax mistake?
Here:
Connection conn = null;
PreparedStatement prepStmt = null;
...
0
votes
1answer
35 views
Cant get data throw Result Set in connected Java with SQL
here I cant to come into while(rs.next()){.....} statement. I try to prepare easy statement, you see, and try to print than with in println word "data" to check if I am in the while statement, but ...
0
votes
2answers
24 views
Array Out Of Bounds exception in java net beans IDE 8.0 while connecting jTable with MySQL database
I have a table with 7 columns and I'm trying to connect my database with it so as to receive data from the database and show it in the table. The code works fine when you press the button the first ...
0
votes
0answers
26 views
EndToEndMetrics on pooled db connections: isolated or not?
A dba in my office proposed the following to audit db access (oracle):
Put the current logged in user in my application as a property on the db connection (java.sql.Connection).
public class ...
0
votes
2answers
55 views
Java database applicaion Freezing when loading lots of records
I need some advice from you more experienced coders with an issue I am having.
I created a Java SE application which deals with data stored locally on a MySQL server.
It works fine where there are ...
2
votes
1answer
116 views
embed MS Access database with runnable jar
So my aim is to make a runnable jar. I've made a program using swings which uses MS Access database to fetch records. So, I've used an absolute path to refer to the database for connection.
Now, I ...
0
votes
0answers
68 views
uploading project database to jazzhub
I'm working on a small project with my team. Our job requires database, so I created one using mysql workbench 5.6 and succsesfully connected it to Netbeans 8.0. I was able to push and pull code to ...
0
votes
5answers
68 views
ResultSet is a interface. How does Statement.executeQuery(String) create its object.?
I have a confusion regarding ResultSet . We know ResultSet is a interface , So it can be used as reference , but we cannot create its object . So my question is what object does ...
0
votes
0answers
30 views
resolving IllegalArgumentException with database connection
please help. I have this program that connects to a database. it connects perfectly, but this block of code when executed contains an IllegalArgumentException. This method should retrieve data from my ...
0
votes
2answers
117 views
JDBC: Connection returning NULL, what to do?
This is the output of the program given below:
Connection made!
Schema Name:null
Successfully connected to null
Releasing all open resources ...
Inside establishConnection(), conn is initialized ...
0
votes
0answers
40 views
Optimize database connection with hibernate
I ma working on a hibernate applciation and I use hibernate.c3po configuration in order to adjust the number of possible connections. My problem is that some users have complained that the Database ...
1
vote
2answers
55 views
How to implement Java single Database thread
I have made a Java program that connects to a SQLite database using SQLite4Java.
I read from the serial port and write values to the database. This worked fine in the beginning, but now my program ...
2
votes
1answer
53 views
how to connect to multiple data base in online?
here i am trying to connect to multiple databases here is my code,this code works fine in local machine but when i upload it to online this is not working may i get any help thank you in advance.
...