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

Dennis Kieselhorst reopened CXF-2057:
-------------------------------------


Tried the 2.2-SNAPSHOT...initialization failed:

Caused by: java.lang.NullPointerException
        at 
org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisDatabinding.java:406)
        at 
org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:285)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:371)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:422)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:190)
        at 
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
        at 
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
        ... 39 more


> java.sql.Date with alternative type binding causes ClassCastException
> ---------------------------------------------------------------------
>
>                 Key: CXF-2057
>                 URL: https://issues.apache.org/jira/browse/CXF-2057
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>         Environment: Java 1.5
>            Reporter: Dennis Kieselhorst
>            Assignee: Benson Margulies
>             Fix For: 2.2
>
>
> Put a java.sql.Date from a ResultSet in a DTO as java.util.Date. The value is 
> correctly serialized as xsd:dateTime.
> After adding the following mapping (found at 
> http://cwiki.apache.org/CXF20DOC/aegis-21.html), a ClassCastException is 
> thrown:
> <mappings xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>       <mapping>
>               <property name="birthday" 
>                       type="org.apache.cxf.aegis.type.basic.DateType" 
>                       typeName="xsd:date"/>
>       </mapping>
> </mappings>
> java.lang.ClassCastException: java.sql.Date
>         at 
> org.apache.cxf.aegis.type.java5.XMLGregorianCalendarType.writeObject(XMLGregorianCalendarType.java:54)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeElement(BeanType.java:377)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeObjectInternal(BeanType.java:356)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeObject(BeanType.java:293)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeElement(BeanType.java:377)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeObjectInternal(BeanType.java:356)
>         at 
> org.apache.cxf.aegis.type.basic.BeanType.writeObject(BeanType.java:293)
>         at 
> org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:92)
>         at 
> org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:43)
>         at 
> org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:113)
>         at 
> org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>         at 
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
>         at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>         at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>         at 
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
>         at 
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285)
>         at 
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168)
>         at 
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175)
>         at 
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
> I can create a testcase, if needed.

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

Reply via email to