Google App Engine Standard with Java Sprint Boot REST - not working in GCLOUD server The Next CEO of Stack OverflowHow to deploy Spring Boot application on Google App Engine(GAE) using Eclipse IDE?spring boot EntityManagerFactory must not be nullI'm creating a maven project and I'm a beginner..I got this error. can help to resolve this is my pom.xml & web.xmlDeploy a SpringBoot / Angular 4 on Google App Engine with mavenCan we combine Google App Engine Cloud Endpoints and Spring Boot REST Web ServiceError while deploying the spring boot app in tomcat serverFailed to Execute a goal and Test failure when creating spring boot io projectMy spring-boot app gives the following error “org.thymeleaf.exceptions.TemplateInputException:”Spring boot on Google appengine standard - REST APIProblem spring boot application deployment to google app engine

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico

Does destroying a Lich's phylactery destroy the soul within it?

Which one is the true statement?

Computationally populating tables with probability data

Audio Conversion With ADS1243

Physiological effects of huge anime eyes

what's the use of '% to gdp' type of variables?

When "be it" is at the beginning of a sentence, what kind of structure do you call it?

How to set page number in right side in chapter title page?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

What connection does MS Office have to Netscape Navigator?

Spaces in which all closed sets are regular closed

Film where the government was corrupt with aliens, people sent to kill aliens are given rigged visors not showing the right aliens

How to get the last not-null value in an ordered column of a huge table?

Defamation due to breach of confidentiality

Decide between Polyglossia and Babel for LuaLaTeX in 2019

Aggressive Under-Indexing and no data for missing index

Is there a way to save my career from absolute disaster?

What is the difference between Statistical Mechanics and Quantum Mechanics

Where do students learn to solve polynomial equations these days?

How to find image of a complex function with given constraints?

Reshaping json / reparing json inside shell script (remove trailing comma)



Google App Engine Standard with Java Sprint Boot REST - not working in GCLOUD server



The Next CEO of Stack OverflowHow to deploy Spring Boot application on Google App Engine(GAE) using Eclipse IDE?spring boot EntityManagerFactory must not be nullI'm creating a maven project and I'm a beginner..I got this error. can help to resolve this is my pom.xml & web.xmlDeploy a SpringBoot / Angular 4 on Google App Engine with mavenCan we combine Google App Engine Cloud Endpoints and Spring Boot REST Web ServiceError while deploying the spring boot app in tomcat serverFailed to Execute a goal and Test failure when creating spring boot io projectMy spring-boot app gives the following error “org.thymeleaf.exceptions.TemplateInputException:”Spring boot on Google appengine standard - REST APIProblem spring boot application deployment to google app engine










0















