Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Integrating jsf 1.2 with spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integrating jsf 1.2 with spring

    Hello,

    I'm trying to develop a web bundle using jsf framework in which I want to consume an osgi service called from a external bundle. To do so, I found in some tutos that I have to add that line in the face-config file :
    Code:
    <application>
    		<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
    		<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    	</application>
    Then I just declared in my applicationContext file my bean in which there is a reference to an osgi service declared in that same file as follows :
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:osgi="http://www.springframework.org/schema/osgi"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    		http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
    
    	<bean id="xentityView"
    		class="org.cynapsys.cssf.em.view.XEntityView">
    	</bean>
    	<osgi:reference id="xentityService" interface="org.cynapsys.cssf.em.service.Xentity_Service"></osgi:reference>	
    	
    </beans>
    Unfortunately, when I try to run my bundle on the spring dm server, it fails to start, showing this error on the console :
    Code:
    [2010-09-20 13:03:04.034] Thread-3                     <WE0005E> Failed to start web bundle 'org.cynapsys.cssf.web.em' version '1.0.0': consult the serviceability log for further details. 
    [2010-09-20 13:03:04.041] start-signalling-5           <DE0006E> Start failed for bundle 'org.cynapsys.cssf.web.em' version '1.0.0'. com.springsource.kernel.deployer.core.DeploymentException: Web application failed to start
    	at com.springsource.server.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:139)
    	at com.springsource.kernel.install.artifact.internal.ArtifactStateMonitor.onStarted(ArtifactStateMonitor.java:215)
    	at com.springsource.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:281)
    	at com.springsource.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:278)
    	at com.springsource.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:231)
    	at com.springsource.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:150)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: com.springsource.osgi.webcontainer.core.WebApplicationStartFailedException: com.springsource.osgi.webcontainer.core.spi.ServletContainerException: Web application at '/cssfem' failed to start. Check the logs for more details.
    	at com.springsource.osgi.webcontainer.internal.StandardWebApplication.start(StandardWebApplication.java:106)
    	at com.springsource.server.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:130)
    	... 8 common frames omitted
    Caused by: com.springsource.osgi.webcontainer.core.spi.ServletContainerException: Web application at '/cssfem' failed to start. Check the logs for more details.
    	at com.springsource.osgi.webcontainer.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:122)
    	at com.springsource.osgi.webcontainer.internal.StandardWebApplication.start(StandardWebApplication.java:89)
    	... 9 common frames omitted
    But then, I realized that only the osgi-reference who is causing a trouble. Because when I remove it, my web bundle is deployed without any problem!

    I tryed to find out on the web a way to integrate osgi services as beans in a jsf web bundle, but without any success!
    Could anyone help me to find out a solution to that problem?

    Thanks a lot in advance!
Working...
X