Skip to main content

All Questions

Tagged with
0 votes
1 answer
68 views

No Persistence provider for EntityManager exception given in IntelliJ IDEA

The problem is that I can't use my persistence xml file to create an EntityManager, as they say I don't provide one for And_GG.storefront. (my DB name with no typos) This is the file: <persistence ...
user avatar
0 votes
0 answers
1k views

how to handle ORA-17820: The network adapter could not establish the connection error

I want catch db error when trying to connect to it My code: private static String getValueFromDB(String dbConnection,String dbUsername,String dbPassword,String condition,String field){ String ...
Mhd adnan Al kharfan's user avatar
0 votes
1 answer
147 views

Having errors when calling repository methods in spring boot application

I am getting this error when calling repository methods at the bottom of the method. When those repository methods moved to top of the method they work. These are the errors I am getting, org....
Duleep's user avatar
  • 1
2 votes
1 answer
2k views

SQLNonTransientConnectionException: Socket fail to connect to host. Error when trying to connect to remote MariaDB with Java

I'm facing an issue while connecting to a remote MariaDB database from my work using Java. I have to use an SSH connection. For the SSH part, I'm using the dependency Jsch <dependency> <...
Agustin's user avatar
  • 21
0 votes
1 answer
1k views

How to catch a specific exception message thrown by a SpringBootApplication?

I have a Spring Boot application that connects to a database. The main class is this: @SpringBootApplication public class OurApplication { public static void main(String[] args) { try { ...
pacoverflow's user avatar
  • 3,891
0 votes
1 answer
2k views

Oracle 19c upgrade: JDBC error java.sql.SQLRecoverableException: Closed Connection

We have recently upgraded Oracle database from 11g release2 to 19c. Now we have Oracle 19c database server, JDK 1.8 and ojdbc6.jar combination. We have some java code to create JDBC Statement object ...
Kousik Mandal's user avatar
0 votes
0 answers
30 views

JEE Servlet SQLException practice [duplicate]

Is it good practice to handle exception like this? Or there is any better alternative way to do it? The code works fine but I feel that not all the Exceptions of getAllGrades() method will be shown ...
Strannngahhhh's user avatar
1 vote
1 answer
757 views

How can I recognize a specific Postgres CONSTRAINT

We used to have a constraint in the (Java) domain logic that prevented an entity (foo,task_id) of being inserted into table entity_a if a that task_id was already present. We then threw a specific ...
oligofren's user avatar
  • 23.1k
1 vote
1 answer
296 views

java exception : Before start of result set [duplicate]

I have two tables the first one is for "course" and the other is for "exam": I want select exams which are matched to the code, of course, get by entering its name (nomCours) here ...
Maryam Ouafik's user avatar
0 votes
1 answer
515 views

JDBC Exception when setting parameters on a prepared statement

I would appreciate the help with the following: I am getting JDBCException when setting parameters onto JDBC prepared statement. The fragment of the query where the error is looks like this ... AND (...
Dmitriy Ryabin's user avatar
0 votes
1 answer
815 views

Get SQLState from SQLException exception

I have code which throws SQLException wrapped in RuntimeException, like as: } catch (RuntimeException e) { Throwable t = e.getCause(); while ((t != null) && !(t instanceof ...
Prerna's user avatar
  • 11
0 votes
0 answers
1k views

Optimal way to retry a JDBC connection:

I have a remote database that I access through JDBC. Network is pretty poor this side so I get a couple of network related SQLExceptions when I'm sometimes working with the application. I've decided ...
phsu1's user avatar
  • 29
0 votes
1 answer
176 views

Why do I get a SQLException even if I don't commit?

I have a method to check how commit is work. I'm trying to set wrong values to get exception and check when it throws. I thought it will be after commit ,but it throws when I use the executeUpdate ...
DozezQuest's user avatar
0 votes
1 answer
241 views

Getting Exausted ResultSet Error in Java jdbc oracle [duplicate]

This is the code for jdbc which is written in eclipse. I am just trying to store the result of the query to ResultSet rs and adding it to String name. But on execution the below code i am facing ...
Shubhro's user avatar
  • 75
2 votes
1 answer
535 views

Throwing custom exception on an empty ResultSet on JDBC

I have an issue with a boolean statement while trying to use a custom exception. when using my code to check if a coupons exists in the db, it returns true when it exists. however, when coupon does ...
Shai Ace's user avatar
  • 120

15 30 50 per page
1
2 3 4 5
12