Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
User Journal

Journal karniv0re's Journal: Waste of a Day

Instead of spending the day coding, I was stuck troubleshooting a
support case. These are my least favorite days.

The support case in question was about writing barcode image files into
a cfdocument.

But the page made a cfhttp call to the page the wrote the image file to
disk, then included it using an img tag. This made it hard to debug.

After enough fucking around with cflog, I narrowed it down to this
error:

Unable to create temporary file
java.lang.SecurityException: Unable to create temporary file at java.io.File.checkAndCreate(Unknown Source) at java.io.File.createTempFile(Unknown Source) at javax.imageio.stream.FileCacheImageOutputStream.<init>(Unknown Source) at com.sun.imageio.spi.OutputStreamImageOutputStreamSpi.createOutputStreamInstance(Unknown Source) at javax.imageio.ImageIO.createImageOutputStream(Unknown Source) at javax.imageio.ImageIO.write(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:87) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272) at cfbarcoder2ecfm1376469513._factor6(/content/admin/htdocs/coldfusion/testing/consulting/supply/barcoder.cfm:104) at cfbarcoder2ecfm1376469513.runPage(/content/admin/htdocs/coldfusion/testing/consulting/supply/barcoder.cfm:5) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:375) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:288) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Well, that's fucking ugly.

After lots of digging and trying shit (even tried setting the System property java.io.tmpdir - but nope, it's not writing to a file, it's writing to
memory), it came down to one issue.

<cfset temp = imageio.write(image, "PNG", baos)>

Where image is a java.awt.image.BufferedImage object, and baos is a java.io.ByteArrayOutputStream object.

Yep. It's not able to write to memory for some stupid reason. Oh, and it only happens half of the time.

Gotta love that stupid shit.

I did find one cool thing today, though.

Squad is a free online collaborative code editor. Q. How fucking cool is that? A. Very fucking cool.

There were a few other online editors, but this one is fast and has nice features. Nice work, guys!

This discussion has been archived. No new comments can be posted.

Waste of a Day

Comments Filter:

Save the whales. Collect the whole set.

Working...