My question is about: When I deploy my project on heroku, my api doesn't run and I can not find the reason. I will put here the logs of my aplication and my github repository
I have already tried changing my springboot.run class, but it doesn't work.
The application deploy normaly, but the spring wont run.
Github of my aplication: https://github.com/marcusvlc/labspring
Related
I am using Google App Engine gradle plugin with yaml file, but the plugin version for it has no task appengineRun or appengineStart like the appengine-web.xml version.
TL;DR appengineRun is only available for appengine-web.xml based projects. If you want to use app.yaml, you must provide your own server, for example Spring Boot with Jetty or Tomcat.
To run your application locally, you must provide your own server.
This guide shows how to test your application using app.yaml alongside with the app-gradle-plugin, on section Testing your application with the development server:
During the development phase, you can run and test your application at any time in the development server by invoking Gradle:
gradle jettyRun
Alternatively, you can run Gradle without installing it by using the Gradle wrapper.
As said on this comment on GitHub:
If you want to use app.yaml from your root directory, you must upgrade to Java 11. Learn more here. With the Java 11 runtime, you must provide your own server, for example Spring Boot with Jetty or Tomcat. The appengine:run goal does not work for app.yaml based projects because each server has a different start up command i.e. spring-boot:run for Spring Boot.
I've already configured my project to use direct-to-heroku-client.jar (https://github.com/heroku/direct-to-heroku-client-java) with heroku-api-0.24.jar and
when I test deploy of WAR artifact - it says "Failed to deploy 'war-test-artifact': com.herokuapp.directto.client.DeploymentException: Deploy not accepted".
I investigated that within direct-to-heroku-client API artifact might be uploaded to https://direct-to.herokuapp.com:443/direct during deploying, but it does not happened. So, I just want to know, if
https://direct-to.herokuapp.com:443/direct will be support soon somehow or not and is the direct-to-heroku-client relevant to heroku API v3?
That project is deprecated, and not supported (I updated the docs to reflect this).
Instead, you should be using either:
Heroku Maven plugin
Heroku Deploy CLI
For more information, see the Heroku Dev Center article on WAR Deployment.
I am working a Java REST api for a hobby project and I am using Heroku as my deployment platform. I managed to deploy the application using
heroku-maven-plugin.
Then I integrated my GitHub repo with heroku app and tried to deploy from master branch. But then it fails with the following message
Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/java.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
!Push failed
Can you please explain how to fix this?
Update :
I have tried setting the buildpack to heroku/java from both dashboard and the heroku CLI tool. But still the problem remains.
GitHub : online-activity-diary-api
The Heroku Maven plugin and Github deployment to the same app are not compatible. They use different buildpacks that do different work. You'll first need to make sure your deploying to different apps with these two mechanisms.
When you deploy with Github sync, you'll need to make sure your buildpack is configured to heroku/java in the dashboard. Then make sure your application has a pom.xml checked into Git.
Am trying to integrate Spring security into a Grails Web application using NetBeans IDE.
Steps were:
added mavenRepo "http://repo.spring.io/milestone" to repository
compile ":spring-security-core:2.0-RC2" to plugins.
When I try grails s2-quickstart com.zot.auth User Role in cmd prompt I get below error. Can anyone help. Also would like to know if we can create the spring security files directly in NetBeans like we create the pojos I mean without using a commandline.
| Error Error generating web.xml file (Use --stacktrace to see the full trace)
I faced same problem and resolved using following steps:
grails clean
grails refresh-dependencies
If still not work then remove target folder.
is it possible to run spring mvc application on tomcat(with this plugin http://mojo.codehaus.org/tomcat-maven-plugin/) if yes, where is the application log and deploy web app directory located ?
Let me rephrase the question. I'm asking for some way to start my web app(spring mvc application) from a command line, either with maven or with something inside application that creates web server.
What would you recommend? I found this tomcat maven plugin while googling, no special reason to use it
Currently I use jboss server for this application, but I want to run both server and application from application,any suggestions?
tomcat:run runs a web application in an embedded tomcat instance ... useful for testing during development.
See http://mojo.codehaus.org/tomcat-maven-plugin/run-mojo.html for listing of config parameters for the run goal, including warSourceDirectory which, if not specified defaults to ${basedir}/src/main/webapp
I'm not sure exactly why but we use the mvn cargo:start plugin instead, for testing locally when building with maven. We also utilize Spring and haven't had any issues regarding the mix. When starting up the Tomcat container with the command above it shows the following in the console
C:\SVN\myproject-war\target\tomcat6x\home>
This contains the webapps folder where the war is deployed and a logs folder.
Hope this helps, sorry I don't have direct experience with the tomcat-maven-plugin itself.
If I understand your question correctly, from your application you want to start tomcat to serve a spring MVC application.
If so, you do not need maven or a maven plugin to do this. You can use tomcat catalina APIs to achieve this. Though dated, this article explains how.
As the other answers stated, maven's tomcat and cargo plugins allow you to start and stop tomcat from maven - typically to run some integration tests.