4 Replies Latest reply on Feb 18, 2011 7:18 AM by Andre Hofstetter

    Error changing from JBoss 6M3 to Final

    Marcos Simón Newbie

      Hi,

       

      First, I want to say that I am not sure if it is the correct forum to write this, if it isn't, please somebody says me the correct and I will rewrite it.

       

      And now I´m goint to explain my strange situation.  I have got a web application with JSF 2.0 and Spring 2.5.6, that it was run in JBoss 6M3, but now I have to chage to JBoss 6 Final, and the problem has come.

       

      Inside a service is defined with spring, it call a external webservice, that it works fine wit JBoss 6M3.

       

      But when I deploy my application in JBoss 6 Final and I call de webservice the application return the next exception:

       

      GRAVE [javax.enterprise.resource.webcontainer.jsf.application] java.lang.NoClassDefFoundError: org/springframework/beans/BeansException: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException

                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:98) [:2.0.3-FCS]

                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) [:2.0.3-FCS]

                at javax.faces.component.UICommand.broadcast(UICommand.java:311) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-FCS]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-FCS]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

                at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

      Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.getSpringBusFactory(JBossWSBusFactory.java:120) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.createBus(JBossWSBusFactory.java:54) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:69) [:3.4.1.GA]

                at javax.xml.ws.Service.<init>(Service.java:57) [:1.0.0.Final]

                at diz.relev3.integ.sicof2.IntegSicof2.<init>(IntegSicof2.java:43) [:]

                at diz.bean.PruebaBean.sinSpring(PruebaBean.java:44) [:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]

                at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [:6.0.0.Final]

                at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [:6.0.0.Final]

                at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102) [:2.0.3-FCS]

                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84) [:2.0.3-FCS]

                ... 27 more

      Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@1578426{vfs:///C:/Desarrollo/jboss-6.0.0.Final/server/default/conf/jboss-service.xml}

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_21]

                ... 41 more

       

       

      17:25:19,280 ADVERTENCIA [javax.enterprise.resource.webcontainer.jsf.lifecycle] #{prbean.sinSpring}: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException: javax.faces.FacesException: #{prbean.sinSpring}: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException

                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:114) [:2.0.3-FCS]

                at javax.faces.component.UICommand.broadcast(UICommand.java:311) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-FCS]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-FCS]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

                at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

      Caused by: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException

                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:98) [:2.0.3-FCS]

                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) [:2.0.3-FCS]

                ... 26 more

      Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.getSpringBusFactory(JBossWSBusFactory.java:120) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.createBus(JBossWSBusFactory.java:54) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:69) [:3.4.1.GA]

                at javax.xml.ws.Service.<init>(Service.java:57) [:1.0.0.Final]

                at diz.relev3.integ.sicof2.IntegSicof2.<init>(IntegSicof2.java:43) [:]

                at diz.bean.PruebaBean.sinSpring(PruebaBean.java:44) [:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]

                at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [:6.0.0.Final]

                at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [:6.0.0.Final]

                at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102) [:2.0.3-FCS]

                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84) [:2.0.3-FCS]

                ... 27 more

      Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@1578426{vfs:///C:/Desarrollo/jboss-6.0.0.Final/server/default/conf/jboss-service.xml}

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_21]

                ... 41 more

       

       

      17:25:19,286 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/pryPrueba].[Faces Servlet]] Servlet.service() para servlet Faces Servlet lanzó excepción: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@1578426{vfs:///C:/Desarrollo/jboss-6.0.0.Final/server/default/conf/jboss-service.xml}

                at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_21]

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.getSpringBusFactory(JBossWSBusFactory.java:120) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.createBus(JBossWSBusFactory.java:54) [:3.4.1.GA]

                at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:69) [:3.4.1.GA]

                at javax.xml.ws.Service.<init>(Service.java:57) [:1.0.0.Final]

                at diz.relev3.integ.sicof2.IntegSicof2.<init>(IntegSicof2.java:43) [:]

                at diz.bean.PruebaBean.sinSpring(PruebaBean.java:44) [:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]

                at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [:6.0.0.Final]

                at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [:6.0.0.Final]

                at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102) [:2.0.3-FCS]

                at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84) [:2.0.3-FCS]

                at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98) [:2.0.3-FCS]

                at javax.faces.component.UICommand.broadcast(UICommand.java:311) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781) [:2.0.3-FCS]

                at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-FCS]

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-FCS]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-FCS]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]

                at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]

                at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]

                at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

       

       

       

      At first, I thought the problem was in spring and I was looking for the solution in this way. But debugging I have found that the exception is throw at the moment I instantiate the Service class (I attach it), and the others services work correctly.

       

      But if I take out spring completely, the exception doesn't appear and it works fine. And for more extrange (at least for me) if I just only put the spring library (spring.2.5.6.SEC01.jar) without modfiy the web.xml and faces-config.xml the exception appears again !!!

       

      I don't understand how it could happen.

       

      In my opinion, there is a problem in the call service, it send an unknow exception therefore spring show this exception (java.lang.NoClassDefFoundError), but I don't know how I can see the excepcion completely (when I debug step by step, the exception is launched in a binary file).

       

      I hope somebody suggests some idea to solve the problem.

       

      Thanks in advance,

       

      Marcos

        • 1. Error changing from JBoss 6M3 to Final
          Marcos Simón Newbie

          An important information I had forgotten is the code is executed between try/ catch code with Exception, but the exception isn't catched.

          • 2. Error changing from JBoss 6M3 to Final
            Marcos Simón Newbie

            And I have created an desktop application with spring and it´s works fine.  I can call the webservice correclty.

            • 3. Error changing from JBoss 6M3 to Final
              Marcos Simón Newbie

              At the end I have found a workarournd but not fix the problem completly.

               

              I have changed my IntegSicof2.java class like this:

               

              import java.net.MalformedURLException;

              import java.net.URL;

               

               

              import org.apache.cxf.interceptor.LoggingOutInterceptor;

              import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

               

               

              import diz.relev3.integ.sicof2.IntegSicof2SOAP;

               

               

              public final class IntegSicof2{

                 

                  private final static String INTEG_SICOF2_ENDPOINT_ADDRESS = "http://10.1.1.2:8080/integ_sicof2/servicios";

               

               

                         public static IntegSicof2SOAP createClient() throws MalformedURLException {

               

               

                                  URL serviceUrl = new URL(INTEG_SICOF2_ENDPOINT_ADDRESS);

               

                                  JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

                                  factory.setAddress(serviceUrl.toString());

                                  factory.setServiceClass(IntegSicof2SOAP.class);

               

                                  // Opcional - request and response traces in the server.log

                                  addLogging(factory);

                                  // create the client

                                  IntegSicof2SOAP port = (IntegSicof2SOAP) factory.create();

               

               

                                  return port;

                        }

               

                        private static void addLogging(JaxWsProxyFactoryBean factory) {

                                  factory.getOutInterceptors().add(new LoggingOutInterceptor()); // SOAP

                         }

              }

               

              This way no one exception is thrown, and my application works fine.

               

              I try to find out what is wrong with the original class, and why I cannot catch de Exception.

               

              Thaks to read to me, and I hope it is useful in the future for somebody

              1 of 1 people found this helpful
              • 4. Error changing from JBoss 6M3 to Final
                Andre Hofstetter Newbie

                Hi Marcos

                 

                For a workaround see http://community.jboss.org/message/580660

                 

                You have to copy some Spring JARs to ${JBoss}/common/lib if your application uses spring.

                 

                Hope this helps!

                 

                André