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

  • ClassNotFound with LocalStatelessSessionProxyFactoryBean

    I encountered a broblem in Jboss!

    My configuration is:

    <bean id="admin"
    class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean">
    <property name="jndiName"><value>Admin</value></property>
    <property name="businessInterface"><value>com.lovemusic.func tion.Admin</value></property>
    </bean>

    <bean id="show"
    class="org.springframework.ejb.access.LocalStatele ssSessionProxyFactoryBean">
    <property name="jndiName"><value>Show</value></property>
    <property name="businessInterface"><value>com.lovemusic.func tion.Show</value></property>
    </bean>

    I have already put spring.jar into the /WEB-INF/lib directory,it occus this problem.then,I put spring.jar into the jboss/server/default/lib directory,but it also cann't be soluted.What can I do?why jboss say it can't be found?

    the problem is:
    19:39:29,031 INFO [Engine] StandardContext[/lovemusic]Loading WebApplicationContext for Spring FrameworkServlet 'lovemusic'
    19:39:29,031 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/lovemusic-servlet.xml]
    19:39:29,203 ERROR [DispatcherServlet] Context initialization failed
    org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'admin' defined in ServletContext resource [/WEB-INF/lovemusic-servlet.xml]: Bean class [org.springframework.ejb.access.LocalStatelessSessi onProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.LocalStatelessSessi onProxyFactoryBean
    java.lang.ClassNotFoundException: org.springframework.ejb.access.LocalStatelessSessi onProxyFactoryBean
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at org.springframework.beans.factory.support.BeanDefi nitionReaderUtils.createBeanDefinition(BeanDefinit ionReaderUtils.java:60)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinition(DefaultXmlB eanDefinitionParser.java:293)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.parseBeanDefinition(DefaultXmlB eanDefinitionParser.java:261)
    at org.springframework.beans.factory.xml.DefaultXmlBe anDefinitionParser.registerBeanDefinitions(Default XmlBeanDefinitionParser.java:184)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:173)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:131)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:83)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:114)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:82)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:87)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:262)
    at org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:131)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:2 83)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:230 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:199)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:103)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:211)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1029)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:862)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4013)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4357)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:823)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:807)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(B aseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDy namicInvoker.java:108)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.apache.catalina.core.StandardContext.init(Stan dardContext.java:5434)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.commons.modeler.BaseModelMBean.invoke(B aseModelMBean.java:503)
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDy namicInvoker.java:108)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDep loyInternal(TomcatDeployer.java:334)
    at org.jboss.web.tomcat.tc5.TomcatDeployer.performDep loy(TomcatDeployer.java:82)
    at org.jboss.web.AbstractWebDeployer.start(AbstractWe bDeployer.java:369)
    at org.jboss.web.WebModule.startModule(WebModule.java :62)
    at org.jboss.web.WebModule.startService(WebModule.jav a:40)
    at org.jboss.system.ServiceMBeanSupport.jbossInternal Start(ServiceMBeanSupport.java:271)
    at org.jboss.system.ServiceMBeanSupport.jbossInternal Lifecycle(ServiceMBeanSupport.java:221)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.system.ServiceController$ServiceProxy.in voke(ServiceController.java:844)
    at $Proxy18.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceCo ntroller.java:369)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
    at $Proxy32.start(Unknown Source)
    at org.jboss.web.AbstractWebContainer.start(AbstractW ebContainer.java:362)
    at org.jboss.deployment.MainDeployer.start(MainDeploy er.java:863)
    at org.jboss.deployment.MainDeployer.start(MainDeploy er.java:855)
    at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:674)
    at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:637)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
    at $Proxy7.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner. deploy(URLDeploymentScanner.java:304)
    at org.jboss.deployment.scanner.URLDeploymentScanner. scan(URLDeploymentScanner.java:478)
    at org.jboss.deployment.scanner.AbstractDeploymentSca nner$ScannerThread.doScan(AbstractDeploymentScanne r.java:201)
    at org.jboss.deployment.scanner.AbstractDeploymentSca nner.startService(AbstractDeploymentScanner.java:2 74)
    at org.jboss.system.ServiceMBeanSupport.jbossInternal Start(ServiceMBeanSupport.java:271)
    at org.jboss.system.ServiceMBeanSupport.jbossInternal Lifecycle(ServiceMBeanSupport.java:221)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.system.ServiceController$ServiceProxy.in voke(ServiceController.java:844)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceCo ntroller.java:369)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer .java:260)
    at org.jboss.deployment.MainDeployer.start(MainDeploy er.java:863)
    at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:674)
    at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:637)
    at org.jboss.deployment.MainDeployer.deploy(MainDeplo yer.java:621)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invok e(ReflectedDispatcher.java:141)
    at org.jboss.mx.server.Invocation.dispatch(Invocation .java:80)
    at org.jboss.mx.server.Invocation.invoke(Invocation.j ava:72)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Ab stractMBeanInvoker.java:230)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanSe rverImpl.java:642)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyE xt.java:176)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerI mpl.java:387)
    at org.jboss.system.server.ServerImpl.start(ServerImp l.java:291)
    at org.jboss.Main.boot(Main.java:151)
    at org.jboss.Main$1.run(Main.java:405)
    at java.lang.Thread.run(Thread.java:595)

  • #2
    The problem here is that the LocalStatelessSessionProxyFactoryBean class is not available from whatever context your code is executing. You should ensure that the Spring JAR file is deployed with this component.

    You can use the JBoss JMX Console to diagnose class loading errors.

    Rob

    Comment


    • #3
      Thank you for your help!
      I have already put spring.jar into the /WEB-INF/lib directory,it occus this problem.then,I put spring.jar into the jboss/server/default/lib directory,but it also cann't be soluted.What can I do?

      Comment


      • #4
        This is quite puzzling - have you checked to make sure that the Spring JAR you have is not corrupt and that is has the rg.springframework.ejb.access.LocalStatelessSessio nProxyFactoryBean class inside it?

        Also this could a problem with a dependent class - that is it could be that JBoss cant locate one of the classes that LocalStatelessSessionProxyFactoryBean depends on.

        Rob

        Comment


        • #5
          Thank you!I have checked that org.springframework.ejb.access.LocalStatelessSessi onProxyFactoryBean is in the spring.jar file. Is it the jboss' problem?

          Comment


          • #6
            when I use com.interface21 which is written by Rod Johnson,this problem is never occur!

            Comment


            • #7
              This bean has a dependancy on the AOPAlliance jar, you need to include that. it's at /lib/aopalliance in the spring folder.

              Comment

              Working...
              X