The Coldfusion Open Source Forums
Home | ImageCFC | CFFM | BlogCFM | CFMBB | CFOpenMail / ImapCFC | CFOpenChat
Forums | Profile | Inbox | Members | Chat | Search | Login | RSS
Vivio Technologies CFML Hosting
New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page

Forums: ImageCFC Forum: Object Instantiation Exception ERRO
Created on: 09/04/07 {ts '2018-07-16 15:28:00'} Views: 22468 Replies: 10
Object Instantiation Exception ERROR V2.19
Posted Tuesday, September 4, 2007 at {ts '2018-07-16 15:28:00'}

I am having a problem using the cfcimage 2.19.

My command in my cfm is:

<cfset imgInfo = imageCFC.resize("", "#CurrentPaths#player_images/#Picture_File#", "#CurrentPaths#player_images/thumb_#Picture_File#",105,0)>

This line would come out as followed : /var/www/vhosts/99legacy.com/httpdocs/player_images/881968199405_0_BG.jpg

When I run this page on WINDOWS it works GREAT NO ERRORS! When I run this page on my Linux machine using Fedora Core I get an error!

The error is as followed:

Object Instantiation Exception. An exception occurred when instantiating a java object. The cause of this exception was that: .  

The error occurred in /var/www/vhosts/99legacy.com/httpdocs/image.cfc: line 746
Called from /var/www/vhosts/99legacy.com/httpdocs/image.cfc: line 371


744 :          out = createObject("java", "java.io.BufferedOutputStream");
745 :          fos = createObject("java", "java.io.FileOutputStream");
746 :          fos.init(tempOutputFile);
747 :          out.init(fos);
748 :          JPEGCodec = createObject("java", "com.sun.image.codec.jpeg.JPEGCodec");

Anyone have any ideas on why it doesnt work on my Unix/Linus machine?

Also to add to this, my debug says the following as well


java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedConstructorAccessor101.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
   at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:128)
   at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:56)
   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
   at cfimage2ecfc237649703$funcWRITEIMAGE.runFunction(/var/www/vhosts/99legacy.com/httpdocs/image.cfc:746)
   at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
   at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
   at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
   at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
   at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
   at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
   at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1807)
   at cfimage2ecfc237649703$funcRESIZE.runFunction(/var/www/vhosts/99legacy.com/httpdocs/image.cfc:371)
   at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
   at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:290)
   at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:254)
   at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
   at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
   at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
   at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:194)
   at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:146)
   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1634)
   at cfadmin_edit_management_details2ecfm228383693._factor2(/var/www/vhosts/99legacy.com/httpdocs/admin_edit_management_details.cfm:122)
   at cfadmin_edit_management_details2ecfm228383693._factor7(/var/www/vhosts/99legacy.com/httpdocs/admin_edit_management_details.cfm:18)
   at cfadmin_edit_management_details2ecfm228383693.runPage(/var/www/vhosts/99legacy.com/httpdocs/admin_edit_management_details.cfm:1)
   at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
   at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
   at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
   at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
   at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
   at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
   at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
   at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
   at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
   at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
   at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
   at coldfusion.CfmServlet.service(CfmServlet.java:107)
   at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
   at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
   at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
   at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
   at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
   at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
   at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.io.FileNotFoundException: /var/www/vhosts/99legacy.com/httpdocs\D23DB308-E92C-2A51-A0E44CA914FD29E1.jpg (Permission denied)
   at java.io.FileOutputStream.open(Native Method)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
   ... 50 more

Edited 09/04/07 {ts '2018-07-16 22:46:00'}
RE: Object Instantiation Exception ERRO
Posted Monday, September 17, 2007 at {ts '2018-07-16 18:12:00'}

I just started having this problem as well. I don't know what the hosting situation is (long story) but it just started happening?

RE: Object Instantiation Exception ERRO
Posted Monday, September 17, 2007 at {ts '2018-07-16 19:22:00'}


Quote:

Anyone have any ideas on why it doesnt work on my Unix/Linus machine?

Permissions. Check the permissions to make sure the user that coldfusion is running as (ie, apache, nobody, or www) has the right to write to files in the temporary output directory. By default, that is the same as the destination directory.

Rick

RE: Object Instantiation Exception ERRO
Posted Monday, September 17, 2007 at {ts '2018-07-16 19:31:00'}

