Announcement Announcement Module
Collapse
No announcement yet.
Error creating managed bean (RmiProxyFactoryBean) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error creating managed bean (RmiProxyFactoryBean)

    Hi, I'm trying to integrate spring and JSF. I've been trying to use managed-beans. In my faces_config file I have
    Code:
    <managed-bean>
    	<managed-bean-name>remote_service</managed-bean-name>
    	<managed-bean-class>org.springframework.remoting.rmi.RmiProxyFactoryBean</managed-bean-class>
    	<managed-bean-scope>application</managed-bean-scope>
    	<managed-property>
    		<property-name>serviceUrl</property-name>
    		<value>rmi://localhost:1199/AService</value>
    	</managed-property>
    	<managed-property>
    		<property-name>serviceInterface</property-name>
    		<property-class>java.lang.Class</property-class>
    	<value>service.IService</value>
    	</managed-property>
    </managed-bean>
    Unfortunately I am receiving following error:
    ERROR [com.sun.faces.application.ApplicationImpl] - Managedbean remote_service could not be created Error performing conversion of value 'service.IService' of type 'class java.lang.String' to type 'class java.lang.Class' for managed bean 'remote_service'.
    javax.faces.FacesException: Error performing conversion of value 'service.IService' of type 'class java.lang.String' to type 'class java.lang.Class' for managed bean 'remote_service'.
    at com.sun.faces.config.ManagedBeanFactory.getConvert edValueConsideringPrimitives(ManagedBeanFactory.ja va:885)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:575)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:253)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:282)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:97)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:145)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:263)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:160)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:143)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:919)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:567)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:253)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:282)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:97)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:145)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:263)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:160)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:143)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:919)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:567)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:253)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:282)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:97)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:145)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:263)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:160)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:143)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:919)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:567)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:253)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:282)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:97)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:145)
    at com.sun.faces.el.impl.ComplexValue.evaluate(Comple xValue.java:166)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:263)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:160)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:143)
    at javax.faces.component.UIOutput.getValue(UIOutput.j ava:167)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputR enderer.getValue(HtmlBasicInputRenderer.java:102)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.getCurrentValue(HtmlBasicRenderer.java:221)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeEnd(HtmlBasicRenderer.java:199)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:740)
    at javax.faces.webapp.UIComponentTag.encodeEnd(UIComp onentTag.java:645)
    at javax.faces.webapp.UIComponentTag.doEndTag(UICompo nentTag.java:568)
    at com.sun.faces.taglib.html_basic.OutputTextTag.doEn dTag(OutputTextTag.java:173)
    at org.apache.jsp.jsp.EditCOA_jsp._jspx_meth_h_output Text_0(EditCOA_jsp.java:252)
    at org.apache.jsp.jsp.EditCOA_jsp._jspx_meth_h_form_0 (EditCOA_jsp.java:158)
    at org.apache.jsp.jsp.EditCOA_jsp._jspx_meth_f_view_0 (EditCOA_jsp.java:126)
    at org.apache.jsp.jsp.EditCOA_jsp._jspService(EditCOA _jsp.java:91)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:334)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:301)
    at com.sun.faces.context.ExternalContextImpl.dispatch (ExternalContextImpl.java:346)
    at com.sun.faces.application.ViewHandlerImpl.renderVi ew(ViewHandlerImpl.java:152)
    at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:107)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(Lifecy cleImpl.java:268)
    at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:137)
    at javax.faces.webapp.FacesServlet.service(FacesServl et.java:214)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:301)
    at org.apache.jasper.runtime.PageContextImpl.doForwar d(PageContextImpl.java:688)
    at org.apache.jasper.runtime.PageContextImpl.forward( PageContextImpl.java:658)
    at org.apache.jsp.index_jsp._jspService(index_jsp.jav a:48)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:334)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    [...]

    Strange thing is that when I use following code in my servlet.xml
    Code:
    <bean id="coa_remote_service" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl" value="rmi://localhost:1199/AService" />
        <property name="serviceInterface" value="service.IService" />
    </bean>
    everything initializes correctly. Can anybody tell me what is wrong with my faces_config file?

    Regards,
    morhen

  • #2
    Error performing conversion to 'class java.lang.Class'

    Hello,
    I am trying to run on Windows (InteliJ) some application developed on Linux and I am receiving same error as you had due to a managed-property
    <managed-property>
    <property-name>enumClass</property-name>
    <property-class>java.lang.Class</property-class>
    <value>mp.entity.type.ClientKey</value>
    </managed-property>
    On linux it works fine, but on windows gives this error.

    Have u found a solution for your old problem yet? If yes please light me up too

    Thank u.

    Comment


    • #3
      I'm sorry, it was so long ago that I don't remember how and if I eventually solved it or found workaround.

      morhen.

      Comment

      Working...
      X