Re: Converting simple Java code to CF

2007-11-19 Thread Jide Aliu
> ie. without the must not be abstract or interface part. Or perhaps > I'm confusing it with a legitimate "must not be abstract ..." > exception ;-) Hi guys, you were right Janet, FileInputStream is concrete. The reason why it was throwing the error is because the File I was accessing had null

Re: Converting simple Java code to CF

2007-11-17 Thread Janet MacKay
>That error is a totally non-specific object instantiation error. That third >sentence (...must not be an interface...) is just a stab in the dark by some >engineer trying to be "helpful". Look down the full stack trace to find out >what the real error is. Jaime, That wouldn't surprise me, but

RE: Converting simple Java code to CF

2007-11-17 Thread Jaime Metcher
That error is a totally non-specific object instantiation error. That third sentence (...must not be an interface...) is just a stab in the dark by some engineer trying to be "helpful". Look down the full stack trace to find out what the real error is. Jaime Metcher > That looks very promising,

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
If you look the API for the getSlideByPosition(), what type of value(s) does it expect and is the method public or protected/private? ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active prog

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
> I see the problem. You haven't actually created a com.aspose.slides. > Presentation object. What you've created is a FileOutputStream object. > That's why the method isn't found. > > init("c:\test\source.ppt")> Isn't that what the first line of the code is doing? ~~~

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
> > seems setting it up like so > > have solved the problem. > > > init("c:\test\destination.ppt")> > > That still looks off to me. Since you can access getSlideByPosition() > I think you fixed "pres1" but not "pres2". Then again it might just > be my brain crashing at the end of a long day

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
Try something along the lines of this ... ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adob

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
>It expects an int value the method is public, see below: Yes, that looks right. If you cfdump an instance of the object do you see that method name? ~| Download the latest ColdFusion 8 utilities including Report Builder, plug

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
> Isn't that what the first line of the code is doing? action="create" type="java" class="com.aspose.slides.Presentation" > name="pres1"> Yes and no. You're creating the object, but then overwriting it a few lines later with a FileOutputStream object > Also, you're not passing the file p

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
> That's weird. FileInputStream is concrete and from the java code > Presentation should be concrete too. > > Do you get a different error if you break it out into separate lines? > > init("c:\test\destination.ppt")> > init( fis ) > Thanks a million for your help Janet, it seems setting it u

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
> seems setting it up like so > have solved the problem. > init("c:\test\destination.ppt")> That still looks off to me. Since you can access getSlideByPosition() I think you fixed "pres1" but not "pres2". Then again it might just be my brain crashing at the end of a long day ;-) Good luck w

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
>Try something along the lines of this > > > > fis.init("c:\test\destination.ppt")) > > fis.init("c:\test\destination.ppt")) > > >.. That looks very promising, it coming up with a different error now: "Object Instantiation Exception. An exception occurred when instantiating a Java objec

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
> That looks very promising, it coming up with a different error now: That's weird. FileInputStream is concrete and from the java code Presentation should be concrete too. Do you get a different error if you break it out into separate lines? ~~~

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
> >It expects an int value the method is public, see below: > > Yes, that looks right. If you cfdump an instance of the object do you > see that method name? Yep the method name is there oh so frustrating, it shows like so below: METHOD getSlideByPosition(int) RETURN TYPE com.aspose.slides.S

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
> If you look the API for the getSlideByPosition(), what type of > value(s) does it expect and is the method public or > protected/private? > It expects an int valuethe method is public, see below: public Slide getSlideByPosition(int position)Returns the slide by SlidePosition. Parameters

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
>Yep the method name is there oh so frustrating, it shows like so below: I see the problem. You haven't actually created a com.aspose.slides.Presentation object. What you've created is a FileOutputStream object. That's why the method isn't found. ~~

Re: Converting simple Java code to CF

2007-11-16 Thread Jide Aliu
>Did you try what was suggested ;)? ie using javacast > > > Thanks Janet, forgot to put that in, yes I did, I used javacast but the error remained the same. ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and in

Re: Converting simple Java code to CF

2007-11-16 Thread Janet MacKay
> If this is a Java > object and you verified that the method exists, you may need to use > the javacast function to reduce ambiguity." Did you try what was suggested ;)? ie using javacast ~| ColdFusion is delivering appli