Re: Apache Karaf WAR + JSF

2011-02-11 Thread Guillaume Nodet
Also, make sure the jsf-api isn't deployed as an OSGi bundle, else
that one could be used and it would not be able to find the
implementation inside the jar.

On Fri, Feb 11, 2011 at 09:22, Charles Moulliard cmoulli...@gmail.com wrote:
 The WAR contains the spec and the implementation.

 aristo-1.0.0.jar
 barbecue-1.5-beta1.jar
 bcmail-jdk14-1.38.jar
 bcmail-jdk14-138.jar
 bcprov-jdk14-1.38.jar
 bcprov-jdk14-138.jar
 bctsp-jdk14-1.38.jar
 black-tie-1.0.0.jar
 blitzer-1.0.0.jar
 bluesky-1.0.0.jar
 casablanca-1.0.0.jar
 commons-fileupload-1.2.1.jar
 commons-io-1.4.jar
 commons-logging-1.1.1.jar
 cupertino-1.0.0.jar
 dark-hive-1.0.0.jar
 dot-luv-1.0.0.jar
 eggplant-1.0.0.jar
 excite-bike-1.0.0.jar
 facestrace-1.1.0.jar
 flick-1.0.0.jar
 hot-sneaks-1.0.0.jar
 humanity-1.0.0.jar
 itext-2.1.7.jar
 jcommon-1.0.0.jar
 jdom-1.0.jar
 jfreechart-1.0.0.jar

 --
 jsf-api-2.0.4-b09.jar
 jsf-impl-2.0.4-b09.jar
 --

 jstl-1.2.jar
 junit-3.8.jar
 le-frog-1.0.0.jar
 log4j-1.2.13.jar
 midnight-1.0.0.jar
 mint-choc-1.0.0.jar
 overcast-1.0.0.jar
 pepper-grinder-1.0.0.jar
 poi-3.2-FINAL.jar
 primefaces-3.0-SNAPSHOT.jar
 redmond-1.0.0.jar
 rocket-1.0.0.jar
 rome-1.0.jar
 smoothness-1.0.0.jar
 south-street-1.0.0.jar
 start-1.0.0.jar
 sunny-1.0.0.jar
 swanky-purse-1.0.0.jar
 trontastic-1.0.0.jar
 ui-darkness-1.0.0.jar
 ui-lightness-1.0.0.jar
 vader-1.0.0.jar


 On Fri, Feb 11, 2011 at 5:06 AM, David Jencks david_jen...@yahoo.com wrote:
 You need both the api jar and the implementation in your war.  Which jsf 
 implementation?

 You might consider trying myfaces-bundle deployed outside your web app 
 (removing jsf jars from the web app). This works find in geronimo but I'm 
 not sure at the moment if we do extra initialization to get around this 
 problem.


 thanks
 david jencks


 On Feb 10, 2011, at 5:33 AM, Charles Moulliard wrote:

 Hi,

 I have deployed a WAR project on Karaf which is JSF technology based
 but get this issue :

 14:05:19,408 | WARN  | FelixStartLevel  | war
    | .eclipse.jetty.util.log.Slf4jLog   50 | 1834 -
 org.eclipse.jetty.util - 7.2.2.v20101205 | unavailable
 java.lang.IllegalStateException: Application was not properly
 initialized at startup, could not find Factory:
 javax.faces.context.FacesContextFactory
       at 
 javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
       at 
 javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
       at 
 javax.faces.webapp.FacesServlet.init(FacesServlet.java:166)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
       at 
 org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205]
       at 
 org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205]
       at 
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)[1834:org.eclipse.jetty.util:7.2.2.v20101205]

 The lib directory of the WAR contains well the jar of jsf api --
 jsf-api-2.0.4-b09

 Remark : the same WAR deployed on Tomcat works fine

 Is it something that you already experienced ?

 Regards,

 Charles Moulliard

 Sr. Principal Solution Architect - FuseSource
 Apache Committer

 Blog : http://cmoulliard.blogspot.com
 Twitter : http://twitter.com/cmoulliard
 Linkedin : http://www.linkedin.com/in/charlesmoulliard
 Skype: cmoulliard






