2 Replies Latest reply on Dec 31, 2009 11:00 AM by sangaurav

    Spring-Seam Hybrid Component, Context Loading Problem

    sangaurav
      I'm a newbie in Seam. I'm doing a POC on Seam-Spring Hybrid components. For that i'm trying to let seam load the context for Spring instead of using the listeners approach. For this i'm referencing the latest Seam Reference.

      The issue is when i register the component namespace http://jboss.com/products/seam/spring, prefixed as spring, in the component descriptor and define the <spring:context-loader/> component, the Eclipse shows two errors:

      1) cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'spring:context-loader'.
      2) Referenced file contains errors (http://jboss.com/products/seam/spring-2.2.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

      Below is the snippet of my component.xml file:

      <components xmlns="http://jboss.com/products/seam/components"
              xmlns:core="http://jboss.com/products/seam/core"
              xmlns:spring="http://jboss.com/products/seam/spring"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd
           http://jboss.com/products/seam/spring http://jboss.com/products/seam/spring-2.2.xsd
           http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">

              <spring:context-loader/>
              <core:init debug="true" jndi-pattern="@jndiPattern@" />

              <core:manager concurrent-request-timeout="500"
                      conversation-timeout="120000" conversation-id-parameter="cid"
                      parent-conversation-id-parameter="pid" />
      </components>

      If instead of http://jboss.com/products/seam/spring-2.2.xsd i use http://jboss.com/products/seam/spring-2.0.xsd then there are no such errors but following warning is displayed.

      1) XML schema version "2.0" does not match Seam runtime version "2.2".

      I have jboss-seam-ioc.jar in my /WEB-INF/lib folder. Please suggest the solution for this as it's kind of showstopper for me.

      Thanks,
      Gaurav Saini