Solving java.lang.SecurityException: Seed must be between 20 and 64 bytes. Only 8 bytes supplied.
ColdFusion, JavaRecently 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!





Loading....