How to allow annotation scanning even if the meta data attribute is true in Websphere 8.5.5.13 - spring-mvc

Currently I’m facing one issue with my application where I have used Jaxb Soap web service.
Websphere version 8.5.5.13
Spring - 5.x
Web app version 3.0
We have included metadat-complete as true in web.xml to avoid the build failure, if the attribute is true build getting failed.
Now my problem is my service is not properly deployed in the server. I could not see service in service provider(websphere). So I’m getting the below error while hitting the service.
Error: the OperationDesc for getService***** was not matched to a method XX.serviceImpl
Note: we have migrated the application from struts 1 to Spring 5
Anyone please help me to resolve this?

Related

Weblogic Migration to TOmee - EJB

We have migrated a weblogic applictation to Tomee. Ear file has 2 web modules and 1 ejb module.
Deployment is successful in Tomee without any errors or warning.
But when we try to hit the wsdl end point , it gives 404.
please help us with any inputs, we have been trying this for many weeks now , no luck so far
Uncommented values from system.properties as well for remotesupport,blacklist, whitelist
Thank you -AD

ASP.NET Web API - Some controllers return 404 status code

A couple of days ago, all endpoints on certain API controllers of our application started returning 404 - as if the endpoint doesn't exist at all. Some other API controllers were working correctly, meaning that all endpoints within these controllers work as expected.
The API controllers are consumed by the Angular.js part of the monolith application (jQuery, Ajax).
This application, including the controllers that stopped working, have been running for years without this issue ever occurring.
It is an ASP.NET 4.7.2 MVC application, that in addition to MVC controllers has API controllers as well. It also has Umbraco 7 installed, so the Startup class inherits from UmbracoDefaultOwinStartup. The app is deployed to Azure App Service, using Azure DevOps Pipelines. Note: The issue is only on some API controllers, all MVC controllers work correctly.
The code, when run on localhost, doesn't show the errors, everything works normally, it's just that the deployed environment has the issue.
Here is what we changed during the period when the issue started occurring, which might have caused the issue in the first place:
Updated the Azure DevOps Pipeline Agent pool from Hosted VS2017 Agent pool to Azure pipelines windows-2019 (as we received a warning that vs 2017 and windows-2016 images will be deprecated). More info on this url: https://github.com/actions/virtual-environments/issues/4312
Made changes on the Gruntfile.js, BundleConfig.cs, and Master.cshtml files
What we tried so far:
running the app in localhost - unable to recreate the issue, localhost works fine
reverting the changes made on the files - the issue still persists
set the pipelines Agent pool to vs2017-win2016 - the issue still persists. I was not able to set it completely back to Hosted VS2017 Agent pool as it is deprecated. This means that, if the issue was caused by changing the Agent pool, I was not able to revert it.
testing the endpoints that don't work via Postman, adding logs within the controller actions to see whether the endpoint will be triggered - but it always simply returns 404 without ever entering the controller action
UPDATE: we've reset the remote branch to a state where we're certain that all APIs were working correctly, but the 404 status codes persist. This indicates that this issue isn't caused by changes in code, but rather something environment specific.
UPDATE 2: when reviewing the LogFiles folder through Kudu DebugConsole, I've found that all these 404 requests have the following logged event, so this proves that the ednpoint isn't recognized at all:
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName IIS Web Core
Notification MAP_REQUEST_HANDLER
HttpStatus 404
HttpReason Not Found
HttpSubStatus 0
ErrorCode The system cannot find the file specified. (0x80070002)

Service not working after restoring solution

I have a solution with a statefull service targeting .NET 4.5.2. I add a stateless .NET Core web service. It works and displays the home page when I run the solution.
I'm running this locally.
Then I add another service, a stateless API service which has to be .NET Core (no other options). Nothing works. I remove the API service from solution and delete the files to go back to when I just had the web service working fine.
Still nothing works. I get an error message
The PowerShell script failed to execute. See the Output window for details.
Output: Registration of application type failed
What has happened that keeps the first web service from serving the web site?

