views:

151

answers:

1

I am trying to run a JRuby app in Spring. I use Eclipse to run it. But it doesn't compile. Does anybody know what's going on here?

Exception in thread "Launcher:/oflaDemo" [INFO] [Launcher:/oflaDemo] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4a009ab0: defining beans [placeholderConfig,web.context,web.scope,web.handler,demoService.service]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@f5d8d75
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'web.scope' defined in ServletContext resource [/WEB-INF/red5-web.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.scripting.jruby.JRubyScriptFactory] to required type [org.red5.server.api.IScopeHandler] for property 'handler'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.springframework.scripting.jruby.JRubyScriptFactory] to required type [org.red5.server.api.IScopeHandler] for property 'handler': no matching editors or conversion strategy found
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
 at java.security.AccessController.doPrivileged(Native Method)

I don't have a lot of experience with Spring, so I would really appreciate hits.

If you're familiar with red5 - yes it's the oflademo app supplied by red5.

A: 

It's telling you you have a bean defined with the name "web.scope" and whatever application context or annotations it's found is telling it to plug an object with the implementation class org.springframework.scripting.jruby.JRubyScriptFactory into a property of that bean (thje one with the name "web.scope"), where the setter for the property takes a parameter of type org.red5.server.api.IScopeHandler, but the thing being plugged into the property does not implement that interface. In short it's telling you you're putting a square peg into a round hole.

Btw it's a runtime error, not a compile problem.

Nathan Hughes
`web.scope` sounds like an internal bean definition created by Spring, rather than a developer-defined one, but without seeing the relevant parts of the bean definition file, it's hard to say for sure.
skaffman