0

My H2 web interface is not accessible. Though Java code can get data but web interface is failing to connect to it. This started happening after I rebooted my system.

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue May 02 21:34:04 PDT 2017
There was an unexpected error (type=Not Found, status=404).
No message available

Gradle File: build.gradle:-

buildscript {
        ext {
            springBootVersion = '1.4.4.RELEASE'
        }
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        }
    }

    apply plugin: 'java'
    apply plugin: 'eclipse'
    apply plugin: 'org.springframework.boot'

    jar {
        baseName = 'cg'
        version = '0.0.1-SNAPSHOT'

    }

    sourceCompatibility = 1.8

    repositories {
        mavenCentral()
    }


    dependencies {
        compile('org.springframework.boot:spring-boot-starter-jdbc')
        compile ("commons-dbcp:commons-dbcp")   
        compile('org.springframework.boot:spring-boot-starter-security')
        compile('org.springframework.boot:spring-boot-starter-web')
        runtime('org.springframework.boot:spring-boot-devtools')
        runtime('com.h2database:h2')
        testCompile('org.springframework.boot:spring-boot-starter-test')
    }
Ankur Saran
  • 99
  • 1
  • 9
  • Provide more information. pom.xml will be a good start. – johncena May 03 '17 at 04:58
  • I resolve issue of slow loading of web service . I dont know what happened but I rename the bootApplication class and it stated in 5 seconds – Ankur Saran May 03 '17 at 05:01
  • Dont have pom file just gradle file: – Ankur Saran May 03 '17 at 06:01
  • default spring boot will give h2db jars. use the @restcontroller in controllers then concern service. and give the h2db database setting in application.properties file – Lova Chittumuri May 03 '17 at 10:18
  • I think I have that setting as it was working fine earlier. application.properties looks as:logging.level.org.springframework.web=INFO server.port=8080 spring.datasource.url=jdbc:h2:mem:challenge spring.datasource.schema=classpath:/schema.sql spring.datasource.data=classpath:/data.sql – Ankur Saran May 03 '17 at 18:35
  • can you provide more info so that we help you out.... – Dipak Thoke May 04 '17 at 14:29
  • please add this dependency - compile group: 'com.h2database', name: 'h2', version: '1.3.148' – Dipak Thoke May 04 '17 at 14:30

0 Answers0