Solving java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.

Recently I have began working with JMS and ColdFusion, in which we are building a system that subscribes to an enterprise JMS server and picks up messages relevant to its needs and acts on them. I had my proof of concept working with the open source Apache ActiveMQ server and was very pleased with the results.  However, in our production environment, the powers that be decided to use the very non-free SonicMQ server.

As I tried to convert the event gateway over to the SonicMQ server, it failed on initialization with the following exception:

javax.naming.NamingException [Root exception is java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.]
	at com.sonicsw.jndi.mfcontext.MFConnectionManager.connect(Unknown Source)
	at com.sonicsw.jndi.mfcontext.MFConnectionManager.<init>(Unknown Source)
	at com.sonicsw.jndi.mfcontext.MFConnectionManager.getManager(Unknown Source)
	at com.sonicsw.jndi.mfcontext.MFContext.<init>(Unknown Source)
	at com.sonicsw.jndi.mfcontext.MFContextFactory.getInitialContext(Unknown Source)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at examples.JMS.JMSConsumer.start(Unknown Source)
	at examples.JMS.JMSGateway.startGateway(Unknown Source)
	at coldfusion.eventgateway.GenericGateway.start(GenericGateway.java:118)
	at coldfusion.eventgateway.EventServiceImpl$GatewayStarter.run(EventServiceImpl.java:1428)

In my research on this problem, I found several people reporting similar errors, each on CF8, and each talking to 3rd party tools.  Eventually I found the solution through an email discussion between one of the developers in my company and an Adobe developer.  Apparently in CF8, they added FIPS security, which disables the Sun JCE (encryption libraries).  To solve this error, you need to add the following line to your java.args in your jvm.config file in JRun.

-Dcoldfusion.disablejsafe=true

Now restart your server and try again!

Firebug with Firefox 3 in Ubuntu Hardy Heron

Several months ago when I first tried out Firefox 3, I found that I couldn’t get Firebug to work. At that time, I was still on 7.10 (Gutsy) and just rolled back to Firefox 2 and carried on about my business. Once I upgraded to 8.04 (Hardy), where its default Firefox is FF3, I tried again. I still had failures and no matter which “fix” I came across, I still was never able to open Firebug in a panel, but only in a separate window.

That all changed this morning! I was looking through packages and discovered that there is a Firebug package in the Ubuntu repos. I promptly uninstalled Firebug from the extensions settings in the Firefox and closed my browser. I went to terminal and typed:

$ sudo apt-get install firebug

… I then opened up Firefox 3 and BAM! It works exactly like it should. I have no idea what the difference is in this version of Firebug, but for whatever reason, my problems are solved.

CF8 error after upgrading to Ubuntu 8.10 Hardy Heron – libstdc++.so.5

This afternoon I did an upgrade from Gutsy to Hardy on my main development environment. I experienced *almost* no disruption to my system, with one exception (so far!). When I instantiated a ColdFusion 8 application which instantiates a webservice onApplicationStart, I received the following exception:

jikes: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Jikes! Well fortunately the fix is quite simple. Go to a terminal and install libstdc++5 like so:

$ sudo apt-get install libstdc++5

Restart your application and carry on! I am not sure what changed between the distros, but apparently the libraries that ColdFusion uses for invoking webservices depend on this package.