WSDLToJava Error while upgrading Apache CXF

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WSDLToJava Error while upgrading Apache CXF

ragul rangarajan
Hi All,

<https://stackoverflow.com/posts/64911024/timeline>

I am upgrading Apache CXF from 3.2.14 to 3.3.8 where I got stuck with the
below exception while building wdsl client.

[echo] TOTAL_MIB_ISAM_3.1.0.7.txt
     [java] Nov 19, 2020 4:26:42 PM
org.apache.velocity.runtime.log.JdkLogChute log
     [java] SEVERE: ResourceManager : unable to find resource
'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm' in any
resource loader.
     [java]
     [java] WSDLToJava Error: Could not find Velocity template file:
org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
     [java]
     [java] org.apache.cxf.tools.common.ToolException: Could not find
Velocity template file:
org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
     [java]     at
org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:101)
     [java]     at
org.apache.cxf.tools.wsdlto.core.AbstractGenerator.doWrite(AbstractGenerator.java:54)
     [java]     at
org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.FaultGenerator.generate(FaultGenerator.java:133)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:288)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:156)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:404)
     [java]     at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
     [java]     at
org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)
     [java] Caused by:
org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource 'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm'
     [java]     at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
     [java]     at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
     [java]     at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
     [java]     at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
     [java]     at
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:299)
     [java]     at
org.apache.velocity.app.Velocity.getTemplate(Velocity.java:358)
     [java]     at
org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:98)
     [java]     ... 9 more
[INFO] ------------------------------------------------------------------------


Using the below task to generate WDSL client using WSDLToJava and specified
all cxf related jars in its cxf.classpath. But still it couldn't find the
resource in 'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm'

*cxf.xml*

  <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true"
failonerror="true">
       <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
       <jvmarg value="-Dorg.apache.cxf.stax.allowInsecureParser=true"/>
       <arg line="${cxf_args}"/>
       <classpath>
           <path refid="cxf.classpath"/>
       </classpath>
  </java>
<path id="cxf.classpath">
        <fileset file="${org.apache.cxf:cxf-common-schemas:jar}"/>
        <fileset file="${org.apache.cxf:cxf-core:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-bindings-soap:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-bindings-xml:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-databinding-jaxb:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-frontend-jaxrs:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-frontend-jaxws:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-frontend-simple:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-rs-client:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-transports-http:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-transports-http-jetty:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-transports-local:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-ws-addr:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-wsdl:jar}"/>
        <fileset file="${org.apache.cxf:cxf-rt-ws-policy:jar}"/>
        <fileset file="${org.apache.cxf:cxf-tools-common:jar}"/>
        <fileset file="${org.apache.cxf:cxf-tools-validator:jar}"/>
        <fileset file="${org.apache.cxf:cxf-tools-wsdlto-core:jar}"/>
        <fileset
file="${org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:jar}"/>
        <fileset file="${org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:jar}"/>
        ....</path>

Can you please help me with the above issue?

- I Have added Frontend-jaxws jar where the fault.vm files reside But
still, it fails.

  Do I need any other dependency to be added?


*Thanks and Regards*

*Ragul R*
Reply | Threaded
Open this post in threaded view
|

Re: WSDLToJava Error while upgrading Apache CXF

ragul rangarajan
Hi All,

Can anyone please help me with the problem?
Is there any information needed?

*Thanks and Regards*

*Ragul R*


On Thu, Nov 19, 2020 at 7:36 PM ragul rangarajan <[hidden email]>
wrote:

> Hi All,
>
> <https://stackoverflow.com/posts/64911024/timeline>
>
> I am upgrading Apache CXF from 3.2.14 to 3.3.8 where I got stuck with the
> below exception while building wdsl client.
>
> [echo] TOTAL_MIB_ISAM_3.1.0.7.txt
>      [java] Nov 19, 2020 4:26:42 PM org.apache.velocity.runtime.log.JdkLogChute log
>      [java] SEVERE: ResourceManager : unable to find resource 'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm' in any resource loader.
>      [java]
>      [java] WSDLToJava Error: Could not find Velocity template file: org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
>      [java]
>      [java] org.apache.cxf.tools.common.ToolException: Could not find Velocity template file: org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
>      [java]     at org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:101)
>      [java]     at org.apache.cxf.tools.wsdlto.core.AbstractGenerator.doWrite(AbstractGenerator.java:54)
>      [java]     at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.FaultGenerator.generate(FaultGenerator.java:133)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:288)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:156)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:404)
>      [java]     at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>      [java]     at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)
>      [java] Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm'
>      [java]     at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
>      [java]     at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
>      [java]     at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
>      [java]     at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
>      [java]     at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:299)
>      [java]     at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:358)
>      [java]     at org.apache.cxf.tools.common.VelocityGenerator.doWrite(VelocityGenerator.java:98)
>      [java]     ... 9 more
> [INFO] ------------------------------------------------------------------------
>
>
> Using the below task to generate WDSL client using WSDLToJava and
> specified all cxf related jars in its cxf.classpath. But still it couldn't
> find the resource in
> 'org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm'
>
> *cxf.xml*
>
>   <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true" failonerror="true">
>        <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
>        <jvmarg value="-Dorg.apache.cxf.stax.allowInsecureParser=true"/>
>        <arg line="${cxf_args}"/>
>        <classpath>
>            <path refid="cxf.classpath"/>
>        </classpath>
>   </java>
> <path id="cxf.classpath">
>         <fileset file="${org.apache.cxf:cxf-common-schemas:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-core:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-bindings-soap:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-bindings-xml:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-databinding-jaxb:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-frontend-jaxrs:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-frontend-jaxws:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-frontend-simple:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-rs-client:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-transports-http:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-transports-http-jetty:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-transports-local:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-ws-addr:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-wsdl:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-rt-ws-policy:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-tools-common:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-tools-validator:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-tools-wsdlto-core:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:jar}"/>
>         <fileset file="${org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:jar}"/>
>         ....</path>
>
> Can you please help me with the above issue?
>
> - I Have added Frontend-jaxws jar where the fault.vm files reside But
> still, it fails.
>
>   Do I need any other dependency to be added?
>
>
> *Thanks and Regards*
>
> *Ragul R*
>