Tag Info

Hot answers tagged

14

This can happen for a variety of reasons. I just saw it myself a few weeks ago but I can't remember what the fix was for me. 1) Verify the address mysql is bound to, it's probably 127.0.0.1 (only) which I believe is the default (at least on standard Ubuntu server). You'll have to comment out the bind-address parameter in my.cnf to bind to all available ...


8

I have had the same problem in two of my programs. My error was this: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. I spend some days to solve this problem. I have tested many approaches ...


5

Well first off, JDBC and ODBC are not compatible. JDBC was Java's answer to ODBC, and they fill the same niche, but you can't connect to an ODBC data source using JDBC and vice versa. Now there IS a jdbc-odbc bridge in Java, but that is a compatibility hack, not a native connector (The translation will go JDBC->ODBC->(Target Database) rather than ...


5

Yes you can run the smaller drivers on newer java versions. It is just that ojdbc14.jar does not contain JDBC3 and JDBC4 features. You have to differentiate between runtime and compile time. At runtime you can use ojdbc14.jar in a JRE6 as long as your app code is not using JDBC4 features. If you want to use ojdbc14.jar in the buildpath you might experience ...


4

Sure! Ask /proc/sys/kernel/random/entropy_avail.


3

Use sqlplus. SQL*Plus FAQ, SQL*Plus Documentation


3

The only way to get more info from haproxy than what you have, would be to use the show sess or show sess <id> command periodically to watch the state of each tcp connection, though I'm not sure if you would get any more useful information. The cD termination state is the most helpful piece of info you have. What it means exactly is that an ...


2

What are the negatives of setting a high wait_timeout setting in MySQL? Idle and persistent connections will obviously take longer to expire. This may mean that you bump up against some default and sane limits. The first one will be max_connections. Then following that - because of the way which MySQL assigns memory and file descriptors to connections ...


2

Here is a good reference to various sql utilities. Of these I've only used sqlshell and it did what you e.g. sql from the command line. It's java based so you will need a java 6 jre to use it. The jar file version has a gui for installation so you might want the zip version. Henplus also looks like it would do what you want. I've not seen any of them in ...


2

Briefly, selectMethod=cursor theoretically requires more server-side resources than selectMethod=direct only loads at most batch-size records into client memory at once, resulting in a more predictable client memory footprint selectMethod=direct theoretically requires less server-side resources than selectMethod=cursor will read the entire result set ...


2

In Oracle, LOB (including BLOB) is stored as: in-the-table LOB - if the LOB is smaller than 3900 bytes it can be stored inside the table row; by default this is enabled, unless you specify DISABLE STORAGE IN ROW normal LOB - stored in a separate segment, outside of table, you may even put it in another tablespace; for these: a minimum of CHUNK bytes are ...


2

The most likely candidates are network latency and load. Is the database server being used by any other applications? What's the latency to the database server, and how much bandwidth is available? I'd start the investigation with some query profiling on the DB server. You could easily compare query times on the production DB to your local to determine ...


2

I'm answering for my own question. The JDBC Connection Pool's address property was wrong. It was a DNS name about which only one of three nodes knows.


2

The next course of action is to check with your provider (in this case Amazon) to see if they know anything about the issue. It seems that they do: Network connectivity We are observing an issue outside of our network that is preventing a small number of Verizon FiOS customers from reaching the US-EAST-1 Region. Connectivity within the Region as ...


2

I suspect that this article will help you out: Understanding SSL Support The protocol still uses TCP port 1433, by default, irrespective of SSL being used. The client can request SSL and, if the server has a certificate installed, the server and client will negotiate SSL. The server can be configured to force SSL, which will cause clients that do not ...


1

I think a good way for tracing memory leaks is to attach VisualVM to the running Java process (in this case a GF instance) and look into the reference tree of heap dumps. Another way that comes to my mind, but requires some work, would be to write your own connection/connection pool wrapper and log a stack trace every time connection is taken from the pool ...


1

The database needs to be up and running and accessible through the JDBC Data Source. Since it is not accessible, ODSI cannot connect to it to determine the database type.


1

Typically I create context.xml.default files or even appname.xml files in the /conf/Catalina/localhost directory for such purposes. It's the right way.


1

Check your context.xml file. Did you embed the <Context> within the existing <Context> of the default file? Worst case scenario it to take this: <ResourceLink type="javax.sql.DataSource" name="jdbc/LocalDB" global="jdbc/DB" /> ...and ensure it is within the already existing <Context> tag and get ...


1

As the exception shows the error is in the SQL syntax, probably in the JDBC Url, if you read the documentation you can see that when the port isn't specifed the colon sould also be ommited, try this: .getConnection("jdbc:mysql://localhost/schema?user=user_name&password=pass_word") Hope it works.


1

If it works on another server, then that server is the one hosting the mysql database. Your connect string needs to refer to it instead of localhost. The command 'netstat -lnt | grep 3306' will tell you if mysql is running and listening on the port. If it is only listening on '127.0.0.1', you will need to run your Java application on the same server, or ...


1

Your MySQL may be configured to specifically listen on only one IP address. Also note that localhost has special meaning in some if not most MySQL clients: it means to use a UNIX socket on the box. The address 127.0.0.1 will use a real TCP connection, so try that. If you still suspect iptables: iptables -L will allow you to see the current ruleset. Edit: ...


1

I know this answer is a bit late, and I don't even know if it will work, but since the connection string is a URL, can you escape it the way you would a URL? i.e. Table%20%28one%29


1

This is most likely a limit on the data source config on the JDBC MySQL driver then in your setup - wherever you have your data source defined look for the max connections property. Depending on your setup this could be in several locations defined differently (i.e. in server.xml at the Tomcat level vs. in web.xml at the webapp/ level), but it's in there ...


1

Try DBD::JDBC.


1

Did something change on the network ? Was a firewall added on the path between client and oracle server ? Posting the database ora config file would help


1

This error may occure when you: Try to connect to the different host:port. Double-check your settings. Oracle server is down. You need to start it. Your firewall blocks your connection to oracle. You need to allow access for your application.


1

It seems like you can't connect to Oracle server. First try to telnet your Oracle server by using the Oracle's port. Ex: telnet <Oracle Serrver IP> 1521


1

And check whether the application is closing connections properly, this is the programmers stuff to do, but still a common error.



Only top voted, non community-wiki answers of a minimum length are eligible