cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Klimczak (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-2796) maven build fails once after clean but then succeeds
Date Wed, 30 Mar 2011 11:19:05 GMT

    [ https://issues.apache.org/jira/browse/CXF-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012920#comment-13012920
] 

Piotr Klimczak commented on CXF-2796:
-------------------------------------

This is what happens when i run clean install *either* or separately in my top parent project.
But when i run mvn clean install inside that project which failed to compile before (instead
of from top parent) everything works fine.

I have a suspicion that it may be caused because of two different projects running wsdl2java
goal (maven-codegen-plugin).

Here is my maven-codegen-plugin config:

            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>

                    <execution>
                        <id>Default Contract</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/jaxws/</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${basedir}/src/main/wsdl/contract.wsdl</wsdl>
                                    <wsdlLocation>\n</wsdlLocation>
                                    <bindingFiles>
                                        <bindingFile>${basedir}/src/main/wsdl/binding.xml</bindingFile>
                                    </bindingFiles>
                                    <extraargs>
                                        <extraarg>-quiet</extraarg>
                                        <extraarg>-impl</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Please note that <wsdlLocation>\n</wsdlLocation> is not causing the issue. This
is a workaround to @WebService.wsdlLocation property.



> maven build fails once after clean but then succeeds
> ----------------------------------------------------
>
>                 Key: CXF-2796
>                 URL: https://issues.apache.org/jira/browse/CXF-2796
>             Project: CXF
>          Issue Type: Bug
>          Components: Build system
>    Affects Versions: 2.2.7
>         Environment: java version "1.6.0_18"
> OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
> OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
>            Reporter: Bruce Edge
>              Labels: build, maven
>
> When I run:
>      mvn clean install
> It fails with this traceback:
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot
be cast to org.apache.xml.dtm.DTMManager
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: java.lang.ClassCastException:
org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: java.lang.ClassCastException:
org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.callWsdl2Java(WSDL2JavaMojo.java:409)
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:361)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         ... 17 more
> Caused by: org.apache.cxf.tools.common.ToolException: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:279)
>         at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>         at org.apache.cxf.maven_plugin.WSDL2JavaMojo.callWsdl2Java(WSDL2JavaMojo.java:406)
>         ... 20 more
> Caused by: java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault cannot
be cast to org.apache.xml.dtm.DTMManager
>         at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:137)
>         at org.apache.xpath.XPathContext.<init>(XPathContext.java:102)
>         at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
>         at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:224)
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:289)
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:289)
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:134)
>         at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:96)
>         at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:448)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:221)
>         at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
>         at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:374)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:578)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:228)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)
>         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
>         ... 24 more
> yet it I then run:
>     mvn install
> it succeeds:
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message