Announcement Announcement Module
Collapse
No announcement yet.
RmiProxyFactoryBean ClassNotFound Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RmiProxyFactoryBean ClassNotFound

    I have RMI working in my app, and I'm trying to convert to the Spring rmi support.

    So I have the following in my spring config:

    Code:
        <bean name="cpmsrmi" class="org.stl.wo.data.CpmsDataAccessorSpringRmiImpl">
            <property name="CpmsServerIntf"><ref bean="cpmsRmiProxy"/></property>
        </bean>
    
        <bean id="cpmsRmiProxy" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
            <property name="serviceInterface">
                <value>org.stl.cpmsserver.business.CpmsServerIntf</value>
            </property>
            <property name="serviceUrl"><value></value></property>
            <property name="lookupStubOnStartup"><value>false</value></property>
            <property name="refreshStubOnConnectFailure"><value>true</value></property>
        </bean>
    When I run the app, I get a ClassNotFoundException for RmiProxyFactoryBean. I have the Spring 1.1 jar in my classpath, and all the other Spring classes are found; I've checked and checked again for typos, but maybe I've missed something. I'd be grateful for any suggestions.

    Here is part of the error log:

    Code:
    org.springframework.beans.factory.BeanCreationException&#58; Error creating bean wit
    h name 'org.stl.wo.appcontext' defined in URL &#91;file&#58;/user1/jboss-3.2.5/server/de
    fault/deploy/wo.ear/scheduler.sar/beanRefFactory.xml&#93;&#58; Instantiation of bean fai
    led; nested exception is org.springframework.beans.FatalBeanException&#58; Could not
     instantiate class &#91;org.springframework.context.support.ClassPathXmlApplicationC
    ontext&#93;; constructor threw exception; nested exception is org.springframework.be
    ans.factory.BeanDefinitionStoreException&#58; Error registering bean with name 'cpms
    RmiProxy' defined in class path resource &#91;wo_bus_config.xml&#93;&#58; Bean class &#91;org.sp
    ringframework.remoting.rmi.RmiProxyFactoryBean&#93; not found; nested exception is j
    ava.lang.ClassNotFoundException&#58; org.springframework.remoting.rmi.RmiProxyFactor
    yBean
    org.springframework.beans.FatalBeanException&#58; Could not instantiate class &#91;org.s
    pringframework.context.support.ClassPathXmlApplicationContext&#93;; constructor thre
    w exception; nested exception is org.springframework.beans.factory.BeanDefinitio
    nStoreException&#58; Error registering bean with name 'cpmsRmiProxy' defined in clas
    s path resource &#91;wo_bus_config.xml&#93;&#58; Bean class &#91;org.springframework.remoting.rm
    i.RmiProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundExc
    eption&#58; org.springframework.remoting.rmi.RmiProxyFactoryBean
    org.springframework.beans.factory.BeanDefinitionStoreException&#58; Error registerin
    g bean with name 'cpmsRmiProxy' defined in class path resource &#91;wo_bus_config.xm
    l&#93;&#58; Bean class &#91;org.springframework.remoting.rmi.RmiProxyFactoryBean&#93; not found;
     nested exception is java.lang.ClassNotFoundException&#58; org.springframework.remot
    ing.rmi.RmiProxyFactoryBean
    java.lang.ClassNotFoundException&#58; org.springframework.remoting.rmi.RmiProxyFacto
    ryBean
            at java.net.URLClassLoader.run&#40;URLClassLoader.java&#58;195&#41;
            at java.security.AccessController.doPrivileged&#40;Native Method&#41;
            at java.net.URLClassLoader.findClass&#40;URLClassLoader.java&#58;183&#41;
            at java.lang.ClassLoader.loadClass&#40;ClassLoader.java&#58;294&#41;
            at java.lang.ClassLoader.loadClass&#40;ClassLoader.java&#58;250&#41;
            at java.lang.ClassLoader.loadClassInternal&#40;ClassLoader.java&#58;310&#41;
            at java.lang.Class.forName0&#40;Native Method&#41;
            at java.lang.Class.forName&#40;Class.java&#58;190&#41;
            at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.c
    reateBeanDefinition&#40;BeanDefinitionReaderUtils.java&#58;50&#41;
            at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
    parseBeanDefinition&#40;DefaultXmlBeanDefinitionParser.java&#58;279&#41;
            at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
    parseBeanDefinition&#40;DefaultXmlBeanDefinitionParser.java&#58;239&#41;
            at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
    registerBeanDefinition&#40;DefaultXmlBeanDefinitionParser.java&#58;205&#41;
            at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
    registerBeanDefinitions&#40;DefaultXmlBeanDefinitionParser.java&#58;173&#41;
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
    rBeanDefinitions&#40;XmlBeanDefinitionReader.java&#58;164&#41;
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
    nDefinitions&#40;XmlBeanDefinitionReader.java&#58;128&#41;

  • #2
    Would you mind trying this with JBoss 3.2.6 (wichever RC is the latest) or 3.2.3. There are some classloading bugs that slipped into JBoss 3.2.5 that also affected Quartz integration.

    I wouldn't know if this issue is also caused by the bug, but before we get into it any further, it would be nice if you could check it.

    alef

    Comment


    • #3
      I've just installed jboss 3.2.6RC1, and get exactly the same error.

      I was going to try 3.2.3, but I've changed my app to take advantage of Tomcat 5 Servlet 2.4/JSP 2.0, so it no longer works with 3.2.3.

      It may well be something I've got wrong, just not sure what . . .

      Comment


      • #4
        I was working on the server end of the rmi, and got a classnotfound on one of the aopalliance classes . . . which set me thinking . . .

        I've now got aopalliance.jar in my classpath on the client end, and it all works fine.

        Perhaps the error message on the client side could be a bit clearer?

        Comment


        • #5
          I found this thread on Google and it was similar to my problem. I tried cmgharris's aopalliance.jar fix and it works. Thanks.

          Comment

          Working...
          X