-- 
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/

Open Source SOA
http://fusesource.com


Re: Apache Karaf WAR + JSF

2011-02-11 Thread Jean-Baptiste Onofré

Could you make:

la|grep -i jsf

to see if JSF api and implementation are not outside your bundle.
Else you have to use fragment to gather all in the same classloader.

Regards
JB

On 02/11/2011 09:22 AM, Charles Moulliard wrote:

The WAR contains the spec and the implementation.

aristo-1.0.0.jar
barbecue-1.5-beta1.jar
bcmail-jdk14-1.38.jar
bcmail-jdk14-138.jar
bcprov-jdk14-1.38.jar
bcprov-jdk14-138.jar
bctsp-jdk14-1.38.jar
black-tie-1.0.0.jar
blitzer-1.0.0.jar
bluesky-1.0.0.jar
casablanca-1.0.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.4.jar
commons-logging-1.1.1.jar
cupertino-1.0.0.jar
dark-hive-1.0.0.jar
dot-luv-1.0.0.jar
eggplant-1.0.0.jar
excite-bike-1.0.0.jar
facestrace-1.1.0.jar
flick-1.0.0.jar
hot-sneaks-1.0.0.jar
humanity-1.0.0.jar
itext-2.1.7.jar
jcommon-1.0.0.jar
jdom-1.0.jar
jfreechart-1.0.0.jar

--
jsf-api-2.0.4-b09.jar
jsf-impl-2.0.4-b09.jar
--

jstl-1.2.jar
junit-3.8.jar
le-frog-1.0.0.jar
log4j-1.2.13.jar
midnight-1.0.0.jar
mint-choc-1.0.0.jar
overcast-1.0.0.jar
pepper-grinder-1.0.0.jar
poi-3.2-FINAL.jar
primefaces-3.0-SNAPSHOT.jar
redmond-1.0.0.jar
rocket-1.0.0.jar
rome-1.0.jar
smoothness-1.0.0.jar
south-street-1.0.0.jar
start-1.0.0.jar
sunny-1.0.0.jar
swanky-purse-1.0.0.jar
trontastic-1.0.0.jar
ui-darkness-1.0.0.jar
ui-lightness-1.0.0.jar
vader-1.0.0.jar


On Fri, Feb 11, 2011 at 5:06 AM, David Jencksdavid_jen...@yahoo.com  wrote:

You need both the api jar and the implementation in your war.  Which jsf 
implementation?

You might consider trying myfaces-bundle deployed outside your web app 
(removing jsf jars from the web app). This works find in geronimo but I'm not 
sure at the moment if we do extra initialization to get around this problem.


thanks
david jencks


On Feb 10, 2011, at 5:33 AM, Charles Moulliard wrote:


Hi,

I have deployed a WAR project on Karaf which is JSF technology based
but get this issue :

14:05:19,408 | WARN  | FelixStartLevel  | war
| .eclipse.jetty.util.log.Slf4jLog   50 | 1834 -
org.eclipse.jetty.util - 7.2.2.v20101205 | unavailable
java.lang.IllegalStateException: Application was not properly
initialized at startup, could not find Factory:
javax.faces.context.FacesContextFactory
   at 
javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
   at 
javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
   at 
javax.faces.webapp.FacesServlet.init(FacesServlet.java:166)[1957:file__Users_charlesmoulliard_Apache_karaf_assembly_target_apache-karaf-2.1.99-SNAPSHOT_deploy_prime-showcase-1.0.0-SNAPSHOT.war:0]
   at 
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205]
   at 
org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205]
   at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)[1834:org.eclipse.jetty.util:7.2.2.v20101205]

The lib directory of the WAR contains well the jar of jsf api --
jsf-api-2.0.4-b09

Remark : the same WAR deployed on Tomcat works fine

Is it something that you already experienced ?

Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard





RE: newbie question: hibernate-core bundle (with deps)

