On 14-06-2008 06:49:46 -0700, Rt Ibmer wrote:
If I run merovingian and then try to connect to my database using JDBC through my Java app, I get this error returned by JDBC:
"Maximum number of redirects reached, aborting connection attempt. Sorry."
Please run: java -jar jdbcclient.jar --database=yourdb -Xdebug here, and send me the resulting monet_XXXXXXXXXXXXXXXXXXXXXX.log file.
OK, but please note that I do NOT have this 'max redirects reached' problem when I use jdbcclient.jar. I only have this issue when I use JDBC through my web app (which internally uses JDBC to talk to the db). Also note that if I use mserver5 instead of Merovingian than everything works fine from my Java app with JDBC! So the problem is specifically with use on Merovingian.
Great. Then it is exactly what I thought: a bug I already solved. You can interchange the jdbcclient.jar with your monetdb-jdbc-1.X.jar file. The former contains the latter, and in your case, the latter is outdated.
I noticed that your system does not have openssl and/or libpcre available. The first might cause this behaviour if something is really messed up in the code. So, please send me the logfile.
Actually I do have openssl installed. I built it from source a while back and it works fine when I manually use the openssl command, but perhaps I didn't get it to install properly into the dirs/lib dirs apps are looking in for its libraries?
I deduced that it is unrelated to the problem you're seeing.
*** The two most important points that I cannot stress enough that may be good clues as to what is causing this are as follows:
1) JDBC through jdbcclient.jar works, but JDBC through my Java servlet does not.
The driver you use in your application is too old. You need to use a more recent driver, such as the one included in jdbcclient.jar. (you can rename it if you prefer)
2) If I run mserver5 INSTEAD of merovingian, than JDBC through my Java serlvet works just fine!
Correct, no redirection is performed in that case.
What do you suggest I try next either to resolve it or to collect more troubleshooting information?
Use the jdbcclient.jar as your JDBC driver, throw away the old one.