Cheers all. Just some notes: 1) Andrew, I think you have misread what I asked. Yes, I pointed you @ some constructors. What you were supposed to be noting was that those constructors require arguments of type Field.Index, Field.Store, Field.TermVector, which are inner classes. Make sense now?
2) Grant's example doesn't work (in case anyone else was tempted to run with it). One's never going to get very far trying to instantiate a Java object as a "component" (I presume that's just a brain-fart, though), but more importantly the class-reference syntax seems wrong. Or at least it is at odds with what a few other people have come up with, and indeed it just errors. 3) MrBuzzy: cheers, that's it. The Adobe article is, however, a bit misleading in saying this: "You cannot call Java inner classes directly in ColdFusion". Because, as MrBuzzy demonstrates, you can. 4) Using MrBuzzy's syntax, I see what Grant is talking about: despite creating the objects just fine, the constructor code just errors with - rather unhelpfully - " An exception occurred when instantiating a java object. The cause of this exception was that: ." back from CF. Accessing the objects in isolation works fine, but CF is buggering something up between instantiation and using them in the constructor. EG: <cfset oIndex = createobject("java","org.apache.lucene.document.Field $Index")> <!--- works fine ---> <cfset oIndexNo = oIndex.NO> <!--- works fine ---> <cfdump var="#oIndexNo#"> <!--- works fine, and outputs what I'd expect to see ---> <cfset oStoreNo = createobject("java","org.apache.lucene.document.Field $Store").NO> <!--- works fine ---> <cfdump var="#oStoreNo#"> <!--- works fine ---> <cfset oDoc.add(oField.init("id", "1", oStoreNo, oIndexNo))> <!--- errors as per above---> NB: using the Field(String name, Reader reader) constructor works fine, but I don't want to do that. I've yet to finish exploring this, though, and if I nut it out, I'll pass it on. I am leaning towards Grant's / MrBuzzy's suggestions of wrapping this stuff in a quick Java class, written in such a way that the methods only expect data types CF is comfortable with. All interesting stuff. Cheers again. -- Adam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---