0

I have a question regarding calling java class from ColdFusion using Javaloader 1.1.

I attempted to access java class from ColdFusion in a local server, and there was no problem. But when I tried the same thing in office server, I got an error:

"the specified directory mypath\Javaloader/tmp/AEFACE9B-1C6F-6569-2329 could not be created. The most Likely cause of this error that mypath \ / tmp/AEFACE9B-1C6F-6569-2329 already exists on your file system."

And another message

"The error occured in Javaloader.cfc line 269". Javaloader.cfc line 269 is < cfdirectory action="create" directory="#path#" >

what do those error messages mean?

this is my code:

//calling java from coldfusion
<cfscript>
sourcePaths = [expandPath("./src")];

loader = createObject("component", "javaloader.JavaLoader").init(sourceDirectories=sourcePaths);

obj = loader.create("myClass").init();
</cfscript>

I really have no idea. Any solution will be much appreciated. Thank you in advance...

Adam Cameron
  • 29,677
  • 4
  • 37
  • 78
Norman Pratama
  • 67
  • 2
  • 12
  • 1
    Does `expandPath("./src")` expand out to 1) a valid directory, 2) what you expect it to expand out to. Recommend you put some debugging in JavaLoader.cfc where the error occurs to try to do some troubleshooting. There's no point in just saying "the error happens in here" and then not give us *that* code, but simply the code that's calling the code that erroring. – Adam Cameron Sep 29 '12 at 13:15
  • 1
    On the surface, it sounds like it means exactly what it says. To compile your source code, the javaLoader creates a uniquely named temp directory (ie *with `mypath\Javaloader/tmp/AEFACE9B-1C6F-6569-2329*) `. That action is failing for some reason. Possibly because it "already exists on your file system." or maybe there is a file permissions problem, bad folder path, etcetera. Does the stack trace say anything else? – Leigh Sep 29 '12 at 14:38

0 Answers0