Hello

Just trying to help you with the problem :

The test case is run within Eclipse. The web service is run on JBoss.

The stack trace shows that the junit runs HttpClient class that looks for
LogFactory class. As per the stacktrace, the commons logging jar should be
included in the Eclipse build path. This should be done in the Eclipse -->
Project --> Properties --> Java Build Path

Does this work ?

Thanks & regards
Tejas

-----Original Message-----
From: Simon Kitching [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 22, 2006 4:44 PM
To: Jakarta Commons Users List
Subject: Re: Really stuck on
NoClassDefFoundErrororg/apache/commons/logging/LogFactory


Hi Robert,

On Wed, 2006-06-21 at 19:40 -0300, robert lazarski wrote:
> Hi all,
>
> I've been googling all day and I'm stuck. I'm trying to run a junit
> test case in eclipse 3.1 calling an axis2 web service running in
> jboss, that depends on HttpClient. I get this stack trace:
>
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
>       at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
[snip]
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:478)
>       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:344)
>       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)
>
> I'm running 1.04, but tried to upgrade to 1.1 with no luck. I tried
> butting the commons.logging jar under jdk1.5.0_03/jre/lib/ext - no
> luck. I tried this, still no luck:
>
>     protected void setUp() throws Exception {
>
Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoade
r());
>     }
>
> I'm out of ideas. Any help very much appreciated. I just need this
> junit test case to run in eclipse.

This kind of problem is what the recent logging-1.1 release was aimed at
dealing with.

JBoss does some odd things with commons-logging. Junit and eclipse also
do some odd stuff with classpaths. As a result, things can indeed get
quite confusing. I suspect that the 1.1 release will solve the problem
if you can just find the right place to deploy it.

If you set system property
  org.apache.commons.logging.diagnostics.dest=STDOUT
then logging 1.1 will generate output to stdout. If you don't get any
output, then you have probably not found the right place to deploy the
jarfile.

Sorry I can't be more specific than that, but it's a complicated
scenario you've got.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_____________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to