Jul
01help
Using DISTINCT keyword on an Enity classes with an @Embeddable primary-key results in an EclipseLink error. This affects EclipseLink as of 2.2.0.v20110202-r8913. Details after the jump.
Read the rest of this entry »
Posted by John Manko | Posted in Java, Linux | Posted on 03-06-2011
Much has changed with Oracle’s recent acquisition of Sun Microsystems. Most noted has been Oracle consolidation and relocation of information from Sun websites. In addition to Oracle’s branding of Java, many pages have moved or have been killed. One of these links, important to Netbeans, is the location to download Glassfish for automatic installation. I run/virtualize Ubuntu v11.04 for one of many development environments, and for those who use Ubuntu you know all too well how that distribution is slow with merging current releases. For instance, I’ve been running Netbeans v6.9 since v10.10, and it looks like I’ll be running it until v11.10. With that said, I’m stuck with v6.9.1 at the moment. Unfortunately, there is a bug in version of Netbeans prior to v7 that is a result of Oracle migrating website content.
Read the rest of this entry »
forum
Posted by John Manko | Posted in Java | Posted on 27-03-2011
Ever get that feeling like an entire day, if not days, is going to be wasted as a result of tracking down a compatibility issue that leaves you rushing to find a fix? That’s exactly how I felt after I upgraded my test instance of Glassfish from v3.0.1 to v3.1, breaking compatibility with existing applications. I, unfortunately, didn’t thoroughly read the EclipseLink Bug List or notes on Richfaces v3.* integration with JSF 2.0. In fact, I didn’t read it at all.
For the purpose of this post, I want to detail the immediate and significant problems that may result after a GFv3.1 upgrade. The initial bug I encountered has to do with EclipseLink and it’s handling of column/table name comparisons, and ultimately throws an org.eclipse.persistence.exceptions.ValidationException exception. Case-sensitivity becomes an issue with this release, and a fix is not available until release 2.2.1 at the earliest (currently at 2.2.0.v20110202-r8913). There is a workaround, however. Next, I’ll look into the care that must be taken with running Richfaces 3.3.3 in a JSF 2 environment. Read the rest of this entry »
help
I forgot Perl (been about 10 years), but this script I wrote does the job. Released under GPL v2. Modify and share as you see fit.
#!/usr/bin/perl
use Fcntl qw(:flock :seek);
use WWW::Mechanize;
# Would like to accept the javadoc root path as a parameter. Right now, need to hard code.
$allClassesFile = "./allclasses-noframe.html";
my $mech = WWW::Mechanize->new();
$mech->get( "file:$allClassesFile" );
my @links = $mech->links();
# This is the new single file
$sitedata="single.html";
open(DAT,">$sitedata") || die("Cannot Open File $sitedata");
flock(DAT, LOCK_EX);
seek(DAT, 0, SEEK_SET);
print DAT "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
print DAT "<HTML><HEAD><META http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">";
print DAT "<TITLE>Single Page</TITLE><LINK REL =\"stylesheet\" TYPE=\"text/css\" HREF=\"stylesheet.css\" TITLE=\"Style\"></HEAD><BODY BGCOLOR=\"white\">";
# Would like to include a table of contents of all classes docs included, with an href="#someclass" linking to the proper section in the page
# TOC
print DAT "<UL>";
for my $link ( @links ) {
$linkText = $link->text;
chomp($linkText);
$linkUrl = $link->url;
chomp($linkUrl);
if (($linkText ne '') && ($linkUrl ne '')){
$linkUrl =~ s/\//\./g;
$linkUrl =~ s/\.html//;
print DAT "<LI><a href='#$linkUrl'>$linkUrl</a>";
}
}
print DAT "</UL>";
print DAT "<hr /><br/>\n";
print DAT "<div style=\"page-break-before: always;\"></div>\n";
# maybe fix to better handle errors
for my $link ( @links ) {
$linkText = $link->text;
chomp($linkText);
$linkUrl = $link->url;
chomp($linkUrl);
if (($linkText ne '') && ($linkUrl ne '')){
#printf "%s, %s\n", $linkText, $linkUrl;
open ACF, "<./$linkUrl" || die("Cannot Open File $linkUrl");
$infile_contents = do { local $/; <ACF> };
close ACF;
# I'm sure there is a better way to split this
@content = split(/<!-- ======== START OF CLASS DATA ======== -->/, $infile_contents);
@content = split(/<!-- ========= END OF CLASS DATA ========= -->/, $content[1]);
print DAT "<a name='$linkUrl'\n";
print DAT "$content[0]\n";
print DAT "<div style=\"page-break-before: always;\"></div>\n";
}
}
print DAT "</BODY></HTML>";
close(DAT);
about
Aug
forum 05
Posted by John Manko | Posted in Computers & Technology, Java | Posted on 05-08-2010
A ServletContext listener is useful when you need to perform an action upon application start-up or shutdown, such as initialize application wide variables from a data store. Continued after the jump….
Read the rest of this entry »