jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • XBean
  • XB-7

Latest XBean doesn't work with Spring 2.0 M2

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Labels:
    None

Description

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in ServletContext resource [/WEB-INF/applicationContext-messaging.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.addPropertyValue(Ljava/lang/String;Ljava/lang/Object;)V
java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.addPropertyValue(Ljava/lang/String;Ljava/lang/Object;)V
at org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.addProperty(XBeanXmlBeanDefinitionParser.java:246)
at org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.addAttributeProperty(XBeanXmlBeanDefinitionParser.java:236)
at org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.addAttributeProperties(XBeanXmlBeanDefinitionParser.java:196)
at org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:132)
at org.xbean.spring.context.impl.XBeanXmlBeanDefinitionParser.parseBeanD

The corresponding method is still available in Spring 2.0 M2.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    XBeanXmlBeanDefinitionReader.java
    05/May/06 1:20 AM
    6 kB
    james strachan

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ben Hale added a comment - 06/Feb/06 6:57 AM

I'm pretty sure this has to do with the fact the as of M2, Spring is compiled completely with Java 5. This doesn't mean that XBean needs to be, just that the bytecode signatures for functions may have changed and XBean just needs to be recompiled against it. Just a thought.

Show
Ben Hale added a comment - 06/Feb/06 6:57 AM I'm pretty sure this has to do with the fact the as of M2, Spring is compiled completely with Java 5. This doesn't mean that XBean needs to be, just that the bytecode signatures for functions may have changed and XBean just needs to be recompiled against it. Just a thought.
Hide
Permalink
Mathias Bogaert added a comment - 09/Feb/06 8:29 AM

Could you compile XBean (I'm not a big maven savvy) with JDK 1.5 and Spring M2 and put a version on dist.codehaus.org?

Show
Mathias Bogaert added a comment - 09/Feb/06 8:29 AM Could you compile XBean (I'm not a big maven savvy) with JDK 1.5 and Spring M2 and put a version on dist.codehaus.org?
Hide
Permalink
Ben Hale added a comment - 13/Feb/06 7:53 AM

It turns out this was a signature change by Spring and therefore this ticket can be closed out. They've reverted back to the original method signature which will be available again in 2.0M3.

http://opensource2.atlassian.com/projects/spring/browse/SPR-1677

Show
Ben Hale added a comment - 13/Feb/06 7:53 AM It turns out this was a signature change by Spring and therefore this ticket can be closed out. They've reverted back to the original method signature which will be available again in 2.0M3. http://opensource2.atlassian.com/projects/spring/browse/SPR-1677
Hide
Permalink
Xavier Stevens added a comment - 03/Mar/06 6:54 PM

I had run into the issue described above, so I downloaded Spring 2.0-M3 snapshot. I am getting a new compatability issue on the "registerBeanDefinitions" method signature. I looked in the source for this and there is no longer a BeanDefinitionReader parameter.

Stack Trace
==============================================================================================
2006-03-03 00:49:37,168 ERROR- [main] org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in ServletContext resource [/WEB-INF/applicationContext-jms.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(Lorg/springframework/beans/factory/support/BeanDefinitionReader;Lorg/w3c/dom/Document;Lorg/springframework/core/io/Resource;)I
java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(Lorg/springframework/beans/factory/support/BeanDefinitionReader;Lorg/w3c/dom/Document;Lorg/springframework/core/io/Resource;)I
at org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:78)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:338)

Show
Xavier Stevens added a comment - 03/Mar/06 6:54 PM I had run into the issue described above, so I downloaded Spring 2.0-M3 snapshot. I am getting a new compatability issue on the "registerBeanDefinitions" method signature. I looked in the source for this and there is no longer a BeanDefinitionReader parameter. Stack Trace ============================================================================================== 2006-03-03 00:49:37,168 ERROR- [main] org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in ServletContext resource [/WEB-INF/applicationContext-jms.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(Lorg/springframework/beans/factory/support/BeanDefinitionReader;Lorg/w3c/dom/Document;Lorg/springframework/core/io/Resource;)I java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(Lorg/springframework/beans/factory/support/BeanDefinitionReader;Lorg/w3c/dom/Document;Lorg/springframework/core/io/Resource;)I at org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:78) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:338)
Hide
Permalink
Xavier Stevens added a comment - 22/Mar/06 1:36 PM

The Spring ticket mentioned above has been closed and this is now an issue that needs to be fixed in order to be compatible with Spring 2.0.

Show
Xavier Stevens added a comment - 22/Mar/06 1:36 PM The Spring ticket mentioned above has been closed and this is now an issue that needs to be fixed in order to be compatible with Spring 2.0.
Hide
Permalink
Alexander Aptus added a comment - 31/Mar/06 10:41 AM

