cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Tataryn (JIRA)" <>
Subject [jira] Updated: (CXF-2663) JAXBUtils.scanPackages - iterator returns null class
Date Mon, 08 Feb 2010 19:05:28 GMT


Craig Tataryn updated CXF-2663:


Patch which logs a message about class not being found in the XmlSeeAlso annotation, and doesn't
add the null class to the xmlschemas Set to avoid errors starting up the endpoint

> JAXBUtils.scanPackages - iterator returns null class
> ----------------------------------------------------
>                 Key: CXF-2663
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.6
>         Environment: $ mvn --version
> Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
> Java version: 1.6.0
> Java home: D:\Program Files\IBM\RAD75\jdk\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows xp" version: "5.1 build 2600 service pack 3" arch: "x86" Family: "windows"
>            Reporter: Craig Tataryn
>         Attachments: CXF Linked Hashset Problem Breakpoint Dump.txt, CXF LinkedHashset
> When starting up my endpoint such that the JAXB classes referenced from the endpoints
do not exist in the War project, but rather in a separate project on the classpath a strange
issue occurs.  Essentially the loop within JAXBUtils.scanPackages that loops over the "classes"
Set will get a "null" Class from the set.
> Attached is: 
> 1) sample project
> 2) screen shot of the missing class element during a debug session
> 3) dump of a conditional breakpoint which logs the class name of the class within the
loop until the class is null.
> 4) a possible patch to workaround the problem
> To run the project and reproduce the problem:
> 1) unzip the attached project file
> 2) change directories to the Pom project, execute mvn clean install
> 3) change directories to the War project, execute mvn jetty:run
> 4) you should see a stacktrace similar to this:
> {code}
> 2010-02-05 15:01:35.781::WARN:  Nested in org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'cspsEndpoint': Invocation of init method failed; nested exception
is java.lang.NullPointerException:
> java.lang.NullPointerException
>         at org.apache.cxf.common.util.PackageUtils.getPackageName(
>         at org.apache.cxf.jaxb.JAXBUtils.scanPackages(
>         at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(
>         at org.apache.cxf.jaxb.JAXBDataBinding.initialize(
>         at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(
>         at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(
>         at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(
>         at
>         at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
>         at org.apache.cxf.frontend.ServerFactoryBean.create(
>         at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(
>         at org.apache.cxf.jaxws.EndpointImpl.getServer(
>         at org.apache.cxf.jaxws.EndpointImpl.doPublish(
>         at org.apache.cxf.jaxws.EndpointImpl.publish(
>         at org.apache.cxf.jaxws.EndpointImpl.publish(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>         at java.lang.reflect.Method.invoke(
> {code}
> The patch which is attached might just mask the real underlying problem.  I'm not sure
if the problem is because the Set is being modified as its being iterated over.  I certainly
couldn't find a place where that was happening, but who knows.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message