You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Dan Tran <da...@gmail.com> on 2012/06/10 01:43:34 UTC

Re: Unable to load JSF2 War with Spring backing under karaf 2.3-snapshot

filed at http://team.ops4j.org/browse/PAXWEB-382

-D

On Thu, May 31, 2012 at 12:25 AM, Achim Nierbeck
<bc...@googlemail.com> wrote:
> Hi Dan
>
> this i rather strange cause the itests for jsf in pax web don't behave
> that way.
> Maybe a new itest using this special sample should also be done.
> Could you please open a new issue at [1] so I can keep track of this?
>
> regards, Achim
>
> [1] - http://team.ops4j.org/browse/PAXWEB
>
> 2012/5/31 Dan Tran <da...@gmail.com>:
>> I went back to basic and trying to load myfaces examples
>> http://repo1.maven.org/maven2/org/apache/myfaces/commons/myfaces-commons-facelets-examples20/1.0.2.1/myfaces-commons-facelets-examples20-1.0.2.1.war
>>
>> still see the old issue
>>
>> roblem accessing /myfacesx/home.jsf. Reason:
>>
>>    java.lang.IllegalStateException: No Factories configured for this
>> Application. This happens if the faces-initialization does not work at
>> all - make sure that you properly include all configuration settings
>> necessary for a basic faces application and that all the necessary
>> libs are included. Also check the logging output of your web
>> application and your container for any exceptions!
>> If you did that and find nothing, the mistake might be due to the fact
>> that you use some special web-containers which do not support
>> registering context-listeners via TLD files and a context listener is
>> not setup in your web.xml.
>> A typical config looks like this;
>> <listener>
>>  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>> </listener>
>>
>>
>>
>>
>> On Fri, May 18, 2012 at 2:29 PM, Dan Tran <da...@gmail.com> wrote:
>>> Hi Achim,
>>>
>>> We starts the spring container under web.xml. We have quite a few
>>> spring components (jars ) as dependencies of the WAR,  each jars has
>>> spring context xml file under its META-INF/spring resource directory.
>>> This is very typical JSF2/Spring setup
>>>
>>> Thanks
>>>
>>> -D
>>>
>>>
>>>
>>> On Fri, May 18, 2012 at 12:26 PM, Achim Nierbeck
>>> <bc...@googlemail.com> wrote:
>>>> Well how do you start your spring-container?
>>>> You probably have a Spring-Servlet for starting up.
>>>> It could be this can be solved by merely just importing/exporting the
>>>> resource directory.
>>>> And you need to make sure your spring.xml stuff is located in the
>>>> WEB-INF/classes/META-INF dirtory.
>>>>
>>>> Regards, Achim
>>>>
>>>> 2012/5/17 Dan Tran <da...@gmail.com>:
>>>>> Will try to work out a mini war with source to produce the issue.
>>>>>
>>>>> thanks
>>>>>
>>>>> -D
>>>>>
>>>>> On Thu, May 17, 2012 at 2:18 PM, Dan Tran <da...@gmail.com> wrote:
>>>>>> may be b/c I place my spring xml under META-INF/spring ??
>>>>>>
>>>>>> -Dan
>>>>>>
>>>>>> On Thu, May 17, 2012 at 12:39 PM, Achim Nierbeck
>>>>>> <bc...@googlemail.com> wrote:
>>>>>>> Hi Dan,
>>>>>>>
>>>>>>> first of all I don't think that you need to include the osgi.jar.
>>>>>>> To me it looks a lot like your spring config does contain something
>>>>>>> that doesn't work in a OSGi-Classloader environment.
>>>>>>> So maybe you should show us an example of what your xmls look like.
>>>>>>>
>>>>>>> regards, Achim
>>>>>>>
>>>>>>> 2012/5/15 Dan Tran <da...@gmail.com>:
>>>>>>>> plain Spring 3.1.1.  No spring-dm.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> -Dan
>>>>>>>>
>>>>>>>> On Tue, May 15, 2012 at 12:03 AM, Achim Nierbeck
>>>>>>>> <bc...@googlemail.com> wrote:
>>>>>>>>> Hi Dan,
>>>>>>>>>
>>>>>>>>> are you trying to use spring-dm or plain spring?
>>>>>>>>>
>>>>>>>>> regards, Achim
>>>>>>>>>
>>>>>>>>> 2012/5/15 Dan Tran <da...@gmail.com>:
>>>>>>>>>> ping again, just in case this lost in the wide :-)
>>>>>>>>>>
>>>>>>>>>> -D
>>>>>>>>>>
>>>>>>>>>> On Sat, May 12, 2012 at 10:44 AM, Dan Tran <da...@gmail.com> wrote:
>>>>>>>>>>> Note: osgi-core-4.2.0 does not have the package
>>>>>>>>>>> org.eclipse.osgi.service.urlconversion.URLConverter.  It is under 3.x
>>>>>>>>>>>
>>>>>>>>>>> -D
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Sat, May 12, 2012 at 10:19 AM, Dan Tran <da...@gmail.com> wrote:
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> This is another attempt to load my JSF2 webapp to karaf ( thanks for
>>>>>>>>>>>> pax-web-1.1.x, loading JSF 2.x is now possible ). However, I run into
>>>>>>>>>>>> another problem loading spring at init time
>>>>>>>>>>>>
>>>>>>>>>>>> here is the error
>>>>>>>>>>>>
>>>>>>>>>>>> Offending resource: class path resource
>>>>>>>>>>>> [com/mycomp/shared/setting/applicationContext.xml]; nested exception
>>>>>>>>>>>> is org.springframework.beans.factory.BeanDefinitionStoreException:
>>>>>>>>>>>> Unexpected exception parsing XML document from class path resource
>>>>>>>>>>>> [META-INF/spring/ll-setting.xml]; nested exception is
>>>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>>>> org.eclipse.osgi.service.urlconversion.URLConverter not found by mc
>>>>>>>>>>>> [64]
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> is this a bug? or just the way I am setting my spring resource config
>>>>>>>>>>>> file?  O I need osgi.jar in my war file?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>>
>>>>>>>>>>>> -D
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>>>>>> Committer & Project Lead
>>>>>>>>> OPS4J Pax for Vaadin
>>>>>>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>>>>>>> Lead
>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>>>> Committer & Project Lead
>>>>>>> OPS4J Pax for Vaadin
>>>>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>>>>> Lead
>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>> Committer & Project Lead
>>>> OPS4J Pax for Vaadin
>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>> Lead
>>>> blog <http://notizblog.nierbeck.de/>
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> OPS4J Pax for Vaadin
> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
> Lead
> blog <http://notizblog.nierbeck.de/>