I managed to deploy and test the local version of my Java Spring boot RESTful application locally* using the guide provided here.
Using the command mvn appengine:run, I manage to access the REST API without any issue (through eg: http://localhost:8080/setiaalam/amenities). Tested both browser and Postman.



Then, once I deployed it into GCLOUD, it always return 404. I thought probably it make needs some time to update the server, so even after minutes, or hours, it is still 404. The log doesn't give anything helpful apart from file not found 404. The command that i used to deploy is: mvn appengine:deploy.



If it got to do with setting such as the pom.xml or appengine-web.xml, which i dont think it is, since running localhost using the command mvn appengine:run have no issue at all.



Anyone have any idea what could be the possible cause? Again, I want to highlight that, this is problem on accessing RESTful API and not servlet.



UPDATE part 2



Added application.properties






# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





AND the following error:






Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





UPDATE part 1



Added appengine-web.xml (located src/main/webapp/WEB-INF/)






<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





The web.xml (located src/main/webapp/WEB-INF/)






<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





The pom.xml






<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





The app.yaml generated from deployed files (Stackdriver Debug):






runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional












share|improve this question
























  • Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

    – Brian de Alwis
    Mar 5 at 4:40











  • Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

    – Ken
    Mar 7 at 9:59











  • Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

    – Ken
    Mar 8 at 20:36











  • You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

    – Brian de Alwis
    Mar 9 at 3:32











  • @BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

    – Ken
    Mar 11 at 10:49
















0















I managed to deploy and test the local version of my Java Spring boot RESTful application locally* using the guide provided here.
Using the command mvn appengine:run, I manage to access the REST API without any issue (through eg: http://localhost:8080/setiaalam/amenities). Tested both browser and Postman.



Then, once I deployed it into GCLOUD, it always return 404. I thought probably it make needs some time to update the server, so even after minutes, or hours, it is still 404. The log doesn't give anything helpful apart from file not found 404. The command that i used to deploy is: mvn appengine:deploy.



If it got to do with setting such as the pom.xml or appengine-web.xml, which i dont think it is, since running localhost using the command mvn appengine:run have no issue at all.



Anyone have any idea what could be the possible cause? Again, I want to highlight that, this is problem on accessing RESTful API and not servlet.



UPDATE part 2



Added application.properties






# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





AND the following error:






Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





UPDATE part 1



Added appengine-web.xml (located src/main/webapp/WEB-INF/)






<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





The web.xml (located src/main/webapp/WEB-INF/)






<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





The pom.xml






<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





The app.yaml generated from deployed files (Stackdriver Debug):






runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional












share|improve this question
























  • Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

    – Brian de Alwis
    Mar 5 at 4:40











  • Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

    – Ken
    Mar 7 at 9:59











  • Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

    – Ken
    Mar 8 at 20:36











  • You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

    – Brian de Alwis
    Mar 9 at 3:32











  • @BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

    – Ken
    Mar 11 at 10:49














0












0








0








I managed to deploy and test the local version of my Java Spring boot RESTful application locally* using the guide provided here.
Using the command mvn appengine:run, I manage to access the REST API without any issue (through eg: http://localhost:8080/setiaalam/amenities). Tested both browser and Postman.



Then, once I deployed it into GCLOUD, it always return 404. I thought probably it make needs some time to update the server, so even after minutes, or hours, it is still 404. The log doesn't give anything helpful apart from file not found 404. The command that i used to deploy is: mvn appengine:deploy.



If it got to do with setting such as the pom.xml or appengine-web.xml, which i dont think it is, since running localhost using the command mvn appengine:run have no issue at all.



Anyone have any idea what could be the possible cause? Again, I want to highlight that, this is problem on accessing RESTful API and not servlet.



UPDATE part 2



Added application.properties






# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





AND the following error:






Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





UPDATE part 1



Added appengine-web.xml (located src/main/webapp/WEB-INF/)






<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





The web.xml (located src/main/webapp/WEB-INF/)






<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





The pom.xml






<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





The app.yaml generated from deployed files (Stackdriver Debug):






runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional












share|improve this question
















I managed to deploy and test the local version of my Java Spring boot RESTful application locally* using the guide provided here.
Using the command mvn appengine:run, I manage to access the REST API without any issue (through eg: http://localhost:8080/setiaalam/amenities). Tested both browser and Postman.



Then, once I deployed it into GCLOUD, it always return 404. I thought probably it make needs some time to update the server, so even after minutes, or hours, it is still 404. The log doesn't give anything helpful apart from file not found 404. The command that i used to deploy is: mvn appengine:deploy.



If it got to do with setting such as the pom.xml or appengine-web.xml, which i dont think it is, since running localhost using the command mvn appengine:run have no issue at all.



Anyone have any idea what could be the possible cause? Again, I want to highlight that, this is problem on accessing RESTful API and not servlet.



UPDATE part 2



Added application.properties






# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





AND the following error:






Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





UPDATE part 1



Added appengine-web.xml (located src/main/webapp/WEB-INF/)






<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





The web.xml (located src/main/webapp/WEB-INF/)






<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





The pom.xml






<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





The app.yaml generated from deployed files (Stackdriver Debug):






runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional








# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





# Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
# This is for connecting between Google App Engine Standard in the Cloud with Google Cloud SQL
#spring.datasource.url = jdbc:mysql://google/setiaalam?cloudSqlInstance=sa-community-1545365567756:asia-southeast1:setiaalam&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=root&password=setiaalam99?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.cloud.gcp.sql.instance-connection-name=sa-community-1545365567756:asia-southeast1:setiaalam
spring.cloud.gcp.sql.database-name=setiaalam


#spring.datasource.url = jdbc:mysql://35.240.140.154:3306/setiaalam?useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
spring.datasource.username = root
spring.datasource.password = mypwd

spring.datasource.driver-class-name = com.mysql.jdbc.Driver

# Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update

# sa-community-1545365567756:asia-southeast1:setiaalam





Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





Driver com.mysql.jdbc.Driver claims to not accept jdbcUrl, jdbc:google:mysql://sa-community-1545365567756:asia-southeast1:setiaalam/setiaalam





<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<runtime>java8</runtime>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
</appengine-web-app>





<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>





<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.venturearkstudio</groupId>
<artifactId>setia-alam-community</artifactId>
<version>0.0.2</version>
<packaging>war</packaging>
<name>setia-alam-community</name>
<description>description for this said project</description>

<properties>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!-- NEEDED FOR GOOGLE APP ENGINE TOMCAT EXCLUSION-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>compile</scope>
</dependency>

<!-- NEEDED FOR GOOGLE CLOUD SQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JAVAX.SERVLET-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- NEEDED FOR GOOGLE APP ENGINE SCOPE TEST-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- NEEDED FOR GOOGLE APP ENGINE JETTY LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<scope>provided</scope>
</dependency>

<!-- NEEDED FOR HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$hibernate.version</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$hibernate.version</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<!-- The following is needed to be excluded due to Google Cloud needs. -->
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- NEEDED FOR GOOGLE SERVICES -->
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.9.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<!-- NEEDED FOR GOOGLE APP ENGINE MAVEN PLUGIN -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<cloudSdkPath>C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk</cloudSdkPath>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>

</plugins>
</build>

</project>





runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional





runtime: java8
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: 'none'
handlers:
- url: (/.*)
static_files: __static__1
upload: __NOT_USED__
require_matching_file: True
login: optional
secure: optional
- url: /
script: unused
login: optional
secure: optional
- url: /.*/
script: unused
login: optional
secure: optional
- url: /_ah/.*
script: unused
login: optional
secure: optional






java rest maven spring-boot google-app-engine






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 20:41







Ken

















asked Feb 28 at 11:37









KenKen

1213




1213












  • Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

    – Brian de Alwis
    Mar 5 at 4:40











  • Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

    – Ken
    Mar 7 at 9:59











  • Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

    – Ken
    Mar 8 at 20:36











  • You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

    – Brian de Alwis
    Mar 9 at 3:32











  • @BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

    – Ken
    Mar 11 at 10:49


















  • Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

    – Brian de Alwis
    Mar 5 at 4:40











  • Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

    – Ken
    Mar 7 at 9:59











  • Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

    – Ken
    Mar 8 at 20:36











  • You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

    – Brian de Alwis
    Mar 9 at 3:32











  • @BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

    – Ken
    Mar 11 at 10:49

















Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

– Brian de Alwis
Mar 5 at 4:40





Please share your appengine-web.xml, web.xml, the deploy log output, and any logs from Stackdriver Logging. Also take a look at the Stackdriver Debug view (console.cloud.google.com/debug): it shows what was deployed for your project/instance/version on App Engine.

– Brian de Alwis
Mar 5 at 4:40













Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

– Ken
Mar 7 at 9:59





Hi @BriandeAlwis noted. I just added those require info into main post (above). Fyi, thanks to you, I managed to use the Stackdriver Debug view and compare the version deployed to the GCloud is the same as the 1 running locally, at least by checking the web.xml contains and application.properties.

– Ken
Mar 7 at 9:59













Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

– Ken
Mar 8 at 20:36





Hi @BriandeAlwis, thanks this does solve the problem. However, I encounter a separate issue...As I trying to connect the App Engine Standard to the Google Cloud SQL 2nd generation. I updated the above with application.properties and the error from the Google Console. Can help?

– Ken
Mar 8 at 20:36













You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

– Brian de Alwis
Mar 9 at 3:32





You might want to look at the Spring Cloud GCP project: spring.io/projects/spring-cloud-gcp

– Brian de Alwis
Mar 9 at 3:32













@BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

– Ken
Mar 11 at 10:49






@BriandeAlwis thanks a lot. I managed to fix it using your web.xml solution and re-authenticate my gcloud auth. Also, I still not sure why we need web.xml, i can't find back the URL/post, but I thought it is not needed to have web.xml when using Google App Engine Standard?

– Ken
Mar 11 at 10:49













1 Answer
1






active

oldest

votes


















0














Change your web.xml to specify Servlet 3.1:



<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Servlet 3.1 Web Application</display-name>
</web-app>


I've filed a bug.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54924837%2fgoogle-app-engine-standard-with-java-sprint-boot-rest-not-working-in-gcloud-se%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Change your web.xml to specify Servlet 3.1:



    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
    version="3.1">
    <display-name>Servlet 3.1 Web Application</display-name>
    </web-app>


    I've filed a bug.






    share|improve this answer



























      0














      Change your web.xml to specify Servlet 3.1:



      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
      version="3.1">
      <display-name>Servlet 3.1 Web Application</display-name>
      </web-app>


      I've filed a bug.






      share|improve this answer

























        0












        0








        0







        Change your web.xml to specify Servlet 3.1:



        <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
        version="3.1">
        <display-name>Servlet 3.1 Web Application</display-name>
        </web-app>


        I've filed a bug.






        share|improve this answer













        Change your web.xml to specify Servlet 3.1:



        <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
        version="3.1">
        <display-name>Servlet 3.1 Web Application</display-name>
        </web-app>


        I've filed a bug.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 17:16









        Brian de AlwisBrian de Alwis

        818515




        818515





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54924837%2fgoogle-app-engine-standard-with-java-sprint-boot-rest-not-working-in-gcloud-se%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229