Announcement Announcement Module
Collapse
No announcement yet.
Spring 2.0 in Geronimo 2.0-M3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 2.0 in Geronimo 2.0-M3

    I'm trying to get a webapp which is in an EAR file working in Geronimo 2.0-M3. It uses Spring 2.0 for most of the work, but I'm having some issues getting the initial Spring ApplicationContext loaded properly. The error message I'm getting is:

    Code:
    15:51:49,694 INFO  [ContextLoader] Root WebApplicationContext: initialization started
    15:51:49,694 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [shared-context], from group with resource name [classpath:/shared-context.xml]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shared-context' defined in class path resource [shared-context.xml]: Instantiation of bean failed; nested exception is org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shared-context' defined in class path resource [shared-context.xml]: Instantiation of bean failed; nested exception is org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String
    Caused by: 
    org.apache.xbean.propertyeditor.PropertyEditorException: Value is not an instance of String
            at org.apache.xbean.propertyeditor.AbstractConverter.setValue(AbstractConverter.java:67)
            at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:269)
            at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:192)
            at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:107)
            at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:356)
            at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:422)
            at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:773)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:716)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
            at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:703)
            at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:394)
    If I try it with Little-G, a more minimal packaging of Geronimo, it works fine. The problem seems to be with the xbean-reflect-2.9-SNAPSHOT package.

    Here's the xml config it seems to be choking on

    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"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    
      <bean id="shared-context"
        class="org.springframework.context.support.ClassPathXmlApplicationContext">
        <constructor-arg>
          <list>
            <value>/example-config.xml</value>
          </list>
       </constructor-arg>
      </bean>
    </beans>
    It looks like it's trying to set the constructor for the ClassPathXmlApplicatoinContext as a String, but it should be a List.

    Has anyone else had a similar problem or any experience using Spring 2.0 under Geronimo 2.0-M3?

    I'd really appreciate any help.

    Thanks,
    Rich

  • #2
    You could try to follow the steps from the following posting by Matt Raible for "org.apache.xbean":
    http://www.virtuas.com/node/83

    HTH

    Joris

    Comment

    Working...
    X