Re: Unable to load JSF2 War with Spring backing under karaf 2.3-snapshot

Posted by Achim Nierbeck <bc...@googlemail.com>.
Thanks I'll take a look at it asap.

regards, Achim

2012/6/10 Dan Tran <da...@gmail.com>:
> filed at http://team.ops4j.org/browse/PAXWEB-382
>
> -D
>
> On Thu, May 31, 2012 at 12:25 AM, Achim Nierbeck
> <bc...@googlemail.com> wrote:
>> Hi Dan
>>
>> this i rather strange cause the itests for jsf in pax web don't behave
>> that way.
>> Maybe a new itest using this special sample should also be done.
>> Could you please open a new issue at [1] so I can keep track of this?
>>
>> regards, Achim
>>
>> [1] - http://team.ops4j.org/browse/PAXWEB
>>
>> 2012/5/31 Dan Tran <da...@gmail.com>:
>>> I went back to basic and trying to load myfaces examples
>>> http://repo1.maven.org/maven2/org/apache/myfaces/commons/myfaces-commons-facelets-examples20/1.0.2.1/myfaces-commons-facelets-examples20-1.0.2.1.war
>>>
>>> still see the old issue
>>>
>>> roblem accessing /myfacesx/home.jsf. Reason:
>>>
>>>    java.lang.IllegalStateException: No Factories configured for this
>>> Application. This happens if the faces-initialization does not work at
>>> all - make sure that you properly include all configuration settings
>>> necessary for a basic faces application and that all the necessary
>>> libs are included. Also check the logging output of your web
>>> application and your container for any exceptions!
>>> If you did that and find nothing, the mistake might be due to the fact
>>> that you use some special web-containers which do not support
>>> registering context-listeners via TLD files and a context listener is
>>> not setup in your web.xml.
>>> A typical config looks like this;
>>> <listener>
>>>  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>> </listener>
>>>
>>>
>>>
>>>
>>> On Fri, May 18, 2012 at 2:29 PM, Dan Tran <da...@gmail.com> wrote:
>>>> Hi Achim,
>>>>
>>>> We starts the spring container under web.xml. We have quite a few
>>>> spring components (jars ) as dependencies of the WAR,  each jars has
>>>> spring context xml file under its META-INF/spring resource directory.
>>>> This is very typical JSF2/Spring setup
>>>>
>>>> Thanks
>>>>
>>>> -D
>>>>
>>>>
>>>>
>>>> On Fri, May 18, 2012 at 12:26 PM, Achim Nierbeck
>>>> <bc...@googlemail.com> wrote:
>>>>> Well how do you start your spring-container?
>>>>> You probably have a Spring-Servlet for starting up.
>>>>> It could be this can be solved by merely just importing/exporting the
>>>>> resource directory.
>>>>> And you need to make sure your spring.xml stuff is located in the
>>>>> WEB-INF/classes/META-INF dirtory.
>>>>>
>>>>> Regards, Achim
>>>>>
>>>>> 2012/5/17 Dan Tran <da...@gmail.com>:
>>>>>> Will try to work out a mini war with source to produce the issue.
>>>>>>
>>>>>> thanks
>>>>>>
>>>>>> -D
>>>>>>
>>>>>> On Thu, May 17, 2012 at 2:18 PM, Dan Tran <da...@gmail.com> wrote:
>>>>>>> may be b/c I place my spring xml under META-INF/spring ??
>>>>>>>
>>>>>>> -Dan
>>>>>>>
>>>>>>> On Thu, May 17, 2012 at 12:39 PM, Achim Nierbeck
>>>>>>> <bc...@googlemail.com> wrote:
>>>>>>>> Hi Dan,
>>>>>>>>
>>>>>>>> first of all I don't think that you need to include the osgi.jar.
>>>>>>>> To me it looks a lot like your spring config does contain something
>>>>>>>> that doesn't work in a OSGi-Classloader environment.
>>>>>>>> So maybe you should show us an example of what your xmls look like.
>>>>>>>>
>>>>>>>> regards, Achim
>>>>>>>>
>>>>>>>> 2012/5/15 Dan Tran <da...@gmail.com>:
>>>>>>>>> plain Spring 3.1.1.  No spring-dm.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> -Dan
>>>>>>>>>
>>>>>>>>> On Tue, May 15, 2012 at 12:03 AM, Achim Nierbeck
>>>>>>>>> <bc...@googlemail.com> wrote:
>>>>>>>>>> Hi Dan,
>>>>>>>>>>
>>>>>>>>>> are you trying to use spring-dm or plain spring?
>>>>>>>>>>
>>>>>>>>>> regards, Achim
>>>>>>>>>>
>>>>>>>>>> 2012/5/15 Dan Tran <da...@gmail.com>:
>>>>>>>>>>> ping again, just in case this lost in the wide :-)
>>>>>>>>>>>
>>>>>>>>>>> -D
>>>>>>>>>>>
>>>>>>>>>>> On Sat, May 12, 2012 at 10:44 AM, Dan Tran <da...@gmail.com> wrote:
>>>>>>>>>>>> Note: osgi-core-4.2.0 does not have the package
>>>>>>>>>>>> org.eclipse.osgi.service.urlconversion.URLConverter.  It is under 3.x
>>>>>>>>>>>>
>>>>>>>>>>>> -D
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Sat, May 12, 2012 at 10:19 AM, Dan Tran <da...@gmail.com> wrote:
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is another attempt to load my JSF2 webapp to karaf ( thanks for
>>>>>>>>>>>>> pax-web-1.1.x, loading JSF 2.x is now possible ). However, I run into
>>>>>>>>>>>>> another problem loading spring at init time
>>>>>>>>>>>>>
>>>>>>>>>>>>> here is the error
>>>>>>>>>>>>>
>>>>>>>>>>>>> Offending resource: class path resource
>>>>>>>>>>>>> [com/mycomp/shared/setting/applicationContext.xml]; nested exception
>>>>>>>>>>>>> is org.springframework.beans.factory.BeanDefinitionStoreException:
>>>>>>>>>>>>> Unexpected exception parsing XML document from class path resource
>>>>>>>>>>>>> [META-INF/spring/ll-setting.xml]; nested exception is
>>>>>>>>>>>>> java.lang.NoClassDefFoundError:
>>>>>>>>>>>>> org.eclipse.osgi.service.urlconversion.URLConverter not found by mc
>>>>>>>>>>>>> [64]
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> is this a bug? or just the way I am setting my spring resource config
>>>>>>>>>>>>> file?  O I need osgi.jar in my war file?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>
>>>>>>>>>>>>> -D
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>>>>>>> Committer & Project Lead
>>>>>>>>>> OPS4J Pax for Vaadin
>>>>>>>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>>>>>>>> Lead
>>>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>>>>> Committer & Project Lead
>>>>>>>> OPS4J Pax for Vaadin
>>>>>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>>>>>> Lead
>>>>>>>> blog <http://notizblog.nierbeck.de/>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>>>>> Committer & Project Lead
>>>>> OPS4J Pax for Vaadin
>>>>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>>>>> Lead
>>>>> blog <http://notizblog.nierbeck.de/>
>>
>>
>>
>> --
>>
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer & Project Lead
>> OPS4J Pax for Vaadin
>> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
>> Lead
>> blog <http://notizblog.nierbeck.de/>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>