You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Amir D. Kolsky" <am...@kolsky.com> on 2002/05/01 22:43:20 UTC

Build Warning for HttpClient

encode(String) has been deprecated in favor of encode(String,String)...
can we fix this warning?

    [javac] Compiling 40 source files to V:\Apache\jakarta-commons\httpclient\target\classes
    [javac] V:\Apache\jakarta-commons\httpclient\src\java\org\apache\commons\httpclient\methods\GetMethod.java:368: warning: encode(java.lang.String) in java.net.URLEncoder has been deprecated
    [javac]                     String encodedPath = URLEncoder.encode(getPath());
    [javac]                                                    ^
    [javac] 1 warning

-----Original Message-----
From: Steve Cohen [mailto:SteveC@ignitesports.com]
Sent: Wed, May 01, 2002 11:34 PM
To: Jakarta Commons Developers List
Subject: RE: Commons logging question


Thanks.
  
I got this problem by trying to run in a servlet under JRun 3.0.  In that environment, I found that you have to put commons-logging.jar and the log4j jar into the JRun server's lib directory, not the web app's lib.  That solved that for me.  Whether that would be remedied by your fix, I'll leave for others to decide.  Class loading gives me a headache.


-----Original Message-----
From: Juozas Baliuka [mailto:baliuka@centras.lt]
Sent: Wednesday, May 01, 2002 3:29 PM
To: Jakarta Commons Developers List
Subject: Re: Commons logging question


Hi,
This is the same problem as in "ClassCastException raised in newFactory()
method when starting from JUnit test"
Log factory must have "getLog(Class clasz, ClassLoader loader)" it is
useless without this
method.
----- Original Message -----
From: "Steve Cohen" <St...@ignitesports.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, May 01, 2002 6:48 PM
Subject: Commons logging question


Here are two newbie questions:
I am trying to implement a new system using Commons logging wrapped around
log4j.

1. I get this exception which puzzles me:

java.lang.ClassNotFoundException:
org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassNotFoundException:
org.apache.commons.logging.impl.LogFactoryImpl
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:400)

If the system is finding org.apache.commons.logging.LogFactory, why can't it
find org.apache.commons.logging.impl.LogFactoryImpl?  They're in the same
jar which I've simply downloaded from the site.

2. Though puzzled by #1, even if I wasn't getting that exception, something
would be wrong, since I thought I had set up to not use the default
mechanism.  It should have found log4j first.  I used the second method
described in the docs under
"Choosing A LogFactory Implementation".  Evidently I've done something
wrong.  The file

META-INF/services/org.apache.commons.logging.LogFactory
exists and contains the line
org.apache.commons.logging.impl.Log4jFactory

This seems like it ought to work but doesn't.

The documentation doesn't say which JAR this belongs in.  I assumed it meant
the war file for my application.  Is this wrong?

-----------------------------------------------------------------
Steve Cohen
Sr. Software Engineer
Ignite Sports, Inc.
stevec@ignitesports.com






--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>