Hi Achim,

In your example, you do not import javax.faces but use requires bundles

Bundle-ClassPath =
.,WEB-INF/classes,WEB-INF/classes/META-INF/myfaces_core.tld,WEB-INF/classes/META-INF/myfaces_html.tld

Import-Package =
        javax.servlet;version=2.5.0,
        javax.servlet.http;version=2.5.0,
        javax.servlet.resources;version=2.1.0,
        javax.servlet.jsp;version=2.1.0,
        javax.servlet.jsp.jstl.core;version=1.1.2,
        javax.servlet.jsp.jstl.fmt;version=1.1.2,
        javax.servlet.jsp.jstl.tlv;version=1.1.2,
        org.apache.taglibs.standard.resources;version=1.1.2,
        org.apache.taglibs.standard.tag.common.core;version=1.1.2,
        org.apache.taglibs.standard.tag.rt.core;version=1.1.2,
        org.apache.taglibs.standard.tei;version=1.1.2,
        org.apache.taglibs.standard.tlv;version=1.1.2
Require-Bundle =
        org.apache.myfaces.core.api,
        org.apache.myfaces.core.impl

Why don't you import javax.faces classes ?

Here is the MANIFEST file generated for my example

prime-showcase (1979)
---------------------
Archiver-Version = Plexus Archiver
Tool = Bnd-0.0.313
Hudson-Project = Examples - Showcase
Implementation-Version = 1.0.0-SNAPSHOT
Build-Jdk = 1.6.0_13
Generated-By-Ops4j-Pax-From =
wrap:jardir:/Users/charlesmoulliard/Apache/karaf/assembly/target/apache-karaf-2.1.99-SNAPSHOT/deploy/prime-showcase$Bundle-SymbolicName=prime-showcase&Bundle-Version=0.0.0
Created-By = 1.6.0_22 (Apple Inc.)
Implementation-Title = prime-showcase
Manifest-Version = 1.0
Bnd-LastModified = 1297674544776
Originally-Created-By = Apache Maven
Hudson-Version = 1.336
Built-By = tomcat6
Extension-Name = prime-showcase
Hudson-Build-Number = 248

Bundle-Name = prime-showcase
Bundle-SymbolicName = prime-showcase
Bundle-Version = 0.0.0
Bundle-ManifestVersion = 2

Private-Package =
        .
Import-Package =
        WEB-INF;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples.domain;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples.filter;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples.service;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples.touch;resolution:=optional,
        WEB-INF.classes.org.primefaces.examples.view;resolution:=optional,
        WEB-INF.lib;resolution:=optional,
        com.lowagie.text;resolution:=optional,
        com.sun.syndication.feed.synd;resolution:=optional,
        com.sun.syndication.io;resolution:=optional,
        css;resolution:=optional,
        design;resolution:=optional,
        facestrace;resolution:=optional,
        images;resolution:=optional,
        images.antalya;resolution:=optional,
        images.barca;resolution:=optional,
        images.cars;resolution:=optional,
        images.dock;resolution:=optional,
        images.folders;resolution:=optional,
        images.galleria;resolution:=optional,
        images.godfather;resolution:=optional,
        images.layout;resolution:=optional,
        images.macosx;resolution:=optional,
        images.picklist;resolution:=optional,
        images.stack;resolution:=optional,
        images.touch;resolution:=optional,
        javax.annotation;resolution:=optional,
        javax.faces.application;resolution:=optional,
        javax.faces.component;resolution:=optional,
        javax.faces.context;resolution:=optional,
        javax.faces.convert;resolution:=optional,
        javax.faces.event;resolution:=optional,
        javax.faces.model;resolution:=optional,
        javax.imageio.stream;resolution:=optional,
        javax.servlet;resolution:=optional,
        net.sourceforge.barbecue;resolution:=optional,
        org.apache.poi.hssf.usermodel;resolution:=optional,
        org.jfree.chart;resolution:=optional,
        org.jfree.data.general;resolution:=optional,
        org.primefaces.comet;resolution:=optional,
        org.primefaces.component.chart.series;resolution:=optional,
        org.primefaces.component.menuitem;resolution:=optional,
        org.primefaces.component.submenu;resolution:=optional,
        org.primefaces.component.tabview;resolution:=optional,
        org.primefaces.context;resolution:=optional,
        org.primefaces.event;resolution:=optional,
        org.primefaces.event.map;resolution:=optional,
        org.primefaces.examples.domain;resolution:=optional,
        org.primefaces.examples.filter;resolution:=optional,
        org.primefaces.examples.service;resolution:=optional,
        org.primefaces.examples.touch;resolution:=optional,
        org.primefaces.examples.view;resolution:=optional,
        org.primefaces.model;resolution:=optional,
        org.primefaces.model.chart;resolution:=optional,
        org.primefaces.model.map;resolution:=optional,
        syntaxhighlighter.scripts;resolution:=optional,
        syntaxhighlighter.styles;resolution:=optional,
        templates;resolution:=optional,
        touch;resolution:=optional,
        ui;resolution:=optional,
        ui.sopranos;resolution:=optional
