dkulp wrote:
> 
> On Tue March 10 2009 3:10:20 pm RayKnight wrote:
>> Using CXF 2.1.4 and the maven plugin for wsdl2java I add the wsdlLocation
>> flag with a value of META-INF/wsdl.  This causes a BUILD ERROR with a
>> java.lang.NullPointerException.  Removing the wsdlLocation flag and the
>> client builds correctly.  I also tried using a value of
>> META-INF/wsdl/BpsReport.wsdl which results in the same error.  Is there a
>> bug in 2.1.4 that causes this?  Or am I missing something here?
>>
> 
> Can you show your plugin config as well as the stack trace on the 
> NullPointerException?
> 
> Thanks!
> Dan
> 
> 
> -- 
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
> 
> 

Plug config is as follows:



<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.1.4</version>
    <executions>
        <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
                  
<sourceRoot>${project.build.outputDirectory}</sourceRoot>
                  <wsdlOptions>
                        <wsdlOption>
                                
<wsdl>${basedir}/src/main/resources/BpsReport.wsdl</wsdl>
                                <dataBinding>xmlbeans</dataBinding>
                                
<wsdlLocation>META-INF/wsdl</wsdlLocation>
                                <extraargs>
                                        <extraarg>-client</extraarg>
                                        
<extraarg>-verbose</extraarg>
                                        <extraarg>-p</extraarg>
                                
<extraarg>com.seisint.webservices.wsAccurint</extraarg>
                                </extraargs>
                        </wsdlOption>
                  </wsdlOptions>
            </configuration>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
        </execution>
    </executions>
</plugin>



Ouput from mvn -X install


[DEBUG] Calling wsdl2java with args: [-verbose, -d, C:\Documents and
Settings\euyqd30\Workspaces\MyEclipse
7.0\cds-accurint-bpsreport-ws-client\target\classes, -db, xmlbeans, -client,
-p, com.seisint.webservices.wsAccurint, -wsdlLocation, META-INF/wsdl,
file:/C:/Documents%20and%20Settings/euyqd30/Workspaces/MyEclipse%207.0/cds-accurint-bpsreport-ws-client/src/main/resources/BpsReport.wsdl]
Loading FrontEnd jaxws ...
Loading DataBinding xmlbeans ...
wsdl2java -verbose -d C:\Documents and Settings\euyqd30\Workspaces\MyEclipse
7.0\cds-accurint-bpsreport-ws-client\target\classes -db xmlbeans -client -p
com.seisint.webservices.wsAccurint -wsdlLocation META-INF/wsdl
file:/C:/Documents%20and%20Settings/euyqd30/Workspaces/MyEclipse%207.0/cds-accurint-bpsreport-ws-client/src/main/resources/BpsReport.wsdl
wsdl2java - Apache CXF 2.1.4

Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing org.apache.cxf.bus.spring.busapplicationcont...@1d9e5ad:
display name [org.apache.cxf.bus.spring.busapplicationcont...@1d9e5ad];
startup date [Wed Mar 11 11:16:45 EDT 2009]; root of context hierarchy
Mar 11, 2009 11:16:45 AM org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
INFO: Bean factory for application context
[org.apache.cxf.bus.spring.busapplicationcont...@1d9e5ad]:
org.springframework.beans.factory.support.defaultlistablebeanfact...@1412b61
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
Mar 11, 2009 11:16:45 AM
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
Mar 11, 2009 11:16:45 AM
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.defaultlistablebeanfact...@1412b61:
defining beans
[cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry];
root of factory hierarchy
Mar 11, 2009 11:16:47 AM
org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing org.apache.cxf.bus.spring.busapplicationcont...@1d9e5ad:
display name [org.apache.cxf.bus.spring.busapplicationcont...@1d9e5ad];
startup date [Wed Mar 11 11:16:45 EDT 2009]; root of context hierarchy
Mar 11, 2009 11:16:47 AM
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
destroySingletons
INFO: Destroying singletons in
org.springframework.beans.factory.support.defaultlistablebeanfact...@1412b61:
defining beans
[cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry];
root of factory hierarchy
[DEBUG] 
org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:240)
        at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
        at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:360)
        at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:257)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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: java.lang.NullPointerException
        at 
org.apache.xmlbeans.impl.schema.StscState.addError(StscState.java:387)
        at
org.apache.cxf.xmlbeans.tools.XMLBeansToolingDataBinding.loadTypeSystem(XMLBeansToolingDataBinding.java:259)
        at
org.apache.cxf.xmlbeans.tools.XMLBeansToolingDataBinding.initialize(XMLBeansToolingDataBinding.java:100)
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:536)
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:187)
        at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
        ... 22 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] java.lang.NullPointerException

[INFO]
------------------------------------------------------------------------

-- 
View this message in context: 
http://www.nabble.com/How-to-avoid-to-generate-hard-coded-wsdl-file-reference---wsdl2java-tp22349214p22457536.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to