I am migrating a Spring-Boot application to a new server (Amazon-Linux). I could not deploy the application using Tomcat manager. Uploading the ROOT.war using the manager fails.
So, I deployed the application by manually uploading the ROOT.war. At first, it seemed that the deployment went well, the first page of the application (login) was loading. But after submitting the credentials, the application is not redirecting me to the home page. After investigation, it turned out that in the work directory (work/Catalina/............../WEB_002dINF/jsp/) there are only two files (my_login_jsp.class, my_login_jsp.java). So, does that mean compilation for other jsp files are being failed?
Please advise how this can be fixed?
Found the solution. There is something wrong with the Tomcat package that comes with amazon-linux-extras.
After removing the aws package, now I am using Tomcat downloaded from the official website. The is working perfectly.
Related
I wanted to deploy a built spring boot jar to Azure AppService, but the chosen mode with Linux did responded only 404 "Not found" (that looked like Tomcat error page) after deploy although I could see in logs the app had been deployed correctly.
During troubleshooting I changed the mode of AppService to the one with container image. But it did not help.
Then I found the 404 is caused by enabling the App Insights which causes adding a -javaagent:/agent/java/applicationinsights-agent-codeless.jar to JAVA_TOOL_OPTS env var.
The codeless variant is not available anywhere online so with some struggle I downloaded the jar to my local machine, set Insights connection string env variable and reproduced the error. With the applicationinsights-agent downloaded from github releases I got different error, but did not investigate further.
When enabled, App Insights worked as I could see it send traces etc. But it the HTTP routing in the app is broken therefore the App Insights is useless.
I don's see how I could fix this, so any advice is appreciated.
There can be multiple scenarios which is causing the issue:
In your case you are getting 404 error, because your jar file might not deploy properly in App Services which is causing this issue.
Check if the below steps help to resolve your issue:
Try restarting your App service.
You may be trying to manually push the jar file through FTP in App Service which basically causes the problem during deployment, because it basically a step of copying the jar file into Tomcat webapps directory.
So, you can deploy your jar file using maven plugin.
Below are the commands to configure and deploy the jar file in App Service of your spring boot application.
Command to configure the App Service:
mvn com.microsoft.azure:azure-webapp-maven-plugin:2.5.0:config
Command to package and deploy the jar file to App Service:
mvn package azure-webapp:deploy
I have tried in my environment and got expected results:
I have used the above-mentioned commands to configure and deploy the jar file to App Service.
I have enabled Application Insights and my application is working fine as expected.
I have also tried with Docker Container:
Enabled Application Insights:
Enabled Port 8080 by adding WEBSITES_PORT :8080 as a setting in Web App> Configuration>Application settings.
Output:
I just deployed a web application to my server using tomcat manager.
When I'm running the web app locally I can get:
http://localhost:8080/CookEatWebApp/resources/ingredient SUCCESSFULLY
However, after deployment I get:
http://162.253.126.28/CookEatWebApp/resources/ingredient NOT FOUND
http://162.253.126.28/CookEatWebApp - this is working and showing the index.jsp page successfully.
What am I doing wrong?
The solution for this was to redeploy the latest code which contained the required controller
FAIL - Deployed application at context path /RxCircle but context failed to start
The module has not been deployed.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:173)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:125)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:202)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
i am using tomcat 6
netbeans 7.0
java 6
i am getting this error when i am running my application in netbeans..
I suspect that either (1) Your web.xml is missing, (2) your applicationContext is malformed or (3) your versions are not playing nicely together.
Since you are using Netbeans you can view the Server Log by doing this:
Open the Services window (if it is not open go to: Window > Services)
Right-click on the Tomcat Server and select View Server Log.
Now you can see the actual exception that is causing Tomcat not to deploy your war.
This is a very generic error message and can be due to any reason like wrong servlet filter defined or malformed application context file.
To understand fully you need to get more logging details from tomcat.
So set the logging level to debug in tomcat and then start the tomcat.
Below url you may refer for further details
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
How to set level logging to DEBUG in Tomcat?
Hopefully you will get more details about the deployment error root cause.
Try stopping the Tomcat server so as to allow Netbeans to run it. If the server is already running when Netbeans tries to deploy an app Netbeans will display the delopy failed message.
I had the same issue. I was using Java 8, Tomcat 8, NetBeans 8.1.
What I did was, I manually replaced:
1. nbproject/build-impl.xml
2. web/WEB-INF/web.xml
with a previous version of the files. Please make sure to have backups.
I have faced same issue
I searched lot of solutions but not worked
If you are facing the same problem then the solution is
First you have backup your web.xml code file from your
project NetBeanss
Now delete web.xml from project
Now right click on web-inf file chose web after that chose deployment descriptor
After that
Now you can run your prj check your solution is solve as context will run on localhost server
Afte thaer will some error because we can't save our servlet file link so do it
Run it
Now you will see your problem solve
It's worked for.me
I'am looking since some days ago to the right way to deploy my ADF Secure Web project with maven to Weblogic server(WLS)
My problem is this file jazn-data.xml which contains informations about users/groups(roles)/grants. During the deploy process to WLS the jazn-data.xml muss be merged into system-jazn-data.xml. The system-jazn-data.xml is used by WLS to know about the securities settings of an application.
I add this to my weblogic-application.xml which is supposed to merge jazn-data.xml into system-jazn-data.xml but nothing
<listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationStateListener</listener-class>
Does somebody already do this with success? Thanks for all informations
Which version are you using, because if you are using 12c it should come out of the box with JDeveloper!
Or else try to use OEPE(Oracle Enterprise Pack for Eclipse) as it packages the application without OJDeploy, you can use that and create your Maven script to take the generated war file and resume from there.
#Festus sorry for being late, you can download the project from here, I created one role and have one page in this simple application, I packaged the application using mvn package and installed it in weblogic using Weblogic Console.
One problem I had is my Model connection, I remove the database connection from connections.xml and pointed the model to a weblogic datasource and the application installed successfully.
Did you try doing what's in this picture before deploying to maven, also remove users and groups!
This window can be accessed from Application properties
I'm trying to deploy the simple WS example from tomEE:
http://openejb.apache.org/examples-trunk/simple-webservice/
As there is nothing special about it, I will post in detail what I did. Maybe someone sees what I'm doing wrong:
Machine: Win7, Eclipse, Server: tomEE+
-created new Dynamic Web Project with runtime target = the tomcat tomEE server
-created new package in /src, and added 3 classes there: Calculator, CalculatorWS, CalculatorTest.
-rightclick project > run as > run on server > choose tomEE.
Server starts up, launches http://127.0.0.1:8080/testproject
Which results in 404, as I have not set up any jsf page.
Anyhow, going to http://localhost:8080/testproject/Calculator?wsdl or http://localhost:8080/testproject/webservices/Calculator?wsdl as the example suggests, I too get 404 not found. Obvious the Webservices are not deployed?
What could be wrong with this basic and simple example?
I am using eclipse indigo and tomee 1.5.2. I have a class x.y.z.MyWS. It's annotated with #WebService and #Stateless.
The apache tomee log, during startup, says
INFO: Webservice(wsdl=http://localhost:8080/MyWebApp/webservices/MyWS, qname={http://z.y.x/}MyWSService) --> Ejb(id=MyWS)
So the WSDL is
http://localhost:8080/MyWebApp/webservices/MyWS?wsdl
Please check your logs.
I ran this example the other day, and ran into similar issues. The solution is really to look into the Apache Logs folder for the catalina log for the date, and also for the stderr file for today's date. They will tell you if the deployment worked or failed.
In my case, I was using JDEV, so I had removed the #Stateless annotation, and tried just dropping the .jar into the webapps folder. That did not work. However, putting it back in, and dropping the .jar worked fine.
As a web application (.war), the .class files were moved into WEB-INF\classes within the .war file and I dropped that into webapps. I looked at the Catalina Log and it said where the endpoint was (for the wsdl). I typed:
http://localhost:8080/SimpleWebService/Calculator?wsdl, and the WSDL file appeared.
After that, I ran some simple Soap Requests with soap ui. It worked fine. this was with version 1.7.1.