this issue makes ActiveMQ incompatible with Spring 2.0M3 (e.g. embedded broker Spring bean becomes broken)

Show
Alexander Aptus added a comment - 31/Mar/06 10:41 AM this issue makes ActiveMQ incompatible with Spring 2.0M3 (e.g. embedded broker Spring bean becomes broken)
Hide
Permalink
Craig Walls added a comment - 05/Apr/06 9:15 AM

At first glance, this looks to be a tough change, but I think it's as simple as changing the registerBeanDefinitions() method in org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader to look like this:

public int registerBeanDefinitions(Document doc, Resource resource) throws BeansException {
preprocess(doc);
XBeanXmlBeanDefinitionParser parser = new XBeanXmlBeanDefinitionParser();

ReaderContext readerContext = new ReaderContext(this, resource,
new FailFastProblemReporter(),
new XmlBeanDefinitionReader.NullReaderEventListener() ,
new NullSourceExtractor());

return parser.registerBeanDefinitions(doc, readerContext);
}

Of course, there are also a few imports that must be added to XBeanXmlBeanDefinitionReader to make the compiler happy:
import org.springframework.beans.factory.support.ReaderContext;
import org.springframework.beans.factory.xml.FailFastProblemResolver;
import org.springframework.beans.factory.support.NullSourceExtractor;

I'm behind a finicky firewall right now, or I'd create a patch and attach it here. If nobody beats me to it, I'll try to create a patch later this week (or this weekend) and attach it to this issue.

Show
Craig Walls added a comment - 05/Apr/06 9:15 AM At first glance, this looks to be a tough change, but I think it's as simple as changing the registerBeanDefinitions() method in org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader to look like this: public int registerBeanDefinitions(Document doc, Resource resource) throws BeansException { preprocess(doc); XBeanXmlBeanDefinitionParser parser = new XBeanXmlBeanDefinitionParser(); ReaderContext readerContext = new ReaderContext(this, resource, new FailFastProblemReporter(), new XmlBeanDefinitionReader.NullReaderEventListener() , new NullSourceExtractor()); return parser.registerBeanDefinitions(doc, readerContext); } Of course, there are also a few imports that must be added to XBeanXmlBeanDefinitionReader to make the compiler happy: import org.springframework.beans.factory.support.ReaderContext; import org.springframework.beans.factory.xml.FailFastProblemResolver; import org.springframework.beans.factory.support.NullSourceExtractor; I'm behind a finicky firewall right now, or I'd create a patch and attach it here. If nobody beats me to it, I'll try to create a patch later this week (or this weekend) and attach it to this issue.
Hide
Permalink
Craig Walls added a comment - 05/Apr/06 10:13 AM

One gotcha with my fix in the previous comment: Changing XBean to use the new registerBeanDefinitions() method will have the unfortunate side-effect of making XBean incompatible with versions of Spring prior to 2.0-m3.

Show
Craig Walls added a comment - 05/Apr/06 10:13 AM One gotcha with my fix in the previous comment: Changing XBean to use the new registerBeanDefinitions() method will have the unfortunate side-effect of making XBean incompatible with versions of Spring prior to 2.0-m3.
Hide
Permalink
james strachan added a comment - 05/May/06 12:53 AM

Thanks for the pointer Craig!

Unfortunately FailFastProblemReporter is not even visible

Show
james strachan added a comment - 05/May/06 12:53 AM Thanks for the pointer Craig! Unfortunately FailFastProblemReporter is not even visible
Hide
Permalink
james strachan added a comment - 05/May/06 1:20 AM

A modified file using Craig's patch

Show
james strachan added a comment - 05/May/06 1:20 AM A modified file using Craig's patch
Hide
Permalink
james strachan added a comment - 05/May/06 1:21 AM

Craig: I've applied your patch and got it to compile (no idea if it'll work though). Unfortunately it looks like XBeanXmlBeanDefinitionParser will need a major rewrite to work with Spring 2.x as the base class looks to have been changed quite a lot

Show
james strachan added a comment - 05/May/06 1:21 AM Craig: I've applied your patch and got it to compile (no idea if it'll work though). Unfortunately it looks like XBeanXmlBeanDefinitionParser will need a major rewrite to work with Spring 2.x as the base class looks to have been changed quite a lot

People

  • Assignee:
    Unassigned
    Reporter:
    Mathias Bogaert
Vote (6)
Watch (5)

Dates

  • Created:
    02/Feb/06 7:03 AM
    Updated:
    05/May/06 1:21 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.