[ 
https://issues.apache.org/jira/browse/KNOX-2397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhangbutao updated KNOX-2397:
-----------------------------
    Description: 
knox  sometimes failed to start with error:
{code:java}
Caused by: java.lang.NoSuchMethodError: 
org.eclipse.persistence.internal.oxm.mappings.Field.setNestedArray(Z)VCaused 
by: java.lang.NoSuchMethodError: 
org.eclipse.persistence.internal.oxm.mappings.Field.setNestedArray(Z)V at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateCompositeCollectionMapping(MappingsGenerator.java:2258)
 at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateCollectionMapping(MappingsGenerator.java:1846)
 at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:807)
 at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2560)
 at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2517)
 at 
org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:254)
 at 
org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
 at 
org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:1002)
 at 
org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:995)
 at 
org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:922)
 at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:205) at 
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
 at 
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
 at 
org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
 at 
org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
 at 
org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
 at 
org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
 at 
org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:870)
 at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:205) at 
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498) at 
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171) at 
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131) at 
javax.xml.bind.ContextFinder.find(ContextFinder.java:293) at 
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) at 
org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:121)
 at 
org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:90)
 at 
org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
 at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:194) 
at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:164) at 
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at 
org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2273) ... 9 more{code}
 

Just like KNOX-1987, there are mixed version of 2.7.6 and 2.7.4 eclipse 
persistence jars in knox/dep folder:
{code:java}
eclipselink-2.7.6.jar
sdo-eclipselink-plugin-2.3.2.jar
jaxws-eclipselink-plugin-2.3.2.jar
org.eclipse.persistence.core-2.7.4.jar           
org.eclipse.persistence.sdo-2.7.4.jar
org.eclipse.persistence.asm-2.7.4.jar            
org.eclipse.persistence.moxy-2.7.4.jar
{code}
We should upgrade jaxws-ri from 2.3.2 to 2.3.3 so that eclipse persistence 
class will have the same 2.7.6 version.

> knox failed to start with error "java.lang.NoSuchMethodError: 
> org.eclipse.persistence.internal.oxm.mappings.Field.setNestedArray(Z)V"
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KNOX-2397
>                 URL: https://issues.apache.org/jira/browse/KNOX-2397
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 1.4.0
>            Reporter: zhangbutao
>            Priority: Major
>              Labels: patch
>             Fix For: 1.5.0
>
>         Attachments: KNOX-2397.1.patch
>
>
> knox  sometimes failed to start with error:
> {code:java}
> Caused by: java.lang.NoSuchMethodError: 
> org.eclipse.persistence.internal.oxm.mappings.Field.setNestedArray(Z)VCaused 
> by: java.lang.NoSuchMethodError: 
> org.eclipse.persistence.internal.oxm.mappings.Field.setNestedArray(Z)V at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateCompositeCollectionMapping(MappingsGenerator.java:2258)
>  at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateCollectionMapping(MappingsGenerator.java:1846)
>  at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:807)
>  at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2560)
>  at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2517)
>  at 
> org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:254)
>  at 
> org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:191)
>  at 
> org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:1002)
>  at 
> org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:995)
>  at 
> org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:922)
>  at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:205) at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
>  at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:122)
>  at 
> org.eclipse.persistence.jaxb.compiler.CompilerHelper.getXmlBindingsModelContext(CompilerHelper.java:491)
>  at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindings(JAXBContextFactory.java:310)
>  at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.processBindingFile(JAXBContextFactory.java:284)
>  at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.getXmlBindingsFromProperties(JAXBContextFactory.java:264)
>  at 
> org.eclipse.persistence.jaxb.JAXBContext$ContextPathInput.createContextState(JAXBContext.java:870)
>  at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:205) at 
> org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:131)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171) at 
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131) at 
> javax.xml.bind.ContextFinder.find(ContextFinder.java:293) at 
> javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) at 
> org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.getJAXBContext(DefaultTopologyService.java:121)
>  at 
> org.apache.knox.gateway.services.topology.impl.DefaultTopologyService.<clinit>(DefaultTopologyService.java:90)
>  at 
> org.apache.knox.gateway.services.CLIGatewayServices.init(CLIGatewayServices.java:88)
>  at org.apache.knox.gateway.util.KnoxCLI.initializeServices(KnoxCLI.java:194) 
> at org.apache.knox.gateway.util.KnoxCLI.run(KnoxCLI.java:164) at 
> org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at 
> org.apache.knox.gateway.util.KnoxCLI.main(KnoxCLI.java:2273) ... 9 more{code}
>  
> Just like KNOX-1987, there are mixed version of 2.7.6 and 2.7.4 eclipse 
> persistence jars in knox/dep folder:
> {code:java}
> eclipselink-2.7.6.jar
> sdo-eclipselink-plugin-2.3.2.jar
> jaxws-eclipselink-plugin-2.3.2.jar
> org.eclipse.persistence.core-2.7.4.jar           
> org.eclipse.persistence.sdo-2.7.4.jar
> org.eclipse.persistence.asm-2.7.4.jar            
> org.eclipse.persistence.moxy-2.7.4.jar
> {code}
> We should upgrade jaxws-ri from 2.3.2 to 2.3.3 so that eclipse persistence 
> class will have the same 2.7.6 version.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to