Actually it turns out my problem was a little different. My hosting company had upgraded to CF8 and I found this: http://imagecfc.riaforge.org/index.cfm?event=page.issue&issueid=3FCF0E9E-CF19-2FFF-EB9DA2CC9A6D83EA Thanks for the quick reply though!!!

RE: Object Instantiation Exception ERRO
Posted Tuesday, September 18, 2007 at {ts '2018-07-16 09:05:00'}

curious, since that bug was fixed (though I apparently didn't close it).

I've tested resizing of images numerous times on CF8 and it has worked fine.

Have you actually resolved the problem?

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: Object Instantiation Exception ERRO
Posted Sunday, September 23, 2007 at {ts '2018-07-16 11:03:00'}

JoeZack - still waiting to here if you actually solved the problem, and how.

RE: Object Instantiation Exception ERRO
Posted Friday, October 12, 2007 at {ts '2018-07-16 22:03:00'}

I am testing imagecfc on linux mx7

I do a resize just like the code above and get this error: http://www.lostriverlog.com/imagecfc/index.cfm

Looks pretty much the same as what was going on above? It is on a hosted server so I really dont know what to tell the host to do to fix it.

One thing that stood out in the trace though was: Caused by: java.io.FileNotFoundException: /var/www/vhosts/lostriverlog.com/httpdocs/imagecfc\970EA6E0-909E-EDCA-9BFADA5DA3B8188D.jpg

note that after imagecfc the slash is going the wrong way, thus this makes the path invalid. Is this the problem? (and the reason why it would be fine in windows but not in linux?)

RE: Object Instantiation Exception ERRO
Posted Sunday, October 21, 2007 at {ts '2018-07-16 21:17:00'}

Can anyone tell me if my suspicions above are correct? If so is there any way to fix the path so it plays nice with linux?

RE: Object Instantiation Exception ERRO
Posted Wednesday, October 24, 2007 at {ts '2018-07-16 21:42:00'}

ievolve wrote:

Can anyone tell me if my suspicions above are correct? If so is there any way to fix the path so it plays nice with linux?

It was indeed a permissions issue afterall. Got it fixed by making the folder writable.

RE: Object Instantiation Exception ERRO
Posted Saturday, October 30, 2010 at {ts '2018-07-16 18:10:00'}

I am getting this same error. I thought it was a permissions thing, but my CF's tmp directory is set to read&write. I am simply trying the resize method. Here is my specific error...

An exception occurred when performing a file operation moving a file to another filesystem on files /Applications/ColdFusion9/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp//F78274E4-AD0A-BDDF-815B16860E4B17A2.jpg and http://localhost/stark%20images/proof/15/myimage1.jpg.

The cause of this exception was: java.io.FileNotFoundException: /Applications/ColdFusion9/runtime/bin/http:/localhost/stark%20images/proof/15/myimage1.jpg (No such file or directory).

The error occurred in /Applications/XAMPP/xamppfiles/htdocs/Stark Images/cfc/imagecfc/image.cfc: line 759
Called from /Applications/XAMPP/xamppfiles/htdocs/Stark Images/cfc/imagecfc/image.cfc: line 372
Called from /Applications/XAMPP/xamppfiles/htdocs/Stark Images/test.cfm: line 3
Called from /Applications/XAMPP/xamppfiles/htdocs/Stark Images/cfc/imagecfc/image.cfc: line 759
Called from /Applications/XAMPP/xamppfiles/htdocs/Stark Images/cfc/imagecfc/image.cfc: line 372
Called from /Applications/XAMPP/xamppfiles/htdocs/Stark Images/test.cfm: line 3
757 :    </cfif>
758 :    <!--- move file to its final destination --->
759 :    <cffile action="MOVE" source="#tempOutputFile#" destination="#arguments.outputFile#">
760 :    <cfreturn retVal>
761 : </cffunction>

Any thoughts would be appreciated.

RE: Object Instantiation Exception ERRO
Posted Monday, November 1, 2010 at {ts '2018-07-16 13:50:00'}


Quote:

/Applications/ColdFusion9/runtime/bin/http:/localhost/stark%20images/proof/15/myimage1.jpg (No such file or directory).

well, this certainly implies that either the file doesn't exist, or coldfusion ("java") is unable to read it due to either permissions or ownership.

New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page
Subscription Options
Subscription options are available after you log in.

There are 27 active user sessions right now.