Link to home
Create AccountLog in
Avatar of Dusty
DustyFlag for United States of America

asked on

Java error on Railo

Windows 2003, Apache2.2, Railo3

When I try to untar a file using the script below, I get this error:

Railo Error (Railo.commons.lang.classexception)
can not load class through its string name, because no definition for the class with the specifed name [] could be found.

The script works fine on my other server with CFMX 7, can anyone tell me how to fix the problem?


TarEntry = createobject("java", "");
TarInputStream = createobject("java", "");
FileInputStream = createobject("java", "");
FileOutputStream = createobject("java", "");
FileIO = createobject("java", "");
tarfile = "C:\mydir.tar";
outdir = "C:\mydir\";
tin = TarInputStream.init(FileInputStream.init(tarfile));
te = tin.getNextEntry();
while (structkeyexists(variables, 'te'))
                destpath = outdir & "\" & te.getName();
                if (te.isDirectory())
                                fos = FileOutputStream.init(destpath);
                te = tin.getNextEntry();

Open in new window

Avatar of _agx_
Flag of United States of America image

Looks like Railo doesn't use that particular ant jar. So you need to install it.  MX7 uses ant 1.6. But I'd guess the latest version would work too.  Download and unzip it.  You don't need all of the jars. Just copy the "ant.jar" into Railo's class path and restart.

ie Copy /apache-ant-1.8.2/lib/ant.jar => WEB-INF/railo/lib (I believe) and restart Railo
Avatar of _agx_
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Dusty


agx --- that worked...once again you have saved the day!... thanks!
As always, you're welcome :)