You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (Updated) (JIRA)" <ji...@apache.org> on 2011/12/23 16:38:30 UTC

[jira] [Updated] (CXF-3997) java.lang.NullPointerException in org.apache.cxf.tools.wsdlto.WSDLToJava

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

Daniel Kulp updated CXF-3997:
-----------------------------

    Fix Version/s: NeedMoreInfo


I think I'd need to see a test case for this as I cannot reproduce it and also cannot see how it would be possible.   Looking into the javax.xml.bind.DatatypeConverter.printDateTime method, the only NPE that can be raised is if theConverter is null.  However, with the 2.1 version of the jaxb-api that is being picked up here, that doesn't seem possible.  theConverter is initialized via:

{code}
    private static DatatypeConverterInterface theConverter = new DatatypeConverterImpl();
{code}

and thus would not be null after the static initializer.  There is a "set" method that can be called, but that won't allow it to be set to null either:

{code}
    public static void setDatatypeConverter( DatatypeConverterInterface converter ) {
        if( converter == null ) {
            throw new IllegalArgumentException( 
                Messages.format( Messages.CONVERTER_MUST_NOT_BE_NULL ) );
 .....
{code}

Thus, I have no idea how this can be possible.
                
> java.lang.NullPointerException in org.apache.cxf.tools.wsdlto.WSDLToJava
> ------------------------------------------------------------------------
>
>                 Key: CXF-3997
>                 URL: https://issues.apache.org/jira/browse/CXF-3997
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>            Reporter: Vlad Karpov
>             Fix For: NeedMoreInfo
>
>
>     <target name="cxfWSDLToJava">
>         <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
>             <!--<arg value="-all"/>-->
>             <arg value="-client"/>
>             <arg value="-server"/>
>             <arg value="-impl"/>
>             <arg value="-verbose"/>
>             <!--<arg value="-v"/>-->
>             <arg value="-d"/>
>             <arg value="src"/>
>             <arg value="${basedir}/EIMA/web/WEB-INF/classes/wsdl/SpoService.wsdl"/>
>             <classpath>
>                 <path refid="library.cxf.classpath"/>
>                 <path refid="library.jaxb2.classpath"/>
>                 <path location="${basedir}/EIMA/web"/>
>             </classpath>
>         </java>
>     </target>
> cxfWSDLToJava
> java
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -client -server -impl -verbose -d src D:\Work\EIMA/EIMA/web/WEB-INF/classes/wsdl/SpoService.wsdl
> wsdl2java - Apache CXF 2.5.0
> WSDLToJava Error: java.lang.NullPointerException
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:294)
> 	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.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> Caused by: java.lang.NullPointerException
> 	at javax.xml.bind.DatatypeConverter.printDateTime(DatatypeConverter.java:534)
> 	at org.apache.cxf.tools.wsdlto.core.AbstractGenerator.setCommonAttributes(AbstractGenerator.java:108)
> 	at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.ClientGenerator.generate(ClientGenerator.java:107)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:258)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:286)
> 	... 4 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira