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

  • problem with SimpleRemoteStatelessSessionProxyFactoryBean

    I'm seeing this error in my servlet's applicationContext.xml when I try to initialize access to a remote EJB. I'm figuring I'm probably just not doing this correctly. Can someone point to an example on this? I'm using JBoss 3.2.3 - Thanks much.

    org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'myComponent' defined in resource [/WEB-INF/applicationContext.xml] of ServletContext: Bean class [org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean

    java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean

  • #2
    exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean
    What spring jar files are you using in your class path?

    SimpleRemoteStatelessSessionProxyFactoryBean is included in both spring.jar and spring-context.jar.

    Comment


    • #3
      Oh that *IS* interesting. I have both of them in my classpath.... Sounds like the classloader is choking as a result... :-/

      Comment


      • #4
        ElPapa,

        If you use spring.jar in your classpath, there is no need to include the other jar from spring distribution as spring.jar contains all the Spring Framework classes.

        Comment


        • #5
          After rooting around in the JAR files I see that now. However I'm still having the same problem.


          14:06:35,375 ERROR [ContextLoader] Context initialization failed

          org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'myComponent' defined in resource [/WEB-INF/applicationContext.xml] of ServletContext: Bean class [org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean] not found; nested exception is java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean

          java.lang.ClassNotFoundException: org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean



          From my applicationContext.xml file...

          <bean id="myComponent"
          lazy-init="true"
          class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
          <property name="jndiName">
          <value>java:comp/env/ejb/SimpleEJB</value>
          </property>
          <property name="businessInterface">
          <value>com.my.package.MyComponent</value>
          </property>
          </bean>

          Comment


          • #6
            OK... I decided to take a step back from my project, create a new project, put an EJB in that, and then try again to see what happened.

            I'm STILL getting java.lang.ClassNotFoundException. And the spring.jar file is deployed along with my EJB.

            Here's the springconfig.xml file that I'm loading in a simple Java application, the applicationContext file from that sample, and the stacktrace.

            If this matters at all, I'm using Framework 1.01. I could REALLY use some help here. This is making me a bit batty.

            File: springconfig.xml
            Code:
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
            
            <beans>
                  <bean id="myComponent"
                       lazy-init="true"
                       class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
                      <property name="jndiName">
                         <value>SimpleEJB</value>
                      </property>
                      <property name="jndiEnvironment">
                        <props>
                          <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
                          <prop key="java.naming.factory.url.pkgs">org.jboss.naming&#58;org.jnp.interfaces</prop>
                          <prop key="java.naming.provider.url">jnp&#58;//localhost&#58;1099</prop>
                        </props>
                      </property>
                      <property name="businessInterface">
                          <value>com.codethought.springejb.services.MyComponent</value>
                      </property>
                  </bean>
            </beans>
            file : applicationContext.xml

            Code:
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
            
            <beans>
              <!-- ========================= GENERAL DEFINITIONS ========================= -->
            
              <!-- ========================= RESOURCE DEFINITIONS ========================= -->
            
            
              <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
            
              <!-- an EJB proxy with the cached home flag on, to test home lookup every time -->
            	<bean id="cachedHomeProxy" lazy-init="true" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
            		<property name="jndiName">
            			<value>SimpleEJB</value>
            		</property>
            		<property name="cacheHome">
            			<value>true</value>
            		</property>
            		<property name="businessInterface">
            			<value>com.codethought.springejb.services.MyComponent</value>
            		</property>
            	</bean>
            
            	<!-- now another instance with the cached home flag off, to test home lookup every time -->
            	<bean id="noCachedHomeProxy" lazy-init="true" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
            		<property name="jndiName">
            			<value>SimpleEJB</value>
            		</property>
            		<property name="cacheHome">
            			<value>false</value>
            		</property>
            		<property name="businessInterface">
            			<value>com.codethought.springejb.services.MyComponent</value>
            		</property>
            	</bean>
            
            </beans>
            Stacktrace:

            Code:
            FINE&#58; main&#58; outbound call received exception&#58; &#91;172.20.6.101&#58;4444&#93; exception&#58; 
            
            java.rmi.ServerException&#58; RemoteException occurred in server thread; nested exception is&#58; 
            	java.rmi.ServerException&#58; EJBException&#58;; nested exception is&#58; 
            	javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at sun.rmi.server.UnicastServerRef.dispatch&#40;UnicastServerRef.java&#58;292&#41;
            
            	at sun.rmi.transport.Transport$1.run&#40;Transport.java&#58;148&#41;
            
            	at java.security.AccessController.doPrivileged&#40;Native Method&#41;
            
            	at sun.rmi.transport.Transport.serviceCall&#40;Transport.java&#58;144&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport.handleMessages&#40;TCPTransport.java&#58;460&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run&#40;TCPTransport.java&#58;701&#41;
            
            	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
            
            	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer&#40;StreamRemoteCall.java&#58;247&#41;
            
            	at sun.rmi.transport.StreamRemoteCall.executeCall&#40;StreamRemoteCall.java&#58;223&#41;
            
            	at sun.rmi.server.UnicastRef.invoke&#40;UnicastRef.java&#58;133&#41;
            
            	at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke&#40;Unknown Source&#41;
            
            	at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke&#40;JRMPInvokerProxy.java&#58;135&#41;
            
            	at org.jboss.invocation.InvokerInterceptor.invoke&#40;InvokerInterceptor.java&#58;96&#41;
            
            	at org.jboss.proxy.TransactionInterceptor.invoke&#40;TransactionInterceptor.java&#58;46&#41;
            
            	at org.jboss.proxy.SecurityInterceptor.invoke&#40;SecurityInterceptor.java&#58;45&#41;
            
            	at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke&#40;StatelessSessionInterceptor.java&#58;100&#41;
            
            	at org.jboss.proxy.ClientContainer.invoke&#40;ClientContainer.java&#58;85&#41;
            
            	at $Proxy2.myMethod&#40;Unknown Source&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.invoke&#40;SimpleRemoteSlsbInvokerInterceptor.java&#58;104&#41;
            
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;138&#41;
            
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;148&#41;
            
            	at $Proxy1.myMethod&#40;Unknown Source&#41;
            
            	at com.codethought.springejb.test.TestRemoteProxy.main&#40;TestRemoteProxy.java&#58;22&#41;
            
            Caused by&#58; java.rmi.ServerException&#58; EJBException&#58;; nested exception is&#58; 
            	javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at org.jboss.ejb.plugins.LogInterceptor.handleException&#40;LogInterceptor.java&#58;347&#41;
            
            	at org.jboss.ejb.plugins.LogInterceptor.invoke&#40;LogInterceptor.java&#58;195&#41;
            
            	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke&#40;ProxyFactoryFinderInterceptor.java&#58;122&#41;
            
            	at org.jboss.ejb.StatelessSessionContainer.internalInvoke&#40;StatelessSessionContainer.java&#58;331&#41;
            
            	at org.jboss.ejb.Container.invoke&#40;Container.java&#58;700&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke&#40;ReflectedMBeanDispatcher.java&#58;284&#41;
            
            	at org.jboss.mx.server.MBeanServerImpl.invoke&#40;MBeanServerImpl.java&#58;546&#41;
            
            	at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke&#40;JRMPInvoker.java&#58;367&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at sun.rmi.server.UnicastServerRef.dispatch&#40;UnicastServerRef.java&#58;261&#41;
            
            	at sun.rmi.transport.Transport$1.run&#40;Transport.java&#58;148&#41;
            
            	at java.security.AccessController.doPrivileged&#40;Native Method&#41;
            
            	at sun.rmi.transport.Transport.serviceCall&#40;Transport.java&#58;144&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport.handleMessages&#40;TCPTransport.java&#58;460&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run&#40;TCPTransport.java&#58;701&#41;
            
            	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
            
            Caused by&#58; javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>&#40;StatelessSessionEnterpriseContext.java&#58;59&#41;
            
            	at org.jboss.ejb.plugins.StatelessSessionInstancePool.create&#40;StatelessSessionInstancePool.java&#58;35&#41;
            
            	at org.jboss.ejb.plugins.AbstractInstancePool.get&#40;AbstractInstancePool.java&#58;168&#41;
            
            	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke&#40;StatelessSessionInstanceInterceptor.java&#58;58&#41;
            
            	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext&#40;AbstractTxInterceptor.java&#58;84&#41;
            
            	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions&#40;TxInterceptorCMT.java&#58;267&#41;
            
            	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke&#40;TxInterceptorCMT.java&#58;128&#41;
            
            	at org.jboss.ejb.plugins.SecurityInterceptor.invoke&#40;SecurityInterceptor.java&#58;118&#41;
            
            	at org.jboss.ejb.plugins.LogInterceptor.invoke&#40;LogInterceptor.java&#58;191&#41;
            
            	... 21 more
            
            Aug 19, 2004 10&#58;06&#58;01 AM sun.rmi.server.UnicastRef invoke
            
            FINE&#58; main&#58; free connection &#40;reuse = false&#41;
            
            Aug 19, 2004 10&#58;06&#58;01 AM sun.rmi.transport.tcp.TCPChannel free
            
            FINE&#58; main&#58; close connection
            
            Aug 19, 2004 10&#58;06&#58;01 AM sun.rmi.transport.tcp.TCPConnection close
            
            FINE&#58; main&#58; close connection
            
            org.springframework.remoting.RemoteAccessException&#58; Could not invoke remote EJB &#91;SimpleEJB&#93;; nested exception is java.rmi.ServerException&#58; RemoteException occurred in server thread; nested exception is&#58; 
            	java.rmi.ServerException&#58; EJBException&#58;; nested exception is&#58; 
            	javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            java.rmi.ServerException&#58; RemoteException occurred in server thread; nested exception is&#58; 
            	java.rmi.ServerException&#58; EJBException&#58;; nested exception is&#58; 
            	javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at sun.rmi.server.UnicastServerRef.dispatch&#40;UnicastServerRef.java&#58;292&#41;
            
            	at sun.rmi.transport.Transport$1.run&#40;Transport.java&#58;148&#41;
            
            	at java.security.AccessController.doPrivileged&#40;Native Method&#41;
            
            	at sun.rmi.transport.Transport.serviceCall&#40;Transport.java&#58;144&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport.handleMessages&#40;TCPTransport.java&#58;460&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run&#40;TCPTransport.java&#58;701&#41;
            
            	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
            
            	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer&#40;StreamRemoteCall.java&#58;247&#41;
            
            	at sun.rmi.transport.StreamRemoteCall.executeCall&#40;StreamRemoteCall.java&#58;223&#41;
            
            	at sun.rmi.server.UnicastRef.invoke&#40;UnicastRef.java&#58;133&#41;
            
            	at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke&#40;Unknown Source&#41;
            
            	at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke&#40;JRMPInvokerProxy.java&#58;135&#41;
            
            	at org.jboss.invocation.InvokerInterceptor.invoke&#40;InvokerInterceptor.java&#58;96&#41;
            
            	at org.jboss.proxy.TransactionInterceptor.invoke&#40;TransactionInterceptor.java&#58;46&#41;
            
            	at org.jboss.proxy.SecurityInterceptor.invoke&#40;SecurityInterceptor.java&#58;45&#41;
            
            	at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke&#40;StatelessSessionInterceptor.java&#58;100&#41;
            
            	at org.jboss.proxy.ClientContainer.invoke&#40;ClientContainer.java&#58;85&#41;
            
            	at $Proxy2.myMethod&#40;Unknown Source&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.invoke&#40;SimpleRemoteSlsbInvokerInterceptor.java&#58;104&#41;
            
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;138&#41;
            
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;148&#41;
            
            	at $Proxy1.myMethod&#40;Unknown Source&#41;
            
            	at com.codethought.springejb.test.TestRemoteProxy.main&#40;TestRemoteProxy.java&#58;22&#41;
            
            Caused by&#58; java.rmi.ServerException&#58; EJBException&#58;; nested exception is&#58; 
            	javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at org.jboss.ejb.plugins.LogInterceptor.handleException&#40;LogInterceptor.java&#58;347&#41;
            
            	at org.jboss.ejb.plugins.LogInterceptor.invoke&#40;LogInterceptor.java&#58;195&#41;
            
            	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke&#40;ProxyFactoryFinderInterceptor.java&#58;122&#41;
            
            	at org.jboss.ejb.StatelessSessionContainer.internalInvoke&#40;StatelessSessionContainer.java&#58;331&#41;
            
            	at org.jboss.ejb.Container.invoke&#40;Container.java&#58;700&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke&#40;ReflectedMBeanDispatcher.java&#58;284&#41;
            
            	at org.jboss.mx.server.MBeanServerImpl.invoke&#40;MBeanServerImpl.java&#58;546&#41;
            
            	at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke&#40;JRMPInvoker.java&#58;367&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
            
            	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
            
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
            
            	at java.lang.reflect.Method.invoke&#40;Method.java&#58;324&#41;
            
            	at sun.rmi.server.UnicastServerRef.dispatch&#40;UnicastServerRef.java&#58;261&#41;
            
            	at sun.rmi.transport.Transport$1.run&#40;Transport.java&#58;148&#41;
            
            	at java.security.AccessController.doPrivileged&#40;Native Method&#41;
            
            	at sun.rmi.transport.Transport.serviceCall&#40;Transport.java&#58;144&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport.handleMessages&#40;TCPTransport.java&#58;460&#41;
            
            	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run&#40;TCPTransport.java&#58;701&#41;
            
            	at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
            
            Caused by&#58; javax.ejb.EJBException&#58; null; CausedByException is&#58;
            	Error registering bean with name 'cachedHomeProxy' defined in class path resource &#91;META-INF/servicelayer-applicationContext.xml&#93;&#58; Bean class &#91;org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean&#93; not found; nested exception is java.lang.ClassNotFoundException&#58; Unexpected error during load of&#58; org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean, msg=org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor
            
            	at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>&#40;StatelessSessionEnterpriseContext.java&#58;59&#41;
            
            	at org.jboss.ejb.plugins.StatelessSessionInstancePool.create&#40;StatelessSessionInstancePool.java&#58;35&#41;
            
            	at org.jboss.ejb.plugins.AbstractInstancePool.get&#40;AbstractInstancePool.java&#58;168&#41;
            
            	at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke&#40;StatelessSessionInstanceInterceptor.java&#58;58&#41;
            
            	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext&#40;AbstractTxInterceptor.java&#58;84&#41;
            
            	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions&#40;TxInterceptorCMT.java&#58;267&#41;
            
            	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke&#40;TxInterceptorCMT.java&#58;128&#41;
            
            	at org.jboss.ejb.plugins.SecurityInterceptor.invoke&#40;SecurityInterceptor.java&#58;118&#41;
            
            	at org.jboss.ejb.plugins.LogInterceptor.invoke&#40;LogInterceptor.java&#58;191&#41;
            
            	... 21 more
            
            Exception in thread "main"

            Comment


            • #7
              Looks like you're basing this off the integration test ejbtest sample. Does _that_ work for you?

              I don't think the ClassNotFoundException is actually referring to
              SimpleRemoteStatelessSessionProxyFactoryBean
              if you read the log carefully. The error occurs during the creation of it, but as far as I can tell the error is in the remote invocation.

              Regards,

              Comment


              • #8
                Colin,

                My code is based roughly on the sample code in CVS (seemed like a good place to start).

                I'll dig around in the sample code a bit more and see what I can find.

                I'll keep you posted.

                Comment


                • #9
                  Colin,

                  So far I the best I've been able to do is narrow down *where* the ClassNotFoundException is happening...

                  From DefaultXmlBeanDefinitionParser.java starting at line 259

                  Code:
                  if &#40;this.beanClassLoader != null&#41; &#123;
                  	Class clazz = Class.forName&#40;className, true, this.beanClassLoader&#41;;
                  	rbd = new RootBeanDefinition&#40;clazz, cargs, pvs&#41;;
                  &#125; else &#123;
                          rbd = new RootBeanDefinition&#40;className, cargs, pvs&#41;;
                  &#125;
                  The exception occurs when "className" is "org.springframework.ejb.access.SimpleRemoteStatel essSessionProxyFactoryBean"

                  Help...??

                  Comment


                  • #10
                    AAARGH!

                    I give up... :oops:

                    I've put the code on one of my servers in a ZIP file. The project is done in JBuilder, but should be easily sucked into eclipse. I've stared at this until my eyes are blurring. And I think I need one of the 'higher-powers' here to loan me a set of eyes.

                    http://mywebpages.comcast.net/daorri.../springEJB.zip

                    So far understanding this part of Spring is really frustrating me. Other parts I've used fine, but this... eeeesh.

                    Anyway, I'd appreciate any help you can give. The springEJB.html file in the project as some notes on how to run the test client that's included with it.

                    Comment


                    • #11
                      I tested your code, it works, you miss a jar

                      Originally posted by ElPapa
                      I give up... :oops:

                      I've put the code on one of my servers in a ZIP file. The project is done in JBuilder, but should be easily sucked into eclipse. I've stared at this until my eyes are blurring. And I think I need one of the 'higher-powers' here to loan me a set of eyes.

                      http://mywebpages.comcast.net/daorri.../springEJB.zip

                      So far understanding this part of Spring is really frustrating me. Other parts I've used fine, but this... eeeesh.

                      Anyway, I'd appreciate any help you can give. The springEJB.html file in the project as some notes on how to run the test client that's included with it.
                      Hi, ElPapa:
                      I downloaded your code, and tested, finally I made it works, let me explain:
                      1. I deployed your code to weblogic 8.1,
                      in MANIFEST.MF add depended reference:
                      Class-Path: srping.jar log4j-1.2.8.jar commons-logging.jar commons-collections-2.1.1.jar, and put jars inside EJBModule.jar, and
                      weblogic-jar.xml:<weblogic-ejb-jar>

                      <weblogic-enterprise-bean>

                      <ejb-name>SimpleEJB</ejb-name>
                      <jndi-name>SimpleEJB</jndi-name>

                      </weblogic-enterprise-bean>

                      </weblogic-ejb-jar>

                      same as jboss.xml, and then no luck, can not find spring.jar ...., can not deploy,
                      2. I put spring.jar,log4j-1.2.8.jar,common-logging.jar in server classpathg, it deployed,
                      3. I test you TestRemoteProxy, get Exception......

                      4. finnally I figure out, add aopalliance.jar in server classpath. it works.


                      Would you mind fixing my problem: why following structure, weblogic can not find the depended jars?

                      EJBModule.jar
                      |_pring.jar
                      |_log4j-1.2.8.jar
                      |_commons-logging.jar
                      |_aopalliance.jar
                      |_com
                      _codethought
                      _springejb
                      _SimpleEJB.class
                      _Simple*
                      |- META-INF
                      |_ ejb-jar.xml
                      |_ vendor-ejb-jar.xml
                      |_ Manifest.mf

                      ping Lu

                      Comment


                      • #12
                        pinglu,

                        THANKS!! That was perfect.

                        About your problem. I remember some odd 'quirks' about WebLogic's classloader. I'll have to do some reading and see what I can find. Have you tried putting everything in an EAR file? Have the EJB Jar contain NONE of the dependencies for the JAR file and instead include them in the EAR file along with the EJB JAR file.

                        That's what I do...

                        Comment


                        • #13
                          deploy as ear works!

                          Originally posted by ElPapa
                          pinglu,

                          THANKS!! That was perfect.

                          About your problem. I remember some odd 'quirks' about WebLogic's classloader. I'll have to do some reading and see what I can find. Have you tried putting everything in an EAR file? Have the EJB Jar contain NONE of the dependencies for the JAR file and instead include them in the EAR file along with the EJB JAR file.

                          That's what I do...
                          As you suggested I have EJB.jar without depend jar and put in a ear file, all the third party jars in APP-INF/lib
                          Simple.ear
                          -EJBMOdular.jar
                          -META-INF\application.xml
                          -APP-INF
                          -lib
                          spring.jar
                          common-logging.jar
                          aopanliance.jar
                          Thanks!

                          Ping

                          Comment


                          • #14
                            Yea I've found that EAR files make life a lot easier...

                            Comment

                            Working...
                            X