Prev: Hashcode and Equal
Next: Exception Handling
From: Arne Vajhøj on 10 Mar 2010 21:45 On 09-03-2010 23:44, jross wrote: > I'm running a simple perl script that checks if port 3306(mysql) is open > or not and display's either PASSED or FAILED > > Perl Code: http://pastebin.org/108205 > > This small script seems to be working fine, but when I put into place > our java applications that are using mysql though the jdbc driver > started to crash (The services crash over night after a jboss restart). > > I started to do some testing and made a small java class to replicate > what our java apps are doing > > Java Code: http://pastebin.org/108202 > > Running both these scripts at the some time seemed to be ok, but after a > while the jdbc driver was complaining about > > "Server configuration denies access to data source" Are you sure that you always get the connections closed ? > The perl script is closing the socket correctly, but I'm not sure if the > jdbc driver is closing the sockets correctly?? > > It could be something in the java code. I did have java complaining > about the stack size saying "increase stack size with ulimit -s ". I > increased the stack size and got an error which was logged, I have > attached the log to this email. > > What I'm using: > > JDBC Driver: mysql-connector-java-2.0.14-bin.jar > JAVA: j2sdk1.4.2_10 > Perl: v5.10.0 > OS: Fedora Core 4 The log files says: Java VM: Java HotSpot(TM) Client VM (1.3.1_18-b01 mixed mode) Arne
From: Arne Vajhøj on 10 Mar 2010 21:49 On 10-03-2010 00:50, markspace wrote: > jross wrote: >> JDBC Driver: mysql-connector-java-2.0.14-bin.jar >> JAVA: j2sdk1.4.2_10 > > These two are very old. Can you upgrade? Java in on version 6 now, 4 is > no longer supported, and 5 is past EOL for free (unpaid) customers. A > 2.0 Connector appears to be ancient. 5 is the current version, 3 is the > earliest still available on MySQL's website. 2.0 can be found if looking for it: http://downloads.mysql.com/archives.php?p=mysql-connector-java-2.0&v=2.0.14 But it is 8 years old. And the page clearly states: MySQL Server versions before MySQL 5.0 are no longer supported. Arne
From: Arne Vajhøj on 10 Mar 2010 21:50 On 10-03-2010 07:42, Lew wrote: > That said, I also was just on a project that still uses 1.4. To their > credit, they're finally now upgrading (gradually) to the (also now > obsolescent) Java 5. > > The actual conversion took about a week for roughly a million lines of > code. But how long time did it take to retest? Arne
From: Roedy Green on 10 Mar 2010 23:40 On Thu, 11 Mar 2010 09:36:37 +1100, jross <joelc(a)cognyx.com> wrote, quoted or indirectly quoted someone who said : >> It is possibly all that is happening is you have MySQL so busy it >> can't attend to Java's request. > >I have increased the MAX Connection variable in MySQL and it made no >difference You still could be saturating it; perhaps there is something it locks for such a request. -- Roedy Green Canadian Mind Products http://mindprod.com The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. ~ Tom Cargill
From: Lew on 10 Mar 2010 23:57
Lew wrote: >> That said, I also was just on a project that still uses 1.4. To their >> credit, they're finally now upgrading (gradually) to the (also now >> obsolescent) Java 5. >> >> The actual conversion took about a week for roughly a million lines of >> code. Arne Vajhøj wrote: > But how long time did it take to retest? The test suites ran in a few hours. They had extensive test suites in place already. Nearly everything just worked, so most of the stuff passed their tests and didn't require adjustment. The biggest single problem came from code that depended on a Java 1.4 bug that initialized classes upon reference to the 'class' literal. As I recall (the conversion itself was a couple of years ago), the workaround was quickly found and implemented. The bulk of the week of conversion was renaming things that had 'enum' as part of the package name, and those were Apache Commons Lang libraries that already had a substitute package set in place so we just used the IDE's global search-and-replace for that. That one bug (dependency on class initialization from the 'class' literal) was the only serious issue, and affected only a few classes in the code base. For the rest, we found that Java 5 supported Java 1.4 source just fine. -- Lew |