java - Issue with JavaLoader while loading jsoup -
i trying load jsoup using javaloader getting initiation error:
<cfscript> // array absolute file paths of referred jar files. paths = expandpath("jars/jsoup-1.7.3.jar"); //creating java loader object passing in array containing file paths - loaderobj =createobject("component","javaloader.javaloader").init([expandpath('jars/jsoup-1.7.3.jar')]); //so now, can create instance of object 'bmw' , 'pulsar' class. writedump(loaderobj); abort; jsoup = loaderobj.create("org.jsoup.jsoup"); </cfscript>
object instantiation exception.
class not found: org.jsoup.jsoup
the error "class not found" means javaloader not find requested class.
this suggests expandpath('jars/jsoup-1.7.3.jar')
not resolving correct location file.
to see looking, dump out:
writedump( expandpath('jars/jsoup-1.7.3.jar') );
that tell javaloader being told look, can either move existing jsoup jar file location, or update path point jar file is.
depending on application, may find useful setup /jars
mapping, can refer /jars/jsoup-1.7.3.jar
, know mapping used resolve path.
Comments
Post a Comment