axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5356) Axis2 does not handle java.sql's Date, Time, and TimeStamp
Date Thu, 05 Jul 2012 22:14:35 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407542#comment-13407542
] 

nadir amra commented on AXIS2-5356:
-----------------------------------

Sagara,

That is fine by me, so we should not be mapping java.sql.* types to xsd date, time, and timestamp
in WSDL.  Thus we need to remove that mapping from the hash table, right?
                
> Axis2 does not handle java.sql's  Date, Time, and TimeStamp
> -----------------------------------------------------------
>
>                 Key: AXIS2-5356
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5356
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.6.2
>         Environment: Windows XP, Axis2 1.6.2
>            Reporter: nadir amra
>
> Axis2 blows up with the stack trace below when a Java class that has any of the following
classes as parameters in a method, or as a return value:
> java.sql.Date, java.sql.Time, java.sql.Timestamp.
> Here is the stack trace:
> [WARN] Unable to locate a BeanInfo cache for class java.sql.Date (stopClass=null). This
will negatively affect performance!
> [ERROR] Exception occurred while trying to invoke service method getSQLDate
> org.apache.axis2.AxisFault: java.sql.Date
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObjectSupplier.java:47)
> 	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:412)
> 	at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:818)
> 	at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:737)
> 	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:646)
> 	at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
> 	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:206)
> 	at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
> 	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
> 	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
> 	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> 	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
> 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.InstantiationException: java.sql.Date
> 	at java.lang.Class.newInstance0(Unknown Source)
> 	at java.lang.Class.newInstance(Unknown Source)
> 	at org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObjectSupplier.java:42)
> 	... 30 more
> And here is the simple class that I used:
> package sample;
> public class ServiceDateTime
> {
>     public java.util.Date getUtilDate(java.util.Date date)
>     {
>         return new java.util.Date();
>     }
>     public java.util.Calendar getUtilCalendar(java.util.Calendar dateTime)
>     {
>         return java.util.Calendar.getInstance();
>     }
>     
>     public java.sql.Date getSQLDate(java.sql.Date date)
>     {
>         return new java.sql.Date(2000);
>     }
>     public java.sql.Time getSQLTime(java.sql.Time time)
>     {
>         return new java.sql.Time(3000);
>     }    
>     public java.sql.Timestamp getSQLTimestamp(java.sql.Timestamp dateTime)
>     {
>         return new java.sql.Timestamp(4000);
>     }   
> }
> The generated WSDL file I suppose looks OK.  It maps the java.sql types Date, Time, and
Timestamp to date, or time. or dateTime. 
> If that is the case, then we should handle the conversion of the java.sql types.

--
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message