add user@karaf

On Thu, Mar 3, 2011 at 12:42 AM, Dan Tran <[email protected]> wrote:
> and I am not sure the actual outcome/solution for that discussion
> http://karaf.922171.n3.nabble.com/Apache-Karaf-amp-WAR-JSF-td2465980.html
>
> -D
>
> On Thu, Mar 3, 2011 at 12:35 AM, Dan Tran <[email protected]> wrote:
>> looks like this is the same issue at
>> http://karaf.922171.n3.nabble.com/Apache-Karaf-amp-WAR-JSF-td2465980.html
>>
>> -D
>>
>> On Thu, Mar 3, 2011 at 12:32 AM, Dan Tran <[email protected]> wrote:
>>> ouch, I will need to temporary add simple onelines bean definitions
>>> for all the annotated beans. But that is ok
>>>
>>> NowI run into
>>>
>>> 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:815)[211:mc:0.0.0]
>>>        at 
>>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:317)[211:mc:0.0.0]
>>>        at 
>>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:253)[211:mc:0.0.0]
>>>        at 
>>> org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432)[199:org.eclipse.jetty.servlet:7.2.2.v20101205]
>>>        at 
>>> org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260)[199:org.eclipse.jetty.servlet:7.2.2.v20101205]
>>>        at 
>>> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)[193:org.eclipse.jetty.util:7.2.2.v20101205]
>>>        at 
>>> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:762)[199:org.eclipse.jetty.servlet:7.2.2.v20101205]
>>>
>>> Big Thanks
>>>
>>> -Dan
>>>
>>> On Wed, Mar 2, 2011 at 11:52 PM, Charles Moulliard <[email protected]> 
>>> wrote:
>>>> Hi Dan,
>>>>
>>>> Can you make a test using <context:annotation-config/> instead of
>>>> <context:component-scan> (see here for more info -
>>>> http://wiki.ops4j.org/display/ops4j/Pax+Web+Extender+-+War+-+Examples)
>>>> to see if the error is still there ?
>>>>
>>>> Regards,
>>>>
>>>> Charles
>>>>
>>>>
>>>> On Thu, Mar 3, 2011 at 8:33 AM, Dan Tran <[email protected]> wrote:
>>>>> Hi Charles , thank you for looking into this issue:
>>>>>
>>>>> Here is the stack trace
>>>>>
>>>>> Problem accessing /mc/index.jsp. Reason:
>>>>>
>>>>>    Error creating bean with name 'shiroFilter' defined in
>>>>> ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot
>>>>> resolve reference to bean 'securityManager' while setting bean
>>>>> property 'securityManager'; nested exception is
>>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>>> creating bean with name 'securityManager' defined in ServletContext
>>>>> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference
>>>>> to bean 'localRealm' while setting bean property 'realm'; nested
>>>>> exception is 
>>>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
>>>>> No bean named 'localRealm' is defined
>>>>>        at 
>>>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)[93:mc:0.0.0]
>>>>>        at 
>>>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)[93:mc:0.0.0]
>>>>>
>>>>>
>>>>> This means my 'shiroBean' is defined in applicationContext.xml which
>>>>> needs to reference 'securityContext' , also defined in the same Spring
>>>>> xml file, which then requires 'localRealm' bean which is annotated via
>>>>> Spring @Component.
>>>>>
>>>>> If I manually add my 'localRealm' to the Spring XML,  then same issue
>>>>> happens on other annotated bean.
>>>>>
>>>>> It sound like ' <context:component-scan ...' got muted ( no problem
>>>>> under Virgo )
>>>>>
>>>>> I you see no hints from this log, i will try to scale down the project
>>>>> and post it
>>>>>
>>>>> Thanks
>>>>>
>>>>> -D
>>>>>
>>>>>
>>>>> On Wed, Mar 2, 2011 at 10:44 PM, Charles Moulliard <[email protected]> 
>>>>> wrote:
>>>>>> Hi Dan,
>>>>>>
>>>>>> Can you provide us the exception generated in the stack trace of Karaf
>>>>>> (using command log:display -n 10) and maybe a test case or the war
>>>>>> used to reproduce the error and check what happens ?
>>>>>>
>>>>>> 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 Thu, Mar 3, 2011 at 3:53 AM, Dan Tran <[email protected]> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have a JSF 2.0 + Spring + JPA 2.0 standalone webapp loading fine on
>>>>>>> Eclipse Virgo 2.1[1], but not with Karaf.  It seems like no Spring
>>>>>>> annotated beans can be created. No problem creating beans via XML
>>>>>>> configuration thou.
>>>>>>>
>>>>>>> Any advice for me to trouble this issue?  or Have any one successfully
>>>>>>> get this combination working?
>>>>>>>
>>>>>>> Big thanks ahead
>>>>>>>
>>>>>>> -Dan
>>>>>>>
>>>>>>> PS: I see the same issue with Karaf 2.1.4
>>>>>>>
>>>>>>> [1] 
>>>>>>> http://www.eclipse.org/forums/index.php?t=msg&goto=657502&S=b35e653a8e2ccc6da8734a1cfb0eed16
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to