CF won't create the actual java object until you call it, so the lack of
an error on the <cfobject> line may not mean that part went 100% right.

Things to check:
* The class itself needs to be declared as "public" (so, "public class
....")
* Your class needs to have a public no-argument constructor (or no
constructors at all, which would also be fine). If the Search1 class
does have a constructor that requires arguments then call it using CF's
trick with the object "init(...)" method.
* I don't see any package name there, so that must mean that the Search1
class doesn't have a "package" line at the top of it.  This is
definitely a good idea to include but I don't think that is source of
the problem.

Hope that helps.
        Mark


-----Original Message-----
From: Tripura Kondabala [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 08, 2007 4:17 PM
To: CF-Talk
Subject: Error when using Java class in Cold Fusion

Hello Every one
I am getting the following error in my Coldfusion code . The error is as
follow === Class coldfusion.runtime.java.JavaProxy can not access a
member of class Search1 with modifiers "" 


My cold fusion code is as follow ===
<cfobject type = "Java"  action = "Create" class = "Search1"  name =
"searchObj" />
<cfset ret = searchObj.search()>

and its giving error for <cfset ret = searchObj.search()>  line ...
Can anyone tell me  what is the reason 

I have a Java class named Search1 and there is a public method in it
with the following declaration ...
public int search() throws Exception 
{
...
...
...
...
}

Thankyou 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285740
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to