无法创建类javax.xml.parsers.DocumentBuilderFactory的提供程序

时间:2018-07-26 12:55:03

标签: java maven spring-mvc cxf

我有一个基于Maven的Spring MVC应用程序。我使用Apache CXF maven插件从WSDL链接生成类:

RewriteEngine On 
RewriteBase / 

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] 
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] 

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)/$ /$1 [R,L] 

RewriteCond $1 !^(index\.php) 
RewriteCond %{REQUEST_URI} !(\.png|\.jpg)$ 
RewriteRule ^(.*)$ index.php?l=$1 [L] 

RewriteCond %{THE_REQUEST} ^GET\ /(.+)\.html [NC] 
RewriteRule ^ /%1? [R=301,L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^([^\.]+)$ $1.html [NC,L]

它有效,除非我包含jar依赖项:

           <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>generate-sources-asan</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>http://servicelink:8080/DemoService?wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-p</extraarg>
                                        <extraarg>com.demo.webservice</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

在这种情况下, <dependency> <groupId>com.asan</groupId> <artifactId>mis-toolkit</artifactId> <version>2.1.5</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/my-lib.jar</systemPath> </dependency> 命令给出以下错误:

mvn clean install

看起来像jar文件包含与CXF插件冲突的内容。那么如何定义问题所在呢?以及如何消除这个问题?

0 个答案:

没有答案