Fair enough, I'll give it a shot. Would I need to reinitiate the older 
version of log4j at the end of the process or does the CF server itself 
ignore classes loaded at runtime? 




-----Original Message-----
From: "Mark Mandel" <[EMAIL PROTECTED]>
To: cfaussie@googlegroups.com
Date: Thu, 30 Nov 2006 10:01:07 +1100
Subject: [cfaussie] Re: java classpaths etc etc

> 
> Why not -
> 
> Have you newer version of log4j.jar sitting where you want it, and then
> go -
> 
> paths = ArrayNew(1);
> paths[1] = expandPath("log4j.jar") //newest version
> paths[2] = expandPath("my3rdPartyAPI.jar") //your api
> 
> jl = createObject("component", "JavaLoader").init(paths);
> 
> myAPI = jl.create("my3rdPartyAPIClass");
> //this will load the newer log4j, as the class loading will look to
> the loader first.
> 
> Does that make more sense?
> 
> Mark
> 
> On 11/30/06, skateboard.com.au <[EMAIL PROTECTED]> wrote:
> >
> > Hi Mark
> >
> > Thanks for you advice. I can't see how your approach will work in my
> > case though. I have to use a jar that uses a different version of
> log4j
> > that cf uses. I do not have access to modify the package name it
> calls.
> >
> > cheers
> >
> > Drew
> >
> >
> > -----Original Message-----
> > From: "Mark Mandel" <[EMAIL PROTECTED]>
> > To: cfaussie@googlegroups.com
> > Date: Thu, 30 Nov 2006 09:33:44 +1100
> > Subject: [cfaussie] Re: java classpaths etc etc
> >
> > >
> > > Andrea -
> > >
> > > That's alot of work! Wow!
> > >
> > > I'm guessing then that whatever he is also using with log4j he's
> going
> > > to have to refactor as well. Ouch!
> > >
> > > Using an external classloader is a much easier solution, I think
> > > you'll find. You may want to look into it.
> > >
> > > Mark
> > >
> > > On 11/30/06, Andrea <[EMAIL PROTECTED]> wrote:
> > > >
> > > > First of all I believe that if you are using a jar file, surely
> you
> > > > must have the source code....
> > > >
> > > > Can you get the source code of the log4j version you need (yes)?
> then
> > > > modify the structure (eg com.mycompany.log.log4j) refactor and
> > > > recompile, make a jar, upload and use that in your java files
> > > whenever
> > > > you call the log4j....
> > > >
> > > > that will work for sure... already done to override the pdf
> libraries
> > > > of CF7
> > > >
> > > > Ciao
> > > > Andrea
> > > >
> > > >
> > > >
> > > >
> > > > skateboard.com.au wrote:
> > > > > Hey Mark
> > > > >
> > > > > Thanks, I'll give that a read and see how I go.
> > > > >
> > > > > cheers
> > > > >
> > > > > Drew
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: "Mark Mandel" <[EMAIL PROTECTED]>
> > > > > To: cfaussie@googlegroups.com
> > > > > Date: Wed, 29 Nov 2006 16:12:10 +1100
> > > > > Subject: [cfaussie] Re: java classpaths etc etc
> > > > >
> > > > > >
> > > > > > Drew,
> > > > > >
> > > > > > I'd load it all up with JavaLoader
> > > > > > http://www.compoundtheory.com/?action=javaloader.index
> > > > > >
> > > > > > with the latest log4j in it.
> > > > > >
> > > > > > I've done it with Hibernate, and it works a charm.
> > > > > >
> > > > > > You probably don't want to replace the log4j in CF with the
> > > newest
> > > > > > one, as I know it can cause all sorts of issues.
> > > > > >
> > > > > > This should hopefully solve your problem.
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Mark
> > > > > >
> > > > > > On 11/29/06, skateboard.com.au <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Hi Guys
> > > > > > >
> > > > > > > I have a jar file that I am calling via cf. The package
> throws
> > > an
> > > > > > error
> > > > > > > because it requires a newer version of log4j than what CF
> uses.
> > > CF
> > > > > > won't
> > > > > > > run on the newer version. Is there some way I can define a
> > > classpath
> > > > > > > specific to the process I am trying to run rather than to
> the
> > > whole
> > > > > > CF
> > > > > > > instance? Or am I going about this all wrong??
> > > > > > >
> > > > > > > thanks in advance
> > > > > > >
> > > > > > > Drew Peacock
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > E: [EMAIL PROTECTED]
> > > > > > W: www.compoundtheory.com
> > > > > >
> > > > > > >
> > > >
> > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > E: [EMAIL PROTECTED]
> > > W: www.compoundtheory.com
> > >
> > > >
> >
> >
> >
> > >
> >
> 
> 
> -- 
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> 
> > 



--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to