XFire Context behaves differently than Spring Context - 
MethodInvokingFactoryBean throws a NoSuchMethodException
----------------------------------------------------------------------------------------------------------------

                 Key: XFIRE-750
                 URL: http://jira.codehaus.org/browse/XFIRE-750
             Project: XFire
          Issue Type: Bug
          Components: Spring
    Affects Versions: 1.2.2
         Environment: Windows XP, XFire 1.2.2., Java 1.5.0_06, Maven 2.0.4
            Reporter: Franz Garsombke
         Assigned To: Dan Diephouse
         Attachments: bsf.zip

This has been a doozy :). The problem is that Spring's 
MethodInvokingFactoryBean works fine when I use a Spring Context (or factory). 
Below is the test code:

Unit Test1
ClassPathResource resource = new ClassPathResource("spring/services.xml");
BeanFactory factory = new XmlBeanFactory(resource);
String url = (String) factory.getBean("ndoUrl");
assert(...)

When I deploy this same code into a container using the 
XFireConfigurableServlet I get the following error:

Caused by: java.lang.NoSuchMethodException: 
com.level3.bsf.registry.RegistryClientImpl.getProperty(javax.xml.namespace.QName)
  at java.lang.Class.getMethod(Class.java:1581)
  at org.springframework.util.MethodInvoker.prepare(MethodInvoker.java:180)

I can also reproduce this error in a unit test using the code below:

Unit Test2
 XFireConfigLoader loader = new XFireConfigLoader();
 ApplicationContext ctx = loader.loadContext("spring/services.xml",null);
 String url = (String) ctx.getBean("ndoUrl");

Note that the same jars are used in Unit Test 1 and Unit Test 2.

I have attached the project with these unit tests. The test is called 
SpringTest.java and is in the bsf-location module.

Interesting that the MethodInvokingFactoryBean works in XFire with NO arguments 
but does not work if you have a method that takes arguments.


Thanks,

Franz



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to