2011-02-11 Thread Marco Firrincieli
Oh well... a good thing is that no one will use hibernate to actually 
persist anything here.
It's JUST that this legacy thing has a few classes that I need to use (Address, 
Country...) that actually implement some Hibernate interfaces (or extend some 
Hibernate classes) -do not ask me why :)

So I need to have those objects here (therefore I need some hibernate jar) but 
they won't actually be used for any ORM purposes.

So if you say that those do not work as in you might have trouble when 
persisting/reading from DB, I'm quite happy I won't actually use that.

-m

Ps: by the by, I'm kind of using it right now. It was just a hassle to have to 
go find all it's deps (dom4j, javassist and so on...). 
could I somehow have done it by just adding spring ebr repo in karaf (some sort 
of addurl trick)?


-Original Message-
From: Achim Nierbeck [mailto:bcanh...@googlemail.com] 
Sent: venerdì 11 febbraio 2011 12:42
To: user@karaf.apache.org; Marco Firrincieli
Subject: Re: newbie question: hibernate-core bundle (with deps)

Hi Marco,

to be honest, from what I experienced the spring-hibernate jars don't
really work :(

what I have done before is to wrap up a bundle containing all the
required hibernate jars and exporting all needed classes.

The DAO-Classes needed a special handling. We did a aop wrapping
around setting the Thread.contextClassloader to the bundle
classloader. With that it did run more smoothly :)
I think there is a blog of Peter Kriens about this.

Another thing would be to use OpenJPA as provider, that should work
out better :)

Regards, Achim

2011/2/11 Marco Firrincieli marco.firrinci...@lbigroup.it:
 Hi all,

 i've only started now working on making a legacy application deployable on 
 karaf.
 Right now I'm fighting de-coupling a few things, and I've come to find a 
 strong dependency with hibernate.

 Googling around couldn't really come up with the correct way to do, so 
 that's why I'm asking.

 I found out that spring sort or releases the bundle for hibernate 
 (com.springsource.org.hibernate) but when I deploy it on karaf, it still says 
 I miss so many other stuff.

 Any easy way to have it all without looking for every little dependencies 
 here and there?

 Thanks

 -m




Re: Deploying a WebService on Karaf

2011-02-11 Thread Adrian Trenaman

Hi Manuel,

I did a webinar on deploying web services with CXF into ServiceMix 
(which of course, is using Karaf as it's core). You can get access to 
the archived webinar at:


http://fusesource.com/resources/video-archived-webinars/

Some sample code should be up there as well.

Best,
Ade

http://fusesource.com

On 11/02/2011 12:03, Manuel Bernhardt wrote:

Hi all,

a colleague of mine is looking at a way to deploy a legacy webservice
of which he can't touch the code on Karaf.

I looked around and found an old thread with a post from Guillaume:

http://www.mail-archive.com/general@lists.ops4j.org/msg05523.html

which points to an example using ServiceMix.


Before digging further I'd like to ask a few questions here:

1) (you never know) is there maybe an example of this (i.e. exposing a
webservice with cxf on karaf) somewhere? I haven't found one so far.

2) if there is no example, would the following work:
   - deploy the cxf bundles on Karaf (maybe there's a feature
descriptor for this somewhere?)
   - declare the WS endpoint in the blueprint configuration - that is I
have only found instances of this being done in the old spring-dm
descriptor, but I suppose using the CXF namespace in blueprint should
somehow do the trick?

One more thing: after more googling specifically for the history of
Karaf I found a helpful blog entry
(http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
which explains the link ServiceMix -  Karaf. That is, the ServiceMix
Kernel website says nothing about it, and a lot of things (forum
entries, ML archives, ...) still point to it which makes it all very
confusing.
Would it be possible to place a big red bar (or whatever else warning
sign) on the ServiceMix Kernel page redirecting to Karaf?

Thanks!

Manuel


Re: Deploying a WebService on Karaf

2011-02-11 Thread Achim Nierbeck
that would be fine, too.
As long as someone does this, since searching together all those
dependencies is
just a tedious task :)

