Incompatible neethi.jar with WAS 7

后端 未结 5 1322
情歌与酒
情歌与酒 2020-12-19 15:43

I am deploying one application Apache CXF-2.7.5 with neethi-3.0.2 in websphere 7. I am getting below error. My Application is spring driven. When I degraded Apache CXF to

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 16:20

    I had to make 'parent_last' class loading at web module level and delete following jar files from WAR:-

    geronimo-servlet_3.0_spec-1.0.jar
    geronimo-javamail_1.4_spec-1.7.1.jar
    stax-api-1.0.1.jar
    

    This is because of the AssertionBuilderFactory was an implementation in 2.0.5 version of neethi.jar but is an interface in 3.0.2 which we are using due to CXF 2.7.5.

    Since these jar files are automatically added at build time due to CXF dependencies, I think we'll have to manually delete these jars from WAR before deployment in WAS. Also with each deployment, we'll have to change Class Loader setting for our WAR.

    To change the Class Loader order, use following path:- Enterprise Applications > MyApplicationWAR > Manage Modules > MyApplicationWAR

    EDIT:

    You can do the same from your POM file using tag

    
                org.apache.cxf
                cxf-bundle-jaxrs
                ${cxf.version}
                
                    
                        org.apache.geronimo.specs
                        geronimo-javamail_1.4_spec
                    
                    
                        org.apache.geronimo.specs
                        geronimo-servlet_3.0_spec
                    
                
            
    
    
            
                org.codehaus.jettison
                jettison
                ${jettison.version}
                
                    
                        stax
                        stax-api
                    
                
            
    

提交回复
热议问题