cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Oledzki (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2509) java.lang.reflect.GenericSignatureFormatError within JAXBContextInitializer
Date Fri, 30 Oct 2009 10:02:59 GMT
java.lang.reflect.GenericSignatureFormatError within JAXBContextInitializer
---------------------------------------------------------------------------

                 Key: CXF-2509
                 URL: https://issues.apache.org/jira/browse/CXF-2509
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.2.4
         Environment: jaxb-api-2.1.jar, jaxb-impl-2.1.11.jar
            Reporter: Grzegorz Oledzki


We have a bunch of web services started programmatically using:
{code}
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setServiceClass(serviceInterface);
factory.setServiceBean(serviceBean);
factory.setAddress(url);
...
factory.create();
{code}

Some of the services include a method which return type is generics:
{code}
public interface Service<DTO extends Entity<? extends Serializable>, QS extends QuerySummary>
extends ... {
QueryResult<DTO, QS> read(Query query, UserId uc);
...
}
{code}

After upgrading CXF to version 2.2.4 they no longer start. The exception thrown is:
{code}
java.lang.reflect.GenericSignatureFormatError
	at sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:103)
	at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:233)
	at sun.reflect.generics.parser.SignatureParser.parseTypeArgument(SignatureParser.java:319)
	at sun.reflect.generics.parser.SignatureParser.parseTypeArguments(SignatureParser.java:284)
	at sun.reflect.generics.parser.SignatureParser.parseSimpleClassTypeSignature(SignatureParser.java:260)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignatureSuffix(SignatureParser.java:270)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:244)
	at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:228)
	at sun.reflect.generics.parser.SignatureParser.parseTypeArgument(SignatureParser.java:319)
	at sun.reflect.generics.parser.SignatureParser.parseTypeArguments(SignatureParser.java:284)
	at sun.reflect.generics.parser.SignatureParser.parseSimpleClassTypeSignature(SignatureParser.java:260)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignatureSuffix(SignatureParser.java:270)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:244)
	at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:228)
	at sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:359)
	at sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:157)
	at sun.reflect.generics.repository.FieldRepository.parse(FieldRepository.java:34)
	at sun.reflect.generics.repository.FieldRepository.parse(FieldRepository.java:24)
	at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:56)
	at sun.reflect.generics.repository.FieldRepository.<init>(FieldRepository.java:30)
	at sun.reflect.generics.repository.FieldRepository.make(FieldRepository.java:48)
	at java.lang.reflect.Field.getGenericInfo(Field.java:85)
	at java.lang.reflect.Field.getGenericType(Field.java:223)
	at org.apache.cxf.jaxb.JAXBContextInitializer.walkReferences(JAXBContextInitializer.java:288)
	at org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitializer.java:244)
	at org.apache.cxf.jaxb.JAXBContextInitializer.begin(JAXBContextInitializer.java:151)
	at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:109)
	at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:74)
	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:322)
	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:398)
	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:525)
	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:461)
	at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:212)
	at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
	at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
	at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)
	at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167)
	at se.sync.util.services.factories.ServiceServerFactory.create(ServiceServerFactory.java:53)
{code}

After some debugging (namely setting a breakpoint in JAXBContextInitializer.walkReferences)
I could only observe that:
- under 2.2.3, the breakpoint was at JAXBContextInitializer.walkReferences:271, the f (Field)
value is:
{code}
private com.xxx.queryresult.QueryResult com.xxx.jaxws_asm.ReadResponse.queryResult
{code}
and its f.signature is NULL
- under 2.2.4, the breakpoint was at JAXBContextInitializer.walkReferences:288, the f (Field)
value is:
{code}
private com.xxx.queryresult.QueryResult com.xxx.jaxws_asm.ReadResponse.queryResult
{code}
which is the same, but its f.signature is very different:
{code}
Lcom/xxx/queryresult/QueryResult<Lcom/xxx/DTOEntity<null>;Lcom/xxx/QuerySummary;>;
{code}




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


Mime
View raw message