Error loading NetworkClassLoader

60 views
Skip to first unread message

dizid

unread,
Jan 24, 2011, 9:37:01 AM1/24/11
to javaloader-dev
hi,

The example loadHelloWorld works fine on my local machine, but on my
webhost it gives an error:

Error Occurred While Processing Request
com.compoundtheory.classloader.NetworkClassLoader

The error occurred in D:\inetpub\calcumania\zonzoeker\JavaLoader.cfc:
line 137
Called from D:\inetpub\calcumania\zonzoeker\JavaLoader.cfc: line 51
Called from D:\inetpub\calcumania\zonzoeker\index2.cfm: line 28
135 : var networkClassLoaderProxy = 0;
136 :
137 : networkClassLoaderClass =
getServerURLClassLoader().loadClass("com.compoundtheory.classloader.NetworkClassLoader");
138 :
139 : networkClassLoaderProxy =
createJavaProxy(networkClassLoaderClass);

index2.cfm line 28:
//create the loader
loader = createObject("component", "JavaLoader").init(paths);

Maybe the webhost (crystaltech.com ) has restrictions in place for
loading JavaClasses from other domains?
Any way around this? (my goal is to use twitter4j Java Library (for
OAuth) to do some automated tweets to my own account.

todd sharp

unread,
Jan 24, 2011, 10:19:36 AM1/24/11
to javaloa...@googlegroups.com
Most shared hosts are probably blocking access to creating java objects (see other threads on this list).

Any reason why you can't just use a straight ColdFusion twitter library?  There are a bunch out in the Open Source world.
--
Todd Sharp
Sharp Interactive, LLC
http://slidesix.com -- Multimedia Enabled Presentation Sharing
IM:  cfsi...@gmail.com
Blog:  http://cfsilence.com
Twitter: cfsilence | slidesix

dizid

unread,
Jan 24, 2011, 11:12:27 AM1/24/11
to javaloader-dev
Thanks for you reply, Todd.

I rolled my own Twitter CFCs, based upon existing librarys and all
was fine until Twitter changed to OAuth.
Since then i am wrestling with OAuth, and i could not find a clean and
simple CFC as an example or starting point for OAuth.

Then i went the road of Raymond Camden,
http://www.coldfusionjedi.com/index.cfm/2010/9/7/Adding-support-for-automated-tweets-with-OAuth
I was hoping that javaloader was the solution for loading the
twitter4j Java library.
Also looked at oauth.riaforge.org but it seems an overkill for just
logging into an API, with dozens of pages of code, an extra Database,
DAO etc.

OAuth is a great concept, but implemeting it is, uhh, arrgghh :)



On 24 jan, 16:19, todd sharp <t...@cfsilence.com> wrote:
> Most shared hosts are probably blocking access to creating java objects (see
> other threads on this list).
>
> Any reason why you can't just use a straight ColdFusion twitter library?
> There are a bunch out in the Open Source world.
>
>
>
>
>
>
>
>
>
> On Mon, Jan 24, 2011 at 9:37 AM, dizid <glasw...@gmail.com> wrote:
> > hi,
>
> > The example loadHelloWorld works fine on my local machine, but on my
> > webhost it gives an error:
>
> > Error Occurred While Processing Request
> > com.compoundtheory.classloader.NetworkClassLoader
>
> > The error occurred in D:\inetpub\calcumania\zonzoeker\JavaLoader.cfc:
> > line 137
> > Called from D:\inetpub\calcumania\zonzoeker\JavaLoader.cfc: line 51
> > Called from D:\inetpub\calcumania\zonzoeker\index2.cfm: line 28
> > 135 :           var networkClassLoaderProxy = 0;
> > 136 :
> > 137 :           networkClassLoaderClass =
>
> > getServerURLClassLoader().loadClass("com.compoundtheory.classloader.Network ClassLoader");
> > 138 :
> > 139 :           networkClassLoaderProxy =
> > createJavaProxy(networkClassLoaderClass);
>
> > index2.cfm line 28:
> >  //create the loader
> > loader = createObject("component", "JavaLoader").init(paths);
>
> > Maybe the webhost (crystaltech.com ) has restrictions in place for
> > loading JavaClasses from other domains?
> > Any way around this? (my goal is to use twitter4j Java Library (for
> > OAuth) to do some automated tweets to my own account.
>
> --
> Todd Sharp
> Sharp Interactive, LLChttp://slidesix.com-- Multimedia Enabled Presentation Sharing
> IM:  cfsile...@gmail.com

todd sharp

unread,
Jan 24, 2011, 4:08:13 PM1/24/11
to javaloa...@googlegroups.com
Yeah, but as I said - most shared hosts block creation of native java objects and JavaLoader needs that access.

I could be wrong... but I'm pretty sure that is the problem in your case.
http://slidesix.com -- Multimedia Enabled Presentation Sharing
IM:  cfsi...@gmail.com

Leigh

unread,
Jan 24, 2011, 4:38:32 PM1/24/11
to javaloa...@googlegroups.com
>> I could be wrong... but I'm pretty sure that is the problem in your case

If you post the stack trace that might help confirm the cause.



Mark Mandel

unread,
Jan 24, 2011, 4:42:59 PM1/24/11
to javaloa...@googlegroups.com
This could also be the NetworkClassLoader in the server scope somehow got fubar'd.

Wrap the whole call in a try/catch and dump out the catch, and you should get a lot more debugging output.

Mark


On Tue, Jan 25, 2011 at 8:38 AM, Leigh <cfsea...@yahoo.com> wrote:
>> I could be wrong... but I'm pretty sure that is the problem in your case

If you post the stack trace that might help confirm the cause.






--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com

dizid

unread,
Jan 24, 2011, 7:24:01 PM1/24/11
to javaloader-dev
@Leigh,

As i was just reloading my test page to get the stack trace...it
worked.
I didn't get the error and the javaloader works fine now, i am pretty
sure i didnt change my testcode.

Javaloader also loads twitter4j just fine.
Thanks for the answers here, and sorry about my error disappearing
suddenly -shrugs-



On 24 jan, 22:42, Mark Mandel <mark.man...@gmail.com> wrote:
> This could also be the NetworkClassLoader in the server scope somehow got
> fubar'd.
>
> Wrap the whole call in a try/catch and dump out the catch, and you should
> get a lot more debugging output.
>
> Mark
>
> On Tue, Jan 25, 2011 at 8:38 AM, Leigh <cfsearch...@yahoo.com> wrote:
> > >> I could be wrong... but I'm pretty sure that is the problem in your case
>
> > If you post the stack trace that might help confirm the cause.
>
> --
> E: mark.man...@gmail.com

Leigh

unread,
Jan 24, 2011, 7:47:30 PM1/24/11
to javaloa...@googlegroups.com
@dizid,

Eh, Mark may have been right about the instance being fubar'd.

> sorry about my error disappearing suddenly -shrugs-

Better than the other way around I guess. Glad everything is up and running.

-Leigh



Mark Mandel

unread,
Jan 24, 2011, 8:01:46 PM1/24/11
to javaloa...@googlegroups.com
Glad you got it working :)

Mark
--
E: mark....@gmail.com
Reply all
Reply to author
Forward
0 new messages