import utility rest api related exceptions
Posted: 02 Jun 2017, 11:40
Hi,
For the purpose of importing external data into EA model, we have done a PoC on consuming import utility rest API through Microsoft C# based standalone application.
Here are the version details.
Essential import utility 1.6.5
Tomcat 7.0
We have configured Excel and XML import activities to import few test Technology_Product data.
Initially we downloaded essentialInstall6 released on April, 18th 2017.
Before testing Rest API through code, wanted to check through service request test forms provided with essential import utility pack. Excel based request form (serviceRequestForm.html) worked fine. But XML based request form (serviceRequestXMLForm.html) throws exception. Below are the details of exception.
======================================================
Exception thrown by import utility based on April, 18th installation:
======================================================
type Exception report
message com.enterprise_architecture.essential.importutility.service.ImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: com.enterprise_architecture.essential.importutility.service.ImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl
com.enterprise_architecture.essential.importutility.service.XmlImportService.getImportController(XmlImportService.java:821)
com.enterprise_architecture.essential.importutility.service.XmlImportService.doPost(XmlImportService.java:532)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
======================================================
Looks like an another release has been done on April, 28th and so downloaded that pack and established import utility. Before doing this renamed old version's name as essential_import_Utility1_6_5_old. The new web apps folder is essential_import_utility1_6_5.
Tested the rest api request forms of Excel and XML. Now Excel fails and XML works.
Below are the details of exception
======================================================
Exception thrown by import utility based on April, 28th installation:
======================================================
type Exception report
message com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.ImportServiceImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.ImportServiceImpl
com.enterprise_architecture.essential.importutility.service.ImportService.getImportController(ImportService.java:703)
com.enterprise_architecture.essential.importutility.service.ImportService.doPost(ImportService.java:612)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
======================================================
When using our C# based program also, the behaviour is similar.
Has anyone encountered such problems?
Please suggest if we are doing something wrong at our end.
Thanks.
Prem
For the purpose of importing external data into EA model, we have done a PoC on consuming import utility rest API through Microsoft C# based standalone application.
Here are the version details.
Essential import utility 1.6.5
Tomcat 7.0
We have configured Excel and XML import activities to import few test Technology_Product data.
Initially we downloaded essentialInstall6 released on April, 18th 2017.
Before testing Rest API through code, wanted to check through service request test forms provided with essential import utility pack. Excel based request form (serviceRequestForm.html) worked fine. But XML based request form (serviceRequestXMLForm.html) throws exception. Below are the details of exception.
======================================================
Exception thrown by import utility based on April, 18th installation:
======================================================
type Exception report
message com.enterprise_architecture.essential.importutility.service.ImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: com.enterprise_architecture.essential.importutility.service.ImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl
com.enterprise_architecture.essential.importutility.service.XmlImportService.getImportController(XmlImportService.java:821)
com.enterprise_architecture.essential.importutility.service.XmlImportService.doPost(XmlImportService.java:532)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
======================================================
Looks like an another release has been done on April, 28th and so downloaded that pack and established import utility. Before doing this renamed old version's name as essential_import_Utility1_6_5_old. The new web apps folder is essential_import_utility1_6_5.
Tested the rest api request forms of Excel and XML. Now Excel fails and XML works.
Below are the details of exception
======================================================
Exception thrown by import utility based on April, 28th installation:
======================================================
type Exception report
message com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.ImportServiceImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.ClassCastException: com.enterprise_architecture.essential.importutility.service.XmlImportServiceImpl cannot be cast to com.enterprise_architecture.essential.importutility.service.ImportServiceImpl
com.enterprise_architecture.essential.importutility.service.ImportService.getImportController(ImportService.java:703)
com.enterprise_architecture.essential.importutility.service.ImportService.doPost(ImportService.java:612)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
======================================================
When using our C# based program also, the behaviour is similar.
Has anyone encountered such problems?
Please suggest if we are doing something wrong at our end.
Thanks.
Prem