The point of my first email was that in reality, nothing happens when
you call createObject. The object isn't instantiated until the first
method call. All that happens with createObject is that CF makes the
assumption that it will probably need to instantiate the named class
at some point in the future.
o = createObject("java", "java.lang.String");
o.toString();
On the first line, nothing happens. On the second line, the object is
instantiated, the default constructor is called (an implicit init()
call with no args), and then the toString() method is called.
Does the stack trace tell you any more about the cause of the NPE? Is
your class listed anywhere in there? Because if you can get
HelloWorld to run, then it's most likely something in you custom class
that's causing the problem.
cheers,
barneyb
On Wed, 26 Jan 2005 23:04:12 -0400, Barrett Nuzum
<[EMAIL PROTECTED]> wrote:
> Thanks for the response, Barney.
>
> >Instantiation of Java objects happens at the first method call, NOT at
> >the createObject call.
>
> I misspoke. I'm instantiating with createObject, and then it barfs when I
> perform the method call.
>
> >Now that that's out of the way, I bet the problem you're having is
> >that your class isn't being found. It must be added to the CF class
> >path, as configured in the JVM settings page of the CF admin.
>
> CreateObject is running successfully, though, and other classes (Hello,
> World-type stuff) runs fine in the same directory.
>
> I wrangled for some time with a ClassNotFound error. This is definitely NOT
> that.
>
> Barrett
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 7 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191909
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54