I just tested with Eclipse + ClickIDE and receive the same error when
using the J2EE preview version.

I get this stacktrace:
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 26 more


Seems that the J2EE preview (Jetty) uses a different version of log4j.

Anybody knows how to resolve this?

Personally I'd just use Tomcat instead of the J2EE preview server:
http://tomcat.apache.org/download-60.cgi

One other thing, you need to setup a Cayenne project before running
your application as described at the bottom
of this page: http://incubator.apache.org/click/docs/click-ide.html

Use the Cayenne modeler to setup your tables and domain classes.

kind regards

bob


On Thu, Feb 5, 2009 at 11:29 AM, Daniel Guryca <[email protected]> wrote:
> I gave it a second try:
>
> Creating pure project (no Cayenne) via ClickIDE is WORKING and RUNNING.
>
> Creating cayenne enabled project ClickIDE and then running via Preview
> Server does not run :-(
> I'm still getting these exceptions about log4j:
>
> [Click] [info ] initialized in development mode
> org.mortbay.util.MultiException[org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException: No suitable Log
> constructor [Ljava.lang.Class;@149b290 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
> org.apache.commons.logging.LogConfigurationException: No suitable Log
> constructor [Ljava.lang.Class;@149b290 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category))]
>
> commons-logging-1.0.4.jar
> log4j-1.2.14.jar
>
> are included in WebContent\WEB-INF\lib
>
> Any suggestions ?
>
> Thank you.
> Daniel
>
>
>
>
>
> On Wed, Feb 4, 2009 at 9:51 PM, Bob Schellink <[email protected]> wrote:
>> Hi Daniel,
>>
>> Daniel Guryca wrote:
>>
>>> I have just fully installed Eclipse 4.4 + wtp + ClickIDE.
>>> I created my project according to a tutorial.
>>
>>
>> Which tutorial were you working from?
>>
>>
>>> Later I tried J2EE Preview server which is presented in Eclipse.
>>>
>>> I'm getting error like this:
>>> org.apache.commons.logging.LogConfigurationException:
>>> No suitable Log constructor [Ljava.lang.Class;@8c4a77 for
>>> org.apache.commons.logging.impl.Log4JLogger (Caused by
>>> java.lang.NoClassDefFoundError: org/apache/log4j/Category)
>>
>>
>> For some reason your application is looking for the log4j framework. Not
>> sure why because Click does not depend on it. Perhaps you are using Cayenne
>> which depends on both commons-logging and log4j?
>>
>> Anyway to resolve the error above you need to include log4j library on your
>> classpath.
>>
>> If you are familiar with Eclipse ignore the rest of this mail, otherwise:
>>
>> Download log4j from http://logging.apache.org/log4j/1.2/download.html and
>> place the log4j-x.x.x.jar under your project folder WebContent\WEB-INF\lib
>>
>> Eclipse should pickup the new library automatically. If it does not simply
>> refresh your project (F5).
>>
>> Let us know how it goes.
>>
>> kind regards
>>
>> bob
>>
>>
>>
>



-- 
http://incubator.apache.org/click/

Reply via email to