1 2 Previous Next 19 Replies Latest reply: Oct 10, 2014 4:29 AM by Stefan Fagerström RSS

    Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)

    klind Newbie

      JBoss AS 7.1.1-final

      I did update WS according to

       

      https://community.jboss.org/wiki/JBossWS-Installation

       

      When I try to deploy a new ear file, I get the below error... if I restart the server I dont get the error

       

      Caused by: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException

              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:369)

              at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:67)

              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)

              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537)

              at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)

              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)

              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)

              at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              ... 5 more

      Caused by: java.lang.reflect.UndeclaredThrowableException

              at sun.proxy.$Proxy70.visitLabel(Unknown Source)

              at org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassGenerator.java:223)

              at org.apache.cxf.jaxws.WrapperClassGenerator.generate(WrapperClassGenerator.java:137)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanClass(JaxWsServiceFactoryBean.java:669)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:638)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:468)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536)

              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248)

              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)

              at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)

              at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)

              at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)

              at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454)

              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)

              ... 13 more

      Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)

              at java.lang.Class.getMethod(Class.java:1624) [rt.jar:1.7.0_13]

              at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)

              ... 28 more

        • 1. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
          cristib Newbie

          I have the same problem, but only when I redeploy the ear file.

          I hope that someone will give us a hint.

           

          Thank you ;.)

          • 2. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
            aldjinn Newbie

            Hi klind & Cristian,

            have you fixed this problem? I'm just migrating a bunch of applications and there is one CXF webservice which fails exactly in the same case during a redeployment.

             

            Regards,

            Aldjinn

            • 4. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
              aldjinn Newbie

              I think I found a solution but I'm not sure if this will work for you as well.

               

              This issue seems to be related to the own webservices subsystem of the JBoss AS 7. If a add the CFX jars to my WEB-INF/lib folder of my WAR file and use a jboss-deployment-structure.xml in the META-INF folder to avoid the usage of the webservices subsystem, the redeployment works well (for now):

               

              pom.xml

              <dependency>

                  <groupId>org.apache.cxf</groupId>

                  <artifactId>cxf-rt-frontend-jaxrs</artifactId>

                  <version>2.7.5</version>

                  <type>jar</type>

                  <scope>compile</scope>

              </dependency>

              <dependency>

                  <groupId>org.apache.cxf</groupId>

                  <artifactId>cxf-rt-frontend-jaxws</artifactId>

                  <version>2.7.5</version>

                  <type>jar</type>

                  <scope>compile</scope>

              </dependency>

              <dependency>

                  <groupId>org.apache.cxf</groupId>

                  <artifactId>cxf-rt-transports-http</artifactId>

                  <version>2.7.5</version>

                  <type>jar</type>

                  <scope>compile</scope>

              </dependency>

               

              jboss-deployment-structure.xml

              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

                  <deployment>

                      <exclude-subsystems>

                          <subsystem name="webservices" />

                      </exclude-subsystems>

                  </deployment>

              </jboss-deployment-structure>

               

              I think this isn't really good practive.

              • 6. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                Tomaz Cerar Master

                Why did you create jira for that? Original post has noting to do with 7.2 / EAP but with manually upgrading webservices stack on 7.1.1

                Also EAP jira is not used for support cases, but for entering bugs that have been identified as such on forums.

                If you need customer support, then enter support case on custom portal given you have support subscription.

                 

                In any case, please update original post with more details or create new thread with what your application looks like.

                especially output of

                jar tf <name-of-your-deployment>

                would be helpful.

                this way we can help with what is going on.

                • 7. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                  Alexander Orobey Newbie

                  Tomaz, as we can see problem happens not only in EAP, furthermore in our case this error don`t happen in 7.1.1

                  Right now our company on the way to purchase EAP version of Jboss (so don`t have support subscription yet) and during testing our Apps on EAP 6.1 we got troubles.

                  So, I'm confused. I can not create cases without  support subscription for EAP product, but we still looking for solution. i`ll update thread and provide required details as soon as possible. thx

                   


                  • 8. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                    Tomaz Cerar Master

                    Alexander Orobey noting wrong with discussing issues on community forums, just don't go creating issues in jira without first discussing them

                     

                    Again, can you describe your problem, as i doubt you need to upgrade WS stack in EAP 6.1 which is currently still the latest.

                    More information you provide better we can help you.

                    • 9. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                      Mario Brissette Newbie

                      I have the same problem here. We are migrating a lot of project from JBoss 5.1.0.GA to JBoss EAP 6.1. When redeploying a "converted" project in the new JBoss EAP 6.1, this error occurs

                       

                      Caused by: javax.xml.ws.WebServiceException: java.lang.reflect.UndeclaredThrowableException

                              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:368)

                              at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:67)

                              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250)

                              at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536)

                              at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)

                              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)

                              at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)

                              at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

                              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                              ... 5 more

                      Caused by: java.lang.reflect.UndeclaredThrowableException

                              at $Proxy22.visitLabel(Unknown Source)  at org.apache.cxf.jaxws.WrapperClassGenerator.createWrapperClass(WrapperClassGenerator.java:223)

                              at org.apache.cxf.jaxws.WrapperClassGenerator.generate(WrapperClassGenerator.java:137)

                              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanClass(JaxWsServiceFactoryBean.java:669)

                              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:638)

                              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:472)

                              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)

                              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)

                              at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)

                              at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)

                              at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)

                              at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)

                              at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)

                              at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:453)

                              at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:333)

                              ... 13 more

                      Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)

                              at java.lang.Class.getMethod(Class.java:1605) [rt.jar:1.6.0_35]

                              at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)

                              ... 28 more

                       

                      The only difference in my project between the two deployments (from JBoss 5.1.0.GA to EAP 6.1) is the new jboss-deployment-structure.xml file and I modified the pom file from this :

                      <dependency>

                           <groupId>org.jboss</groupId>

                           <artifactId>jbossws-native-core</artifactId>

                           <version>5.1.0.GA</version>

                           <scope>provided</scope>

                      </dependency>

                      <dependency>

                           <groupId>org.jboss.javaee</groupId>

                           <artifactId>jboss-javaee</artifactId>

                           <version>5.0.1.GA</version>

                           <type>pom</type>

                      </dependency>

                       

                      to this:

                      <dependency>

                      <groupId>org.jboss.ws.native</groupId>

                           <artifactId>jbossws-native-core</artifactId>

                           <version>4.1.1.Final</version>

                           <scope>provided</scope>

                      </dependency>

                      <dependency>

                           <groupId>javax</groupId>

                           <artifactId>javaee-api</artifactId>

                           <version>6.0</version>

                           <scope>provided</scope>

                      </dependency>

                       

                      maybe this is related to the newer version of jbossws-native-core library or one of its dependencies?

                       

                      My jboss-deployment-structure.xml file only contains the following tag:

                      <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

                      • 10. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                        Tomaz Cerar Master

                        What does you deployment look like? mostly i am interested in your lib(s).

                         

                        can you post output of

                        jar tf <name-of-your-deployment>

                        • 11. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                          Mario Brissette Newbie

                          I found a workaround for my problem. I have a multi-module maven project (One parent, one API, one EJB, one EAR which package all these). In my EJB project, I have a dependency with Kryo libraries. Kryo have also a dependency on asm-3.2.jar so this library is packaged in the lib folder of my EAR project. I excluded this transitive library from my pom to make sure no asm library is packaged in my EAR. It seems this library is conflicting with the asm module in JBoss 7. Maybe the asm module from JBoss7 is loaded by something triggered, like ejb3, as mentionned in the implicit modules dependency documentation. That's my impression.


                          But excluding any asm library from my pom worked for me. In Eclipse, in the Dependency Hierarchy tab of my pom.xml file, I make sure no asm library is packaged.

                          • 12. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                            Mario Brissette Newbie

                            I also noticed that the kryo-all-1.0.4.jar library have the org.objectweb.asm package with the same MethodWriter class in it and it is the same than the one in the asm library. I removed the kryo-all library from my project and use kryo instead(without the "all" classifier). It seems that the asm objects embedded in the kryo-all library are in conflict with those in the JBoss asm module.

                            • 13. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                              carlos camargo Newbie

                              Hi,

                              I have the same error in a new project. It passed when I included jbossws-cxf and try to use @EndpointConfig annotation in a service.

                               

                               

                              I included artifact on pom.xml:

                               

                               

                              <dependency>

                                <groupId>org.jboss.ws.cxf</groupId>

                                <artifactId>jbossws-cxf-client</artifactId>

                                <version>4.2.1.Final</version>

                              </dependency>

                               

                               

                              My Service was declared:

                               

                               

                              @WebService()

                              @EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "RNBD WS-Security Endpoint")

                              public class ConsultaRNBD {

                               

                               

                              }

                               

                               

                              the jaxws-endpoint-config.xml file has this content:

                               

                               

                              <?xml version="1.0" encoding="UTF-8"?>

                              <jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                xmlns:javaee="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">

                                <endpoint-config>

                                  <config-name>RNBD WS-Security Endpoint</config-name>

                                  <property>

                                    <property-name>ws-security.validate.token</property-name>

                                    <property-value>false</property-value>

                                  </property>

                                </endpoint-config>

                              </jaxws-config>

                               

                               

                              thanks in advance for any suggestion.

                               

                               

                              Carlos

                              • 14. Re: Caused by: java.lang.NoSuchMethodException: org.objectweb.asm.MethodWriter.visitLabel(org.objectweb.asm.Label)
                                Soundar Chennai Newbie

                                I have the similar issue. Were you able to fix the issue? Can you please suggest me some options? I don't have any asm jar files in my war file.

                                1 2 Previous Next