No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'dispatcher'

I know that this question was asked multiple times on stackoverflow and I had read almost all of them to solve my error. But my requirement is different from others and all my efforts to accomplish this are in vain.
Developing a web app using Spring MVC , Google Data store and running it on App Engine.
This is my Project Structure:
My Web.xml file:
My Controller to handle requests:
My Context file for Dispatcher Servlet:
The Error log generated:
My project is running on Tomcat server without any errors on another machine. I am encountering this error only on Google App engine.
Help me to sort this error out.
This is the link for my project https://drive.google.com/open?id=1H7z34ZEPr3HniWJsrEaHYIxKUWOf_67P
The reason why this program is not executing is , In the dispatcher-servlet.xml , In xsi:schemalocation tag , For spring mvc url , I used 4.0 version. That's why this code didn't execute. After removing the version, It executed perfectly

Deploy Spring MVC in WSO2 Application Server

I am trying to deploy my Spring MVC application on WSO2 Application Server by going to Main > Manage > Applications > Add > Web Applications and upload my Spring MVC's WAR file. The upload completed successfully, but I still can't run the web app itself. The error message just basically complaining it doesn't have org.springframework.
The same WAR file can be run on Apache Tomcat with no problem at all. All I did is dropping the same WAR file to \webapps, and it works.
Is there a special setting that needs to be configured to get Spring MVC run on WSO2 Application Server? I would assume WSO2 Application is also using Apache Tomcat, so why it won't run by just uploading the WAR file?
Thanks!
What is your WSO2 AS version ? please make sure to use latest AS 5.1.0 version. We have tested large number of Spring (including SpringMVC) based applications on AS 5.1.0, basically if something working on Tomcat it should be work on WSO2 AS too. If you still have issues on AS 5.1.0 please let me know.
I solved this issue by:
Upgrading WSO2 AS to latest version (5.1.0) as mentioned by Sagara Gunathunga. For some reasons, previous WSO2 AS doesn't take my JSTL templating (something like $ {blabla}). Only in 5.1.0 did the issue resolved. I start to wonder what this WSO2 is doing with its half-baked product.
Modify Maven POM file, specifically slf4j-api dependency. WSO2 has its own slf4j-api library and I have to set the scope of slf4j-api in my app to "provided" before deploying to WSO2. This solve the issue with unable to load all JavaScript files.
Downside for this is you will need the scope of slf4j-api to be "compiled" when you run this locally under regular Tomcat. Setting it to "provided" will not work under Tomcat. But in WSO2, the scope will need to be "provided" to run. So, there is manual work to change before deploying the application.
I did try to match the slf4j-api version to match what WSO2 and set the scope to "compile", but it still won't work. WSO2, for some bad reasons, can't use my app's compiled slf4j-api.
yes there is a separate workaround to deploy a spring service to wso2 appserver. Please follow [1] for instructions.
[1]. http://docs.wso2.org/wiki/display/AS510/Spring+Services
Thank you,
Dharshana
#stack247,
Well I'm from WSO2 and it's nice to hear that your JSTL issue is solved by now. But I completely disagree with " I start to wonder what this WSO2 is doing with its half-baked product" statement. You may know that spec like Servelt , JSP and JSTL having different versions and update it's version with time. Previous version of application server does not supported for latest JSP 2.0 and JSTL 1.2 specs hence you can't use application which depends on JSP 2.0 or JSTL 1.2 that was a known limitation but can't consider it as half-baked product due to that. This is very common nature with any software product and that's why we are actively developing, fixing issues, upgrading dependencies and frequently releasing new versions, also we are responding to community issues like this.
With Latest AS 5.1.0 release we officially support for Servelt 3.0, JSP 2.0 and JSTL 1.2 and any dependent applications too. When it come to logging case most of the application server having their own logging mechanisms and some cases it's required remove logging dependencies from applications.

Resources