Recently, as part of a project for my future professional development, I decided I wanted to get the Venice Web Communities System (mentioned in my previous post on Electric Minds) up and running again. This proved to be a surprisingly difficult task, and, in some respects, a study in software archaeology, and also in "What was I thinking? Was I thinking?"

The First Challenge: An Environment

The second-most recent commit to the Venice repository says "updates to make code build with Java 6." Java 6 is positively ancient at this point, having left public support status in February 2013. Certainly, it wouldn't be available on any modern OS, so I'd have to set up something to run it. Fortunately, before getting laid off from Broadcom, I purchased a license for VMware Workstation. (And then they had to go and make it free for everyone, but oh well.)

The original Electric Minds phoenix server was probably Debian, since that's what I favored in those days, but I decided to go with Ubuntu this time around. A quick talk with ChatGPT told me that the most recent LTS version of Ubuntu that supported Java 6 was 14.04 LTS (Trusty Tahr), which went completely unsupported in 2024. Since this was just a VM, however, no problem. I downloaded ISOs of both the 32-bit and 64-bit versions, and elected to set up a 32-bit VM, as one of the libraries used by Venice, Java Advanced Imaging (JAI), uses a native-code accelerator shared library, which would have been 32-bit back in those days.

I gave the VM 6 Gb of RAM and a 40 Gb hard disk, and turned off 3D acceleration (not needed for a server). I configured it for bridged networking, and then booted it into the install ISO to set it up. Once it was running, I updated the packages for 14.04.6, configured the networking to a static IP in my "experimental" address range, and made sure OpenJDK 6 was installed.

Pulling it Together

The version of OpenSSH installed in that VM was so old, it wouldn't recognize my modern SSH keys, nor could Git connect to my Gitea server, even with an SSH key generated on the new system and configured into the server. I wound up downloading a source tarball for Venice from Gitea and copying it over to the VM.

Now came time to figure out the libraries. Fortunately, down in the basement, I found a number of old CDs I had created as backups back in the day, and the most recent one contained distribution archives for most of what I needed, including Apache Tomcat 5.5.15 and Ant 1.6.5. Back in the old days, I used to install all those packages under a /usr/local/java directory, so that's what I did. Then I copied build.properties.sample to build.properties and edited it to reflect the location of all the libraries I had. Some I didn't have, so I wound up spelunking through corners of the Internet to find things that might work and had the "right" version numbers.

Then it was time to build...and the ant compile step threw tons of errors. I had forgotten a note, lib/README.lib, that told me that certain libraries had to be placed in the JRE's lib/ext directory to work. JAI and JavaMail were the two I needed, the other three were now "built in" to Java 6. I also symlinked JAI's native code library to /usr/local/lib so the dynamic linker could find it. With that, Venice built with no errors.

Venice uses MySQL as its back-end database, so I next installed and configured that. When it came time to run the setup/database.sql script, however, MySQL barfed, giving an ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes. The version of MySQL I was using, 5.5, didn't support full-text indexes in InnoDB databases, the default. I dropped the database, changed a setting in /etc/mysql/my.cnf (it was default-storage-engine=MyISAM), and tried again. That worked. (I remember that the old EMinds database was MyISAM, so this makes sense.)

Time to start Tomcat and see it work! I loaded the URL and...got an error message page, saying "Class com.mysql.jdbc.Driver not found." Oh crap, I forgot, the MySQL JDBC driver had to be copied to the lib subdirectory before building. Fix that, rebuild, restart, and...a really weird error about a missing Context inside the org.mozilla.javascript code. What the hell?!?

Really Bizarre Engineering

A little background here. Most pages in Venice work by executing a JavaScript file (identified by a URL path ending in .js.vs; the .vs stands for "Venice script" and is removed before the URL fragment is used to look up the script file). The end result of the script execution is a "content object" that renders itself; this object often wraps a Velocity template. (The key part of this is in BaseServlet and its subclass ScriptExecServlet, if you care.) Scripts are executed through a class that wraps the Bean Scripting Framework (BSF), which can manage multiple scripting engines for different languages. One of those is JavaScript, in the form of the Rhino library.

Those two libraries were not among the ones I had archived on my backup CD. I had tried to locate JAR files with that version number online, and, apparently, the ones I found didn't get along. As I recall, that was always a touchy part of the code.

(Why in the hell did I do it this way? I think I was inspired by the project I was working on for Narex, which used something very similar. And no, I'm not going to lay claim to inventing Node.js long before 2009; these scripts are much more limited in scope, and rely heavily on imported Java functions from the other parts of the Venice code.)

Fortunately, a slightly older backup CD had...a complete tarball of a working deployed copy of Venice! I dug into there, extracted the bsf.jar and js.jar files, dumped them into a salvagelibs directory on the VM, and modified build.properties to point to those files. Full rebuild, restart Tomcat, visit the URL, and...success!

Time Capsule

It was strangely pleasant to see the old code working again. I was able to sign in using the default Administrator account, create a new topic in one of the empty conferences in the default "La Piazza" community, and post to it. I bounced around to various things like the Admin settings and the About page. The display looked "stretched out" on my big monitor; I'm suddenly reminded that screens were a lot smaller back in the day.

The generated HTML is pretty ancient, too...all <table> and <font> stuff, very little use of CSS. I can see that I'm going to have my work cut out for me to try and modernize that.

"About Venice" screencap

Yeah, the code has my deadname all over it, and also "Silverwrist Design Studios." That was the business name thought up by my ex-wife, who was nicknamed "Silverwrist" because of her habit of wearing many silver bracelets. I didn't have the erbosoft.com domain yet, so I used hers for the package namespace.

Lots of history behind this...more to come later, perhaps.

...or show your appreciation some other way