Export-Package =
        WEB-INF,
        WEB-INF.classes.org.primefaces.examples,
        
WEB-INF.classes.org.primefaces.examples.domain;uses:=org.primefaces.examples.domain,
        
WEB-INF.classes.org.primefaces.examples.filter;uses:="javax.servlet,org.primefaces.examples.filter",
        
WEB-INF.classes.org.primefaces.examples.service;uses:="org.primefaces.examples.service,org.primefaces.examples.domain,com.sun.syndication.feed.synd,com.sun.syndication.io",
        
WEB-INF.classes.org.primefaces.examples.touch;uses:="org.primefaces.examples.service,org.primefaces.examples.domain,javax.faces.context,org.primefaces.examples.touch,javax.faces.event",
        WEB-INF.classes.org.primefaces.examples.view;
                uses:="org.primefaces.examples.domain,
                        javax.faces.application,
                        javax.faces.context,
                        org.primefaces.event,
                        org.primefaces.examples.view,
                        javax.faces.event,
                        org.primefaces.component.chart.series,
                        org.primefaces.model.chart,
                        org.primefaces.comet,
                        javax.faces.component,
                        javax.faces.convert,
                        org.primefaces.examples.service,
                        org.primefaces.model,
                        org.jfree.data.general,
                        org.jfree.chart,
                        net.sourceforge.barbecue,
                        org.primefaces.context,
                        javax.annotation,
                        javax.servlet,
                        javax.imageio.stream,
                        org.primefaces.event.map,
                        org.primefaces.model.map,
                        org.primefaces.component.menuitem,
                        org.primefaces.component.submenu,
                        org.primefaces.component.tabview,
                        javax.faces.model,
                        org.apache.poi.hssf.usermodel,
                        com.lowagie.text",
        WEB-INF.lib,
        css,
        design,
        facestrace,
        images,
        images.antalya,
        images.barca,
        images.cars,
        images.dock,
        images.folders,
        images.galleria,
        images.godfather,
        images.layout,
        images.macosx,
        images.picklist,
        images.stack,
        images.touch,
        org.primefaces.examples.domain,
        org.primefaces.examples.filter,
        org.primefaces.examples.service,
        org.primefaces.examples.touch,
        org.primefaces.examples.view,
        syntaxhighlighter.scripts,
        syntaxhighlighter.styles,
        templates,
        touch,
        ui,
        ui.sopranos

Where faces classes are loaded in the lib folder. I think that the
issue is there dues to classloading issue  ....

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



On Sat, Feb 12, 2011 at 9:21 PM, Achim Nierbeck <bcanh...@googlemail.com> wrote:
> I attached myfaces-test-helloworld-osgi-pax-web.war
>
> that did work for me and I tested the jsf functionalities with it.
>
> The following steps were also needed in karaf shell (just verified once
> more with Karaf-2.99.99-SNAPSHOT):
>
> install mvn:org.apache.myfaces.core/myfaces-api/1.2.9
> install mvn:org.apache.myfaces.core/myfaces-impl/1.2.9
> install mvn:commons-beanutils/commons-beanutils/1.8.3
> install mvn:commons-collections/commons-collections/3.2.1
> install mvn:commons-codec/commons-codec/1.4
> install
> mvn:org.apache.commons/com.springsource.org.apache.commons.digester/1.8.0
> install
> mvn:org.apache.commons/com.springsource.org.apache.commons.discovery/0.4.0
>
> Now the attached myfaces-test-helloworld-osgi.war is started and deployed
> And running, there is some sort of variable replacement issue with this test
> but in principle I think it is working :)
>
> Regards, Achim
>
>
>> I have removed everything and still get the same error from the war
>> containing all the jars file.
>>
>> karaf@root> packages:exports | grep javax.faces
>> karaf@root> packages:exports | grep jsf
>>   1929 org.springframework.web.jsf
>>   1929 org.springframework.web.jsf.el
>>
>> 10:42:36,444 | WARN  | FelixStartLevel  | /prime-showcase-1
>>     | .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)[1958:prime-showcase-1:0]
>>       at 
>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)[1958:prime-showcase-1:0]
>>       at 
>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:166)[1958:prime-showcase-1:0]
>>       at 
>> org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205]
>>
>>
>> On Fri, Feb 11, 2011 at 9:26 AM, Jean-Baptiste Onofré <j...@nanthrax.net> 
>> wrote:
>>> 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 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
>>>>>
>
>

Reply via email to