karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: AW: AW: Manual using scalate now in svn
Date Fri, 22 Oct 2010 08:23:01 GMT
In your case, we need to make sure pax-logging doesn't loads it's classes by itself, but uses
the one provided by the surrounding jetty-war-class loader.


 >> This is correct

Remark : Smx4 can be started when deployed as a WAR file in Jetty/Tomcat 
except that we have a Blueprint error which is not at related to logging 
issue. Even if pax-log does not work in Smx4/Karaf, the log messages are 
redirected to the stdout of the console of jetty/Tomcat but 
servicemix.log stays empty.

On 22/10/10 10:15, Achim Nierbeck wrote:
> Charles,
>
> but isn't it even worse in your case,
> you have a jetty (war-class loader) where the Karaf/Servicemix is running as a war file.
> In this war file you have the pax-logging framework, which isn't working (at least that's
my summary of the other thread :) )
>
> The issue here is, I have Karaf as Runtime with all the class loaders, and I'm deploying
a war file within Karaf. Here we do have a class loader for the war application in which we
are loading the log4j stuff, which might end up with a class cast exception since the same
class was loaded by different class loaders (number one is pax-logging-class loader and second
is the war-class loader)
>
> In your case, we need to make sure pax-logging doesn't loads it's classes by itself,
but uses the one provided by the surrounding jetty-war-class loader.
>
> Please correct me if I did mix something up here :)
>
> Cheers,
> Achim
>
> -----Ursprüngliche Nachricht-----
> Von: Charles Moulliard [mailto:cmoulliard@gmail.com]
> Gesendet: Freitag, 22. Oktober 2010 10:08
> An: dev@karaf.apache.org
> Betreff: Re: AW: Manual using scalate now in svn
>
> Achim,
>
> The question of question is very important and interesting because we
> have the following issue when we launch Jetty Web Server containing the
> WAR file of ServiceMix (= OSGI Server using Apache Felix or Eclipse
> Equinox). In this case, the logging mechanism of ServiceMix relying on
> pax-log does not work because log4j class is loaded twice (first time by
> Jetty and next by pax-log).
>
> Regards,
>
> Charles
>
> On 22/10/10 10:02, Achim Nierbeck wrote:
>> About the patch, I can look into this probably this evening, or later this weekend
:)
>> About the pax-logging with the war I have to see into this, but this sounds like
a good, idea.
>> Even though I'm unsure if the war contains log4j jars how would the application be
able to log out to a file since the initial logging is configured through the pax-logging.
Wouldn't it end up with a class cast exception because of different class loaders? I think
I saw something like this a couple of weeks ago :)
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Guillaume Nodet [mailto:gnodet@gmail.com]
>> Gesendet: Freitag, 22. Oktober 2010 09:58
>> An: dev@karaf.apache.org
>> Betreff: Re: Manual using scalate now in svn
>>
>> Btw, do you think you could provide a patch to update karaf to pax-web trunk
>> ?
>> That would be awesome.
>>
>> On a side note, I wonder if we should add to the war url handler a simple
>> option to import the pax-logging packages automatically (though with a
>> resolution:=optional) to avoid problems if the war include a log4j or slf4j
>> jar for example.  I think this would make deploying wars easier.  Thoughts ?
>>
>> On Fri, Oct 22, 2010 at 09:52, Achim Nierbeck<Achim.Nierbeck@ptv.de>   wrote:
>>
>>> +1 for the documentation, great job!
>>>
>>> One side node from me concerning the war deployer, with the next pax-web
>>> the deployer is contained in the pax-web project :)
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Guillaume Nodet [mailto:gnodet@gmail.com]
>>> Gesendet: Freitag, 22. Oktober 2010 07:40
>>> An: dev@karaf.apache.org
>>> Betreff: Re: Manual using scalate now in svn
>>>
>>> The style is now up to date.
>>>
>>> On Fri, Oct 22, 2010 at 03:37, Freeman Fang<freeman.fang@gmail.com>
>>> wrote:
>>>
>>>> +1
>>>>
>>>> Thanks
>>>> Freeman
>>>>
>>>> On 2010-10-22, at 上午12:09, Guillaume Nodet wrote:
>>>>
>>>>    I think the styling has not been synced yet.  The styling should not
>>> have
>>>>> any red or gray, it's mostly black and blue.
>>>>>
>>>>> On Thu, Oct 21, 2010 at 17:55, Charles Moulliard<cmoulliard@gmail.com
>>>>>> wrote:
>>>>>    Excellent job. I would like to suggest that we use a different color
or
>>>>>> font for the code / console screen. All the text is grey and does
not
>>>>>> allow
>>>>>> to make clear content separation.
>>>>>>
>>>>>>
>>>>>> On 21/10/10 17:45, Guillaume Nodet wrote:
>>>>>>
>>>>>>    I've deployed a snapshot of the karaf manual with the new styling,
so
>>> it
>>>>>>> should be available at in one hour or so (after the mirrors have
been
>>>>>>> updated):
>>>>>>>    http://karaf.apache.org/manual/2.1.99-SNAPSHOT/index.html
>>>>>>>
>>>>>>> Let me know what you think.
>>>>>>>
>>>>>>> On Tue, Oct 19, 2010 at 09:25, Guillaume Nodet<gnodet@gmail.com>
>>>>>>>    wrote:
>>>>>>>
>>>>>>> I've updated the manual to use the same template / css than the
web
>>>>>>> site,
>>>>>>>
>>>>>>>> so that it looks way better now.
>>>>>>>> That makes we think we deseperatly need  a logo for Karaf
...
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Oct 18, 2010 at 10:25, Guillaume Nodet<gnodet@gmail.com>
>>>>>>>>    wrote:
>>>>>>>>
>>>>>>>> I've committed the project i've been working on github so
far in the
>>>>>>>>
>>>>>>>>> main
>>>>>>>>> svn are, in trunk/documentation.
>>>>>>>>> In order to keep that up-to-date with each version, I'd
ask anyone
>>> to
>>>>>>>>> keep
>>>>>>>>> it in sync when you modify / add a new feature in Karaf.
>>>>>>>>> Note that this manual includes an auto-generated section
containing
>>>>>>>>> all
>>>>>>>>> the commands, so we could try to improve the help for
those.
>>>>>>>>> It can be done by adding the following attribute on the
annotation
>>> as
>>>>>>>>> it's
>>>>>>>>> done in the grep command
>>>>>>>>>
>>>>>>>>>    @Command(...., detailedDescription="classpath:grep.txt")
>>>>>>>>>
>>>>>>>>> And then a file in
>>>>>>>>>    org/apache/karaf/shell/commands/grep.txt
>>>>>>>>> The file is loaded from the command class (hence it's
automatically
>>>>>>>>> prefixed by the package name, unless an absolute uri
is used).
>>>>>>>>>
>>>>>>>>> I guess we could try to auto-discover this file too btw.
>>>>>>>>>
>>>>>>>>> The manual is not fully complete and there are still
sections to
>>>>>>>>> review
>>>>>>>>> /
>>>>>>>>> fill, so feel free to have a look at those.
>>>>>>>>>
>>>>>>>>> Also, I'll try to publish a snapshot and have it linked
from the
>>> main
>>>>>>>>> web
>>>>>>>>> site and use it instead of the wiki based manuals, so
that we'll
>>> have
>>>>>>>>> easier
>>>>>>>>> versioning.
>>>>>>>>> But we need to come up with a better design for the web
pages and
>>> add
>>>>>>>>> a
>>>>>>>>> pdf output.  Help welcome!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Cheers,
>>>>>>>>> Guillaume Nodet
>>>>>>>>> ------------------------
>>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>>> ------------------------
>>>>>>>>> Open Source SOA
>>>>>>>>> http://fusesource.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    --
>>>>>>>> Cheers,
>>>>>>>> Guillaume Nodet
>>>>>>>> ------------------------
>>>>>>>> Blog: http://gnodet.blogspot.com/
>>>>>>>> ------------------------
>>>>>>>> Open Source SOA
>>>>>>>> http://fusesource.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>> ------------------------
>>>>> Open Source SOA
>>>>> http://fusesource.com
>>>>>
>>>> --
>>>> Freeman Fang
>>>>
>>>> ------------------------
>>>> blog: http://freemanfang.blogspot.com
>>>> twitter: http://twitter.com/freemanfang
>>>>
>>>> Open Source SOA: http://fusesource.com
>>>> Apache Servicemix:http://servicemix.apache.org
>>>> Apache Cxf: http://cxf.apache.org
>>>> Apache Karaf: http://karaf.apache.org
>>>> Apache Felix: http://felix.apache.org
>>>>
>>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>>
>>

Mime
View raw message