5 Replies Latest reply on Nov 11, 2008 7:15 AM by Ales Justin

    Spring WS problems

    --------------------- ------------------------ Newbie

      Hi.
      A had made a WS with Spring WS and I want to deploy it in a JBoss 4.2.
      I downloaded the horoscope example and jboss-spring-3.1 deployer.

      When I start de server a have this error:

      10:35:36,875 ERROR [MainDeployer] Could not create deployment: file:/I:/jboss-4.2.3.GA/server/default/deploy/jboss-spring-3.1.deployer
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.spring.deployment.SpringApplicationContextDeployer; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.spring.deployment.SpringApplicationContextDeployer)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
      at org.jboss.system.ServiceController.install(ServiceController.java:226)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:251)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
      at org.jboss.Main.boot(Main.java:200)
      at org.jboss.Main$1.run(Main.java:508)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.spring.deployment.SpringApplicationContextDeployer
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1204)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:451)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
      ... 81 more
      Some body can help me.
      Thanks.

        • 1. Re: Spring WS problems
          Ales Justin Master

          3.x version if meant for JBoss5.
          Try 2.1 - depending on which Spring version you use.

          • 2. Re: Spring WS problems
            --------------------- ------------------------ Newbie

            Ok.
            I downloaded Spring Deployer 2.1. I have jboss-spring-jdk5.deployer.
            Following the JBoss-Spring-Example I changed:

             <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
            

            for
             <interceptor class="org.jboss.spring.interceptor.SpringInjectionInterceptor" scope="PER_VM"/>
            

            and added:
            <typedef name="ejb3intercepted" expr="class(@javax.ejb.Interceptors) OR class(@javax.ejb.Interceptor) OR has(* *->@javax.ejb.AroundInvoke(..))"/>
            

            and
             <domain name="Stateless Bean"> <bind pointcut="execution(*->new(..))">
             <interceptor-ref name="org.jboss.spring.interceptor.SpringInjectionInterceptor"/>
             </bind>
            


            But now I have the next error:
            12:04:20,734 ERROR [STDERR] [error] unable to resolve interceptor-ref: org.jboss.ejb3.AllowedOperationsInterceptor file:/I:/jboss-4.2.3.GA/server/default/tmp/deploy/tmp56461ejb3-interceptors-aop.xml
            12:04:20,734 ERROR [STDERR] java.lang.RuntimeException: java.lang.RuntimeException: unable to resolve interceptor-ref: org.jboss.ejb3.AllowedOperationsInterceptor
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:892)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deploy(AspectXmlLoader.java:1210)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1236)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.deployment.AspectDeployer.create(AspectDeployer.java:177)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            12:04:20,734 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            12:04:20,734 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            12:04:20,734 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            12:04:20,734 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            12:04:20,734 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
            12:04:20,734 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
            12:04:20,734 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            12:04:20,734 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            12:04:20,734 ERROR [STDERR] at $Proxy0.start(Unknown Source)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
            12:04:20,734 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            12:04:20,734 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            12:04:20,734 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            12:04:20,734 ERROR [STDERR] at $Proxy4.start(Unknown Source)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            12:04:20,734 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
            12:04:20,734 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            12:04:20,734 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            12:04:20,734 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            12:04:20,734 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            12:04:20,734 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            12:04:20,734 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
            12:04:20,734 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
            12:04:20,734 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
            12:04:20,734 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:508)
            12:04:20,734 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
            12:04:20,734 ERROR [STDERR] Caused by: java.lang.RuntimeException: unable to resolve interceptor-ref: org.jboss.ejb3.AllowedOperationsInterceptor
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.loadInterceptors(AspectXmlLoader.java:370)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployBinding(AspectXmlLoader.java:274)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1038)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployDomain(AspectXmlLoader.java:952)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1066)
            12:04:20,734 ERROR [STDERR] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:886)
            12:04:20,734 ERROR [STDERR] ... 71 more

            Thanks, a lot.

            • 3. Re: Spring WS problems
              Ales Justin Master

              Dunno.
              This is beyond this forum --> not AOP forum. ;-)
              And it's been a while since I had a look at that, to be honest. :-(

              Either use plain @EJB3 interceptors.
              Or read here how I did it back in the days. :-)
              - http://java.sys-con.com/read/180386.htm

              • 4. Re: Spring WS problems
                --------------------- ------------------------ Newbie

                I deployed de war into /deploy and it seams to work without deployer ??.
                Thank a lot for your time...:-).

                • 5. Re: Spring WS problems
                  Ales Justin Master

                   

                  "robertogil77" wrote:
                  I deployed de war into /deploy and it seams to work without deployer ??.

                  War?
                  Spring-deployer, in its simplest form/usecase, is meant to bind EJBs and fine-grained Spring beans.
                  For a simple .war + Spring beans you don't need it. ;-)