Questions tagged [jdbc]

Base API which enables interacting with SQL database servers by executing SQL statements using the Java programming language

92 questions
22
votes
9 answers

Unable to connect to mysql through JDBC connector through Tomcat or externally

I've installed a stock mysql 5.5 installation, and while I can connect to the mysql service via the mysql command, and the service seems to be running, I cannot connect to it through spring+tomcat or from an external jdbc connector. I'm using the…
16
votes
2 answers

Is there a way to monitor /dev/random?

We're investigating some JDBC issues, and one of the possible problems is /dev/random being exhausted. The workaround is to switch the JVM to using /dev/urandom, but I wan't to try and determine whether or not the /dev/random is being exhausted. Is…
Josh Smeaton
  • 1,380
11
votes
1 answer

Does an SQL Server instance allow both secure and non-secure connections at the same time?

we have an application running MS SQL Server 2012. For one specific use case we'd like to SSL protect the jdbc connection. I've checked the following links: How to enable SSL encryption for an instance of SQL Server by using Microsoft Management…
10
votes
1 answer

Differences between classes12.jar, ojdbc14.jar, ojdbc5.jar and ojdbc6.jar

We are planning to upgrade our application servers to a new version of JRun which is carrying with it an upgrade from Java 1.4 to Java 1.6. As part of that, we have been testing various pieces of our software stack and realized the need to look at…
Goyuix
  • 3,244
7
votes
1 answer

HAProxy, client timeouts when connecting from JDBC pool

I have a webapp (Tomcat/Hibernate/DBCP 1.4) that runs queries against MySQL, and this works fine for a certain load, say 50 queries a second. When I route the same moderate load through HAProxy (still just using a single database), I get a failure,…
guckmal
  • 171
5
votes
1 answer

terminating connection because of crash of another server process

I have a java scraper that spawns around 1,500-2,100 threads, each of which connects to the same database via jdbc and makes inserts. These threads insert quite frequently. It seems like the db crashes when there are too many connections. I always…
jeebface
  • 265
4
votes
1 answer

What is the best JDBC connection URI for AWS RDS instances?

When using an Amazon Web Services RDS instance from a Java application, what is the best JDBC connection string? It should tolerate the instance falling over to the standby. AWS handles flipping the CNAME to point from the primary to standby under…
Mike Fiedler
  • 2,182
4
votes
1 answer

Impact on SQL 2000 performance of JDBC selectMethod=cursor

(Posted first on SO, but its not getting any answers there. Cross-posting to reach a larger audience, since it is cross-discipline.) In the process of trying to help out an app dev team with some performance issues on a SQL 2000 server, I ran a SQL…
BradC
  • 2,230
3
votes
1 answer

MS SQL Server configured for secure (SSL) connection allows non-secure connection from JDBC Client

I need to connect to the MS SQL Server 2008 r2 using the secure communication. I have been able to do the same using the following connection string: jdbc:sqlserver://<>:1433;databaseName=<
3
votes
2 answers

Can't connect to Amazon RDS MySQL

I'm trying to connect to RDS MySQL from linux machine. When I test the connection with telnet, the telnet session succeeds but when I'm trying to connect to the db with the next command mysql -h hostname -uusername -ppassword I can't get access and…
2
votes
1 answer

What are the negatives of setting a high wait_timeout setting in MySQL?

I'm looking at the possibility of increasing the wait_timeout on a MySQL server in an effort to avoid a streaming JDBC SELECT in a Solr Data Import Handler from timing out after the default 28800 seconds. Note: Setting autoReconnect=true on the…
Brian
  • 135
2
votes
2 answers

how does odbc driver work?

I have an application hosted on jboss. use jdbc driver of oracle to connect to an oracle 10.2g database. Can anyone guide as to what happens when a session is established. Just trying to understand internal working of JDBC/ODBC. Any help is…
Viky
  • 658
2
votes
1 answer

ORA-12705: invalid or unknown NLS parameter value specified

I have a J2EE application hosted on JBoss on Linux. When I try to access the application, I see following error in the server.log file. ORA-12705: invalid or unknown NLS parameter value specified When I point the same JBoss instance to a different…
Viky
  • 658
2
votes
1 answer

Weblogic JDBC connection pool keeps in suspended state when DB is back to normal

We have a JDBC connection pool on a weblogic 12c. When the backend database goes to offline, the pool goes into suspended state, and when the db is back online after a short period of time (say 5 min), the pool goes into running state. That's normal…
dhchen
  • 193
2
votes
0 answers

mysql client can't read query result?

So I have this machine running an XMPP server which connects to its MySQL database. When I start load-testing it, all goes fine up until after about 500s when I notice: Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled…
kellogs
  • 79
1
2 3 4 5 6 7