Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2301

java.lang.LinkageError: duplicate class definition: com/sun/xml/ws/security/secext10/SecurityHeaderType$JaxbAccessorF_any

XMLWordPrintable

    • Hide

      According to:

      http://forums.java.net/jive/thread.jspa?messageID=292311&#292311

      the workaround is to include -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true in JBOSS_HOME/bin/run.conf

      Here's the sample:

      1. JAXB linkage workaround
        JAVA_OPTS="$JAVA_OPTS -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true"
      Show
      According to: http://forums.java.net/jive/thread.jspa?messageID=292311&#292311 the workaround is to include -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true in JBOSS_HOME/bin/run.conf Here's the sample: JAXB linkage workaround JAVA_OPTS="$JAVA_OPTS -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true"

      When running webservices12 tck5 test suite, we're getting the following exception on server side:

      2008-09-16 14:11:24,148 DEBUG [com.sun.xml.bind.v2.runtime.reflect.opt.Injector:65] (RMI TCP Connection(2)-127.0.0.1) Unable to inject com/sun/xml/ws/security/secext10/SecurityHeaderType$JaxbAccessorF_any
      java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:181)
      at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:85)
      at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:87)
      at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:165)
      at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:253)
      at com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.java:65)
      at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty.java:84)
      at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.<init>(ArrayReferenceNodeProperty.java:80)
      at sun.reflect.GeneratedConstructorAccessor87.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
      at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:171)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:481)
      at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:315)
      at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
      at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:105)
      at com.sun.xml.ws.rm.RMVersion.<init>(RMVersion.java:118)
      at com.sun.xml.ws.rm.RMVersion.<clinit>(RMVersion.java:29)
      at com.sun.xml.ws.rm.jaxws.util.RMPolicyValidator.<clinit>(RMPolicyValidator.java:56)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at com.sun.xml.ws.policy.privateutil.ServiceFinder$LazyIterator.next(ServiceFinder.java:378)
      at com.sun.xml.ws.policy.privateutil.ServiceFinder.toArray(ServiceFinder.java:228)
      at com.sun.xml.ws.policy.privateutil.PolicyUtils$ServiceProvider.load(PolicyUtils.java:443)
      at com.sun.xml.ws.policy.AssertionValidationProcessor.<clinit>(AssertionValidationProcessor.java:55)
      at com.sun.xml.ws.policy.jaxws.WSDLPolicyMapWrapper.validateServerSidePolicies(WSDLPolicyMapWrapper.java:146)
      at com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:1266)
      at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:187)
      at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:334)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:230)
      at com.sun.xml.ws.server.EndpointFactory.getWSDLPort(EndpointFactory.java:509)
      at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:174)
      at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
      at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parseAdapters(DeploymentDescriptorParserExt.java:301)
      at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parse(DeploymentDescriptorParserExt.java:178)
      at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:110)
      at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:144)
      at org.jboss.wsf.container.jboss50.BareWSFRuntime.start(BareWSFRuntime.java:66)
      at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHookEJB.deploy(AbstractDeployerHookEJB.java:50)
      at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:62)
      at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:95)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1023)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
      at org.jboss.deployment.services.DeploymentManagerService.deploy_phase2(DeploymentManagerService.java:412)
      at org.jboss.deployment.services.DeploymentManagerService.deploy(DeploymentManagerService.java:295)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      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:668)
      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:585)
      at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:270)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
      at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      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:668)
      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:815)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:416)
      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:585)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      at sun.rmi.transport.Transport$1.run(Transport.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.LinkageError: duplicate class definition: com/sun/xml/ws/security/secext10/SecurityHeaderType$JaxbAccessorF_any
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
      ... 111 more

              Unassigned Unassigned
              ropalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: