You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2003/01/17 15:22:27 UTC
Struts JUnit tests under IDEA
I'm trying to run the Struts JUnit tests under IDEA. They run fine under
Ant alone, but fail under the IDEA Ant plugin. When I try to run
individual tests, I often see the infamous
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:430)
This also occurs when I try to run any test that uses BeanUtils. (Life
is good until I test code that calls BeanUtils, then "oops".) I
traced it down, and the constructor class is failing in the JVM.
I see Log4J in the IDEA lib folder. Could this be conflicting with the
default LogFactory? Do I need to configure Log4J (somehow) to appease
the Commons Logging API before running the Struts tests within IDEA?
-Ted.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts JUnit tests under IDEA
Posted by John Yu <jo...@scioworks.com>.
I see. <speculation>Sounds like IDEA contains also
common-logging.</speculation>
Not very familiar with the Ant-JUnit task. But I remember JUnit itself has
a special classloader to load to-be-tested classes (so that one can "hot
deploy" and test without restarting JUnit's GUI). Maybe that's the difference?
regards,
--
John
At 12:24 am 20-01-03, you wrote:
>Thanks, John. I tried adding a system property to use the no op log, but
>then it just said that one didn't implement log instead -:( so I still
>can't run some of the BeanUtil-based tests directly.
>
>Meanwhile, I did notice that the BeanUtils Ant-based tests run fine within
>IDEA. The difference seems to be that Struts is using the Ant Junit task
>and BeanUtils is doing it the old fashioned way. So, I may at least have a
>workaround there. Running tests from Ant scripts isn't so bad.
>
>-T.
>
>John Yu wrote:
>>Ted,
>>The infamous classloader problem!
>>It seems IDEA's plugin architecture doesn't create a new "classloader
>>space" for a plugin (like what Tomcat does for each webapp) and IDEA
>>itself is using log4j (and beanutils?). I ran into similar problem with
>>JBuilder and Oracle JDev when I was working on my company's Collage IDE
>>plugins.
>>Configuring common-logging not to use log4j may be a workaround. I
>>dunno... Otherwise, the IDEA Ant plugin needs to be rewritten to create
>>its own loader space.
>>--
>>John
>>
>>At 10:22 pm 17-01-03, you wrote:
>>
>>>I'm trying to run the Struts JUnit tests under IDEA. They run fine under
>>>Ant alone, but fail under the IDEA Ant plugin. When I try to run
>>>individual tests, I often see the infamous
>>>
>>>
>>>Caused by: org.apache.commons.logging.LogConfigurationException: Class
>>>org.apache.commons.logging.impl.Jdk14Logger does not implement Log
>>> at
>>>org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:430)
>>>
>>>
>>>
>>>This also occurs when I try to run any test that uses BeanUtils. (Life
>>>is good until I test code that calls BeanUtils, then "oops".) I
>>>traced it down, and the constructor class is failing in the JVM.
>>>
>>>I see Log4J in the IDEA lib folder. Could this be conflicting with the
>>>default LogFactory? Do I need to configure Log4J (somehow) to appease
>>>the Commons Logging API before running the Struts tests within IDEA?
>>>
>>>-Ted.
>>
>>--
>>John Yu Scioworks Technologies
>>e: john@scioworks.com w: +(65) 873 5989
>>w: http://www.scioworks.com m: +(65) 9782 9610
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts JUnit tests under IDEA
Posted by Ted Husted <hu...@apache.org>.
Thanks, John. I tried adding a system property to use the no op log, but
then it just said that one didn't implement log instead -:( so I still
can't run some of the BeanUtil-based tests directly.
Meanwhile, I did notice that the BeanUtils Ant-based tests run fine
within IDEA. The difference seems to be that Struts is using the Ant
Junit task and BeanUtils is doing it the old fashioned way. So, I may at
least have a workaround there. Running tests from Ant scripts isn't so bad.
-T.
John Yu wrote:
> Ted,
>
> The infamous classloader problem!
>
> It seems IDEA's plugin architecture doesn't create a new "classloader
> space" for a plugin (like what Tomcat does for each webapp) and IDEA
> itself is using log4j (and beanutils?). I ran into similar problem with
> JBuilder and Oracle JDev when I was working on my company's Collage IDE
> plugins.
>
> Configuring common-logging not to use log4j may be a workaround. I
> dunno... Otherwise, the IDEA Ant plugin needs to be rewritten to create
> its own loader space.
> --
> John
>
>
> At 10:22 pm 17-01-03, you wrote:
>
>> I'm trying to run the Struts JUnit tests under IDEA. They run fine under
>> Ant alone, but fail under the IDEA Ant plugin. When I try to run
>> individual tests, I often see the infamous
>>
>>
>> Caused by: org.apache.commons.logging.LogConfigurationException: Class
>> org.apache.commons.logging.impl.Jdk14Logger does not implement Log
>> at
>> org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:430)
>>
>>
>>
>> This also occurs when I try to run any test that uses BeanUtils. (Life
>> is good until I test code that calls BeanUtils, then "oops".) I
>> traced it down, and the constructor class is failing in the JVM.
>>
>> I see Log4J in the IDEA lib folder. Could this be conflicting with the
>> default LogFactory? Do I need to configure Log4J (somehow) to appease
>> the Commons Logging API before running the Struts tests within IDEA?
>>
>> -Ted.
>
>
--
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts JUnit tests under IDEA
Posted by John Yu <jo...@scioworks.com>.
Ted,
The infamous classloader problem!
It seems IDEA's plugin architecture doesn't create a new "classloader
space" for a plugin (like what Tomcat does for each webapp) and IDEA itself
is using log4j (and beanutils?). I ran into similar problem with JBuilder
and Oracle JDev when I was working on my company's Collage IDE plugins.
Configuring common-logging not to use log4j may be a workaround. I dunno...
Otherwise, the IDEA Ant plugin needs to be rewritten to create its own
loader space.
--
John
At 10:22 pm 17-01-03, you wrote:
>I'm trying to run the Struts JUnit tests under IDEA. They run fine under
>Ant alone, but fail under the IDEA Ant plugin. When I try to run
>individual tests, I often see the infamous
>
>
>Caused by: org.apache.commons.logging.LogConfigurationException: Class
>org.apache.commons.logging.impl.Jdk14Logger does not implement Log
> at
>org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:430)
>
>
>This also occurs when I try to run any test that uses BeanUtils. (Life is
>good until I test code that calls BeanUtils, then "oops".) I
>traced it down, and the constructor class is failing in the JVM.
>
>I see Log4J in the IDEA lib folder. Could this be conflicting with the
>default LogFactory? Do I need to configure Log4J (somehow) to appease the
>Commons Logging API before running the Struts tests within IDEA?
>
>-Ted.
--
John Yu Scioworks Technologies
e: john@scioworks.com w: +(65) 873 5989
w: http://www.scioworks.com m: +(65) 9782 9610
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>