I'm trying to deploy a spring + angularJS app (packaging as war) into websphere (7.0.0.25), but even for the sample app I cloned from spring, I always get Error 404: SRVE0190E: File not found. And even for the spring app, I have to explicitly specify index.html in the URL, otherwise I get the same error. But the angular side is tolerable, can anyone help me with the spring side?
The sample application is: https://github.com/spring-guides/gs-convert-jar-to-war-maven.git
After doing "mvn clean package" in "/gs-convert-jar-to-war-maven/complete" to get the war, I follow the steps here to upload and deploy the war in websphere:
http://www.packtpub.com/article/deploying-applications-on-websphere-application-server-7.0-part1
I also tried this post to set the custom properties but still didn't work: http://frightanic.com/software-development/solution-to-error-404-srve0190e-on-websphere-6-1/
Also, both my app and the sample spring app don't have a web.xml as spring will take care of it. Both apps work fine in jetty and Tomcat. Only websphere has the problem. Besides, I don't know how to manually configure a web.xml if that will be the solution (need to be pointed to more resources).
The URLs I tried but failed to access the app are:
localhost:9080
localhost:9080/gs-convert-jar-to-war-0_1_0_war
localhost:9080/someAppName
Thanks in advance!
It turns out that websphere 7 doesn't support some spring annotations/classes. My solution is to write a web.xml file and turn off spring auto-configuration.
Related
Iam working on a spring boot application, we are using war packaging. When i run the application in my local machine with bootRun or in STS,it is working as expected, but when i deploy it in PCF, the context path is not applying. After some research i came to know that server.servlet.context-path will not work in external tomcat, so i added context.xml with
in webapp/META-INF, but it is still not working. The API /test is working but it is supposed to be /myPath/test. I spent lot of time on research haven't found a working solution. Can anyone help. Thanks.
I have recently started packaging my application as a war.
I have noticed whenever I deploy the application within tomcat, 404 errors are now placed into tags, where as when deploying as a standalone, the _body response would be in JSON. Does anyone know why this is happening?
Within the tomcat on a war deployment I get the return _body:
<.!doctype html><.html lang="en"><.head><.title>HTTP Status 404 – Not Found<./title>
On a standalone deployment the return _body =
"{"timestamp":"2018-06-26T18:28:38.731+0000","message":"04ed1a7a-729d-48d7-b306-8e9ff6d7a2e0","details":"uri=/api/userSecurity/login","status":4011003}"
Is there maybe some sort of tomcat setting that is causing this?
Thank you
The user solved the problem by preparing the application with bootstrap to be deployed in tomcat as explained here.
I am developing a simple restful server and want to deploy it on a Tomcat server. When I deploy the project it won't run and gives me the message: http 404, The requested resource is not available.
The project is a default, newly created Maven project and when I select Glasfish it runs fine. Can anyone give help me to find out what I am doing wrong?
I found the problem myself. For anyone struggling. Java Jax-RS doesn't run default on Tomcat. You need Tomcat EE or add EE to Tomcat.
I have my process(bpm file) defined as part of the Camunda Spring Boot project. I have a form attached to a Start Event. When I start my process I get "Form failure: Origin is not allowed by Access-Control-Allow-Origin" error.
I have checked Chrome console and found "XMLHttpRequest cannot load app:forms/my-form.html?noCache=1455724524763. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource" error message.
I had packaged the same process outside a Spring Boot project as a normal web app and deployed the war to Camunda Tomcat. It ran without any issue.
The issue happens when I package the same process as part of Camunda Spring Boot project.
Found 2 links describing similar issue but not helping much in terms of resolution.
https://github.com/plexiti/camunda-grails-plugin/issues/47
https://app.camunda.com/jira/browse/CAM-2146
Does Camunda Spring Boot project support embedded form. I have not seen any example of embedded form for Camunda Spring Boot.
I am pretty much stuck. So any help will be much appreciated.
This happens if the Tasklist can not determine the context path of the application. I just experienced that today in a customer training, when I undeployed a war file from a Wildfly.
A workaround could be to use an absolute path in the formKey, e.g. embedded:/mywebapp/forms/my-form.html
We had this problem as well. My coworker left this comment on the github issues of the project that you might find useful: https://github.com/camunda/camunda-bpm-spring-boot-starter/issues/39
I made a little web app with Spring Boot with web MVC, it is working fine if I run it by deploying the war or if I run it directly from STS. The problem is that my application is always run with his appname as context app (something like "localhost:8080/appname/") and I can't change it. I tried to write a web.xml with dispater-config.xml but, even if the server recognize it, the path is not changed. I tried to write the method in the SpringBootServletInitializer and setting the path, but it is not working too. I also tried to add a META-INF/context.xml in the webapp folder trought STS (project->src->webapp->META-INF->context.xml) but it's not working too. I am just going crazy with, what should i do to change the app's context path? Thanks
EDIT: I would mount my app in the root context of tomcat
It's built in, in eclipse (STS). I suggest using a stand alone tomcat and not the integrated eclipse tomcat and deploy the war on your stand alone tomcat
Add the context path as a parameter to your #RequestMapping annotation, like this: #RequestMapping("/helloworld")