1

I am working with Mura CMS on the VivioTech installer of Railo which is railo on tomcat and am getting the following error when I try to upload an image to the content. More specifically it is when CF tries to read the image from the file that gets uploaded that the error happens.

The context of the error is on line 79 of the following:

77: <cfset tempFile= "#serverDirectory##createUUID()#.#listLast(source,'.')#"/>
78: <cffile action="copy" source="#arguments.source#" destination="#tempFile#"/>
79: <cfimage action="READ" source="#tempFile#" name="img"> 
80: <cfelse>     
81: <cfimage action="READ" source="#arguments.source#" name="img">

I can't test with another image format as the system won't let me upload anything but JPEG

Dave Long
  • 9,569
  • 14
  • 59
  • 89
  • Does this happen with any image file? Can you provide a link to an example image file you're experiencing the error with? – orangepips Jan 14 '11 at 20:15

1 Answers1

2

Are you running on some sort of headless Linux server (i.e. one without a graphical window manager installed)? The Java class may be looking for a library not installed on your server OS. Read this thread for possible leads:

NoClassDefFoundError while accessing GraphicsEnvironment.getLocalGraphicsEnvironment on Tomcat

Community
  • 1
  • 1
bpanulla
  • 2,988
  • 1
  • 19
  • 23
  • I am running on Mac OS X (desktop version). Not sure if Tomcat has some kind of issue connecting to the display in Mac. Where would I pass the -Djava.awt.headless=true argument? Right now I hit the startup.sh to start the tomcat server. – Dave Long Jan 14 '11 at 20:47
  • If it's OS X, then you've definitely got a display manager. Looks like this was discussed on the Railo support list: http://groups.google.com/group/railo/browse_thread/thread/4be9c9caa4b18550 – bpanulla Jan 14 '11 at 21:53
  • I didn't find a setenv.sh file in my bin directory, but I did add the line to my catalina.sh, but it still doesn't work. Should I be calling "catalina.sh start" instead of startup.sh? – Dave Long Jan 16 '11 at 16:54
  • I was correct. Call "catalina.sh start" to start the server. – Dave Long Jan 16 '11 at 16:56