0
votes
1answer
9 views

JSF, website first setup and external configuration files

I have a website written in JSF backed by MySQL database running on Tomcat 7. Now there is only one missing part - project first setup/installation. I want my war when deployed for the first time to ...
0
votes
0answers
48 views

Multiple ExecuteQuery() doesn't work

I have some problem with executeQuery. My code: try{ String where =""; String set, sqlque; int help ; System.out.println("Laczenie z baza danych "); ...
0
votes
1answer
62 views

changing Set<String> values from database to string values

How do i make my program read a Set value from the database one word by one word. import java.util.*; import java.sql.*; public class SetProblem { public static void main(String[] args) { ...
0
votes
1answer
32 views

Java + MySQL - Syntax error but the statement is correct

My program executes INSERT query. When I run it, I get an error com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds ...
0
votes
0answers
10 views

Does a JdbcRowSet alwasy guarantee Updateability and Scrollability?

This Java tutorial provides us with this scenario: The Coffee Break chain of coffee houses acquired another chain of coffee houses and now has a legacy database that does not support scrolling ...
0
votes
1answer
25 views

is a RowSet object scrollable by default?

from this java tutorial: A RowSet object is scrollable and updatable by default, so by populating a RowSet object with the contents of a result set, you can effectively make the result set ...
0
votes
0answers
39 views

java.lang.AbstractMethodError when trying to make instance of datasource object to connect to mysql database

For context, I followed the instructions listed on this website, https://netbeans.org/kb/docs/web/mysql-webapp.html?print=yes, to create a web app in netbeans, create a web server in glashfish 4.0, ...
0
votes
0answers
17 views

Why would batch update consistently return an array of SUCCESS_NO_INFO?

When executed individually, each update statement correctly returns the update count. But when executed in batch using java.sql.PreparedStatement.executeBatch(), the driver consistently returns an ...
1
vote
4answers
46 views

JDBC - query does not return data after where statement

Okay. Here's a piece of code that should return an array after searching a database with JDBC. It's the Apache Derby database that's built into the JDK. import java.sql.Connection; import ...
0
votes
3answers
38 views

JDBC finding the source of unclosed connections?

I am having issues where somewhere in my project several connections to mysql are not being closed, causing my application to become very slow after a couple of days,essentially forcing me to restart ...
0
votes
0answers
11 views

JADE and JDBC MySQL connection giving classnotfound exception

protected void setup() { System.out.println("Hello Buyer Agent "+getAID().getName()+" is now ready...."); String url = "jdbc:mysql://localhost/"; String dbName = "testdb"; String ...
0
votes
1answer
37 views

Passing an Array to a SQL query using Java's PreparedStatement

I've been having a little trouble passing an array into a SQL query using Java's prepared statements. I had first tried the sourceforge driver, however I would get the AbstractMethodError when I call ...
0
votes
0answers
22 views

Pentaho Reporting - Use Connection object from Java application

I need my reports (generated in PRD - Pentaho Report Designer) to be completely independent from the used database. And I don't want to have the database connection to be exposed in a JNDI file or ...
3
votes
1answer
57 views

How do I use WHERE EXISTS function in JDBC

For the last 6-7 hours I've been searching/googling/experimenting for a solution to this but no results so far. I have an SQL string(below) which works PERFECTLY in PHPMYADMIN but doesn't work within ...
1
vote
3answers
47 views

Mapping a word to its synonyms in java application

I am working on a word-synonyms application but am having a challenge. The challenge/question is how do i map a word and its synonyms in my application database?
-1
votes
3answers
51 views

Embeddable “NON-JDBC” SQL Database for Java

Is there a embeddable "NON-JDBC" SQL database? That is one that does not require running a server on the hardware as well (like SQLite). Bonus points if it is pure java.
0
votes
3answers
68 views

Working with ResultSets in Java

I've ran into a problem of having to run a number of different queries on the DB (different return types, different number of columns, etc). While writing that i started to wonder if there's a proper ...
1
vote
2answers
44 views

how deal with spaces/tabs in txt files

i am making a program where i would load data from txt files in mysql tables.I would create tables with specific fields and then I would load the data from the txt files in them. I am using java for ...
0
votes
1answer
26 views

Dynamically load class in Linux Java

I'm doing as a school project a multi-platform Distributed Data Base System I need to extract data from the Data Base in Java so i dynamically load my jdbc connector Works Perfect in Windows But ...
0
votes
2answers
37 views

Exception while connecting to DB2 in java using JDBC

I am trying to connect to a db2 database in Java. Below the driver and the connection string and the driver details i am giving Class.forName("COM.ibm.db2.jdbc.net.DB2Driver"); String ...
1
vote
2answers
32 views

Is it necessary to explicitly close connections in Tomcat JDBC pool?

Example code in "http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html" explicitly closes a connection after it is used. However according to my understanding, should not it be the connection pool's ...
-2
votes
0answers
25 views

Weblogic JNDI lookup fails, throws string out of bounds [closed]

I need help with figuring out why my new version does throw String out of bound. I had a lookup in our dev environment which looked up our Data Resource in Weblogic using CONTEXT_URL: ...
1
vote
1answer
39 views

JDBC Transactions behaviour while tomcat redeploying

What happens when I have a number of active JDBC transactions and a redeploy hits the web application?, I searched the Tomcat docs but didn't find anything related. For example: 30 customers have a ...
0
votes
2answers
41 views

How do I QUICKLY check many sql database tables and views to see if they are not empty or contain records

I am working on a SQLite database analysis tool in Java. My current objective is to check to see which tables and views in the database contain no records. My problem is a matter of speed. My biggest ...
0
votes
1answer
32 views

Need help in Oracle OS Authentication

I am trying to use oracle os authentication using jdbc. I have solaris sparc 32 bit machine and oracle 10g. I have alredy setup os authentication in backend and user is ops$oracle. I am using ...
-1
votes
0answers
41 views

com.mysql.jdbc Connection and java.sql Connection [duplicate]

I am having a very big confusion. Whenever I am trying to do Database Connection in Java in Eclipse, I am making an object of Connection Class, i think, as there is an auto-complete facility in ...
0
votes
1answer
53 views

Desktop application login using count

I am trying to call a page when a user validates as "Admin" or "User" but there seems to be a problem. private void validateLogin() { if (getFieldData() == true) { username = ...
0
votes
1answer
36 views

Driver not found when class is instanced dinamically

When dynamically instantiate a class that uses a sql server driver get an error (java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver). To create the class dynamically i ...
-1
votes
2answers
50 views

ClassNotFoundException when a class is instantiated dynamically [closed]

I have a problem with Tomcat 7. When I dynamically instantiate a class that uses a SQL Server driver, I get this error: (java.lang.ClassNotFoundException: ...
0
votes
1answer
29 views

Spring framework jdbcTemplate's queryForObject method

I am new to Spring and reading the book "Spring in Action", I have a question about the following example: public Employee getEmployeeById(long id) { return jdbcTemplate.queryForObject( ...

1 2 3 4 5 191
15 30 50 per page