Project

General

Profile

Actions

Bug #10050

closed

Operation logs tab is not loading with MSSQL db

Added by Kavin Prathaban over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
None
Category:
-
Start date:
04/05/2023
Due date:
% Done:

100%

Estimated time:
Device Type:
Component:
Type:

Description

Prerequisites
none

Steps
  1. try to enroll a device in with database as MSSQL
  2. try viewing operations log tag after enrolment

Expectation/Description
Device is enrolled. getting a error when trying to open operations logs tab.

Environment
Ubuntu, database : MSSQL

Error log

[2023-05-04 18:50:11,295] ERROR - DeviceManagementServiceImpl Error occurred while fetching the operations for the 'android' device, which carries the id '35946c5222c7e3f3'
org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException: Error occurred while retrieving the list of operations assigned for 'android' device '35946c5222c7e3f3'
    at org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl.getOperations(OperationManagerImpl.java:657) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    at org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl.getOperations(DeviceManagementProviderServiceImpl.java:2320) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    at org.wso2.carbon.device.mgt.jaxrs.service.impl.DeviceManagementServiceImpl.getDeviceOperations(DeviceManagementServiceImpl.java:1118) [classes/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) [cxf-rt-frontend-jaxrs-3.5.0.jar:3.5.0]
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) [cxf-rt-frontend-jaxrs-3.5.0.jar:3.5.0]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) [tomcat-servlet-api_9.0.52.wso2v1.jar:?]
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279) [cxf-rt-transports-http-3.5.0.jar:3.5.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat_9.0.52.wso2v2.jar:?]
    at org.wso2.carbon.device.mgt.jaxrs.ApiOriginFilter.doFilter(ApiOriginFilter.java:33) [classes/:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat_9.0.52.wso2v2.jar:?]
    at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53) [org.wso2.carbon.ui_4.6.2.284.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:667) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat_9.0.52.wso2v2.jar:?]
    at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:107) [org.wso2.carbon.identity.context.rewrite.valve_1.4.25.jar:?]
    at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110) [org.wso2.carbon.identity.authz.valve_1.4.25.jar:?]
    at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:105) [org.wso2.carbon.identity.auth.valve_1.4.25.14.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:101) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.processRequest(WebappAuthenticationValve.java:302) [org.wso2.carbon.webapp.authenticator.framework_5.0.18.jar:?]
    at org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:179) [org.wso2.carbon.webapp.authenticator.framework_5.0.18.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) [tomcat_9.0.52.wso2v2.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:59) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:126) [org.wso2.carbon.tomcat.ext_4.6.2.168.jar:?]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat_9.0.52.wso2v2.jar:?]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat_9.0.52.wso2v2.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]
Caused by: org.wso2.carbon.device.mgt.core.operation.mgt.dao.OperationManagementDAOException: SQL error occurred while retrieving the operations available for the device '4'
    at org.wso2.carbon.device.mgt.core.operation.mgt.dao.impl.operation.SQLServerOperationDAOImpl.getOperationsForDevice(SQLServerOperationDAOImpl.java:210) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    at org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl.getOperations(OperationManagerImpl.java:644) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    ... 66 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from bigint to TIMESTAMP is unsupported.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.DataTypes.throwConversionError(DataTypes.java:1112) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:3706) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:247) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:190) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2073) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2059) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getTimestamp(SQLServerResultSet.java:2639) ~[mssql-jdbc-11.2.1.jre8.jar:?]
    at org.wso2.carbon.device.mgt.core.operation.mgt.dao.impl.operation.SQLServerOperationDAOImpl.getOperationsForDevice(SQLServerOperationDAOImpl.java:195) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    at org.wso2.carbon.device.mgt.core.operation.mgt.OperationManagerImpl.getOperations(OperationManagerImpl.java:644) ~[org.wso2.carbon.device.mgt.core_5.0.18.jar:?]
    ... 66 more
[2023-05-04 18:50:11,327] ERROR - HandlerUtil Received 500 response for http request : GET https://localhost:8243/api/device-mgt/v1.0/devices/android/35946c5222c7e3f3/operations?owner=admin&offset=0&limit=10. Error message: {"message":"Error occurred while fetching the operations for the \u0027android\u0027 device, which carries the id \u002735946c5222c7e3f3\u0027","errorItems":[]}
[2023-05-04 18:50:11,327] ERROR - InvokerHandler Error occurred while invoking the GET API endpoint.


Files

Actions #1

Updated by Kavin Prathaban over 1 year ago

  • Status changed from New to Implementation
Actions #2

Updated by Kavin Prathaban over 1 year ago

  • % Done changed from 0 to 100
Actions #3

Updated by Arshana Atapattu over 1 year ago

  • Status changed from Implementation to QA Accept
Actions #4

Updated by Arshana Atapattu over 1 year ago

This is working.

Actions #5

Updated by Arshana Atapattu over 1 year ago

  • Status changed from QA Accept to Closed

Closing due to QA accept

Actions

Also available in: Atom PDF