2011/2/11 Guillaume Nodet gno...@gmail.com:
 Shouldn't we put that in CXF ? Over time, I think it would be better
 if that can be maintained inside CXF rather than Karaf.

 On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck bcanh...@googlemail.com wrote:
 +1 for an enterprise CXF feature.

 This way it is also much easier to connect two Karaf instances via
 DOSGi (CXF) :)



 2011/2/11  j...@nanthrax.net:
 Hi Manuel,

 The easiest way is indeed to use CXF.
 Currently, CXF feature is part of ServiceMix4 but it could make sense to 
 add it in the Karaf Enterprise features.

 Let see the feeling of the team ;)

 Regards
 JB
 -Original Message-
 From: Manuel Bernhardt bernhardt.man...@gmail.com
 Date: Fri, 11 Feb 2011 13:03:39
 To: user@karaf.apache.org
 Reply-To: user@karaf.apache.org
 Subject: Deploying a WebService on Karaf

 Hi all,

 a colleague of mine is looking at a way to deploy a legacy webservice
 of which he can't touch the code on Karaf.

 I looked around and found an old thread with a post from Guillaume:

 http://www.mail-archive.com/general@lists.ops4j.org/msg05523.html

 which points to an example using ServiceMix.


 Before digging further I'd like to ask a few questions here:

 1) (you never know) is there maybe an example of this (i.e. exposing a
 webservice with cxf on karaf) somewhere? I haven't found one so far.

 2) if there is no example, would the following work:
   - deploy the cxf bundles on Karaf (maybe there's a feature
 descriptor for this somewhere?)
   - declare the WS endpoint in the blueprint configuration - that is I
 have only found instances of this being done in the old spring-dm
 descriptor, but I suppose using the CXF namespace in blueprint should
 somehow do the trick?

 One more thing: after more googling specifically for the history of
 Karaf I found a helpful blog entry
 (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
 which explains the link ServiceMix - Karaf. That is, the ServiceMix
 Kernel website says nothing about it, and a lot of things (forum
 entries, ML archives, ...) still point to it which makes it all very
 confusing.
 Would it be possible to place a big red bar (or whatever else warning
 sign) on the ServiceMix Kernel page redirecting to Karaf?

 Thanks!

 Manuel





 --
 Cheers,
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 Open Source SOA
 http://fusesource.com



Re: Deploying a WebService on Karaf

2011-02-11 Thread Andreas Pieber
I think we should prefer this for all features currently in the enterprise
features file

kind regards,
andreas

On Fri, Feb 11, 2011 at 01:19:09PM +0100, Guillaume Nodet wrote:
 Shouldn't we put that in CXF ? Over time, I think it would be better
 if that can be maintained inside CXF rather than Karaf.
 
 On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck bcanh...@googlemail.com wrote:
  +1 for an enterprise CXF feature.
 
  This way it is also much easier to connect two Karaf instances via
  DOSGi (CXF) :)
 
 
 
  2011/2/11  j...@nanthrax.net:
  Hi Manuel,
 
  The easiest way is indeed to use CXF.
  Currently, CXF feature is part of ServiceMix4 but it could make sense to 
  add it in the Karaf Enterprise features.
 
  Let see the feeling of the team ;)
 
  Regards
  JB
  -Original Message-
  From: Manuel Bernhardt bernhardt.man...@gmail.com
  Date: Fri, 11 Feb 2011 13:03:39
  To: user@karaf.apache.org
  Reply-To: user@karaf.apache.org
  Subject: Deploying a WebService on Karaf
 
  Hi all,
 
  a colleague of mine is looking at a way to deploy a legacy webservice
  of which he can't touch the code on Karaf.
 
  I looked around and found an old thread with a post from Guillaume:
 
  http://www.mail-archive.com/general@lists.ops4j.org/msg05523.html
 
  which points to an example using ServiceMix.
 
 
  Before digging further I'd like to ask a few questions here:
 
  1) (you never know) is there maybe an example of this (i.e. exposing a
  webservice with cxf on karaf) somewhere? I haven't found one so far.
 
  2) if there is no example, would the following work:
    - deploy the cxf bundles on Karaf (maybe there's a feature
  descriptor for this somewhere?)
    - declare the WS endpoint in the blueprint configuration - that is I
  have only found instances of this being done in the old spring-dm
  descriptor, but I suppose using the CXF namespace in blueprint should
  somehow do the trick?
 
  One more thing: after more googling specifically for the history of
  Karaf I found a helpful blog entry
  (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
  which explains the link ServiceMix - Karaf. That is, the ServiceMix
  Kernel website says nothing about it, and a lot of things (forum
  entries, ML archives, ...) still point to it which makes it all very
  confusing.
  Would it be possible to place a big red bar (or whatever else warning
  sign) on the ServiceMix Kernel page redirecting to Karaf?
 
  Thanks!
 
  Manuel
 
 
 
 
 
 -- 
 Cheers,
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 Open Source SOA
 http://fusesource.com


pgpretkzYQu9y.pgp
Description: PGP signature


Re: Deploying a WebService on Karaf

2011-02-11 Thread Achim Nierbeck
One more thing though, since I'm searching for it :)

These Projects like Camel, CXF, Aries and so forth need to place the
URL to the features.xml file
more prominently to show the support and help finding them easier.

As long as it isn't done in another way :)

2011/2/11 Andreas Pieber anpie...@gmail.com:
 I think we should prefer this for all features currently in the enterprise
 features file

 kind regards,
 andreas

 On Fri, Feb 11, 2011 at 01:19:09PM +0100, Guillaume Nodet wrote:
 Shouldn't we put that in CXF ? Over time, I think it would be better
 if that can be maintained inside CXF rather than Karaf.

 On Fri, Feb 11, 2011 at 13:11, Achim Nierbeck bcanh...@googlemail.com 
 wrote:
  +1 for an enterprise CXF feature.
 
  This way it is also much easier to connect two Karaf instances via
  DOSGi (CXF) :)
 
 
 
  2011/2/11  j...@nanthrax.net:
  Hi Manuel,
 
  The easiest way is indeed to use CXF.
  Currently, CXF feature is part of ServiceMix4 but it could make sense to 
  add it in the Karaf Enterprise features.
 
  Let see the feeling of the team ;)
 
  Regards
  JB
  -Original Message-
  From: Manuel Bernhardt bernhardt.man...@gmail.com
  Date: Fri, 11 Feb 2011 13:03:39
  To: user@karaf.apache.org
  Reply-To: user@karaf.apache.org
  Subject: Deploying a WebService on Karaf
 
  Hi all,
 
  a colleague of mine is looking at a way to deploy a legacy webservice
  of which he can't touch the code on Karaf.
 
  I looked around and found an old thread with a post from Guillaume:
 
  http://www.mail-archive.com/general@lists.ops4j.org/msg05523.html
 
  which points to an example using ServiceMix.
 
 
  Before digging further I'd like to ask a few questions here:
 
  1) (you never know) is there maybe an example of this (i.e. exposing a
  webservice with cxf on karaf) somewhere? I haven't found one so far.
 
  2) if there is no example, would the following work:
    - deploy the cxf bundles on Karaf (maybe there's a feature
  descriptor for this somewhere?)
    - declare the WS endpoint in the blueprint configuration - that is I
  have only found instances of this being done in the old spring-dm
  descriptor, but I suppose using the CXF namespace in blueprint should
  somehow do the trick?
 
  One more thing: after more googling specifically for the history of
  Karaf I found a helpful blog entry
  (http://icodebythesea.blogspot.com/2011/01/brief-history-of-apache-karaf.html)
  which explains the link ServiceMix - Karaf. That is, the ServiceMix
  Kernel website says nothing about it, and a lot of things (forum
  entries, ML archives, ...) still point to it which makes it all very
  confusing.
  Would it be possible to place a big red bar (or whatever else warning
  sign) on the ServiceMix Kernel page redirecting to Karaf?
 
  Thanks!
 
  Manuel
 
 



 --
 Cheers,
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 Open Source SOA
 http://fusesource.com