S
S
Sland Show2018-07-31 10:50:56
MySQL
Sland Show, 2018-07-31 10:50:56

What's wrong with database fields?

I'm trying to run the CRUD application taken from here , but with absolutely no success. The database has been created and is functioning, the problem here is different.

When I run the project - I get a server error 500 and this log

Hibernate: 
    select
        this_.id as id1_0_0_,
        this_.CODE as CODE2_0_0_,
        this_.ENTERING_DATE as ENTERING3_0_0_,
        this_.NAME as NAME4_0_0_,
        this_.nationality as national5_0_0_ 
    from
        student this_
31-Jul-2018 10:30:30.489 WARN [http-nio-8080-exec-1] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions SQL Error: 1054, SQLState: 42S22
31-Jul-2018 10:30:30.507 ERROR [http-nio-8080-exec-1] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions Unknown column 'this_.nationality' in 'field list'
Hibernate: 
    select
        this_.id as id1_0_0_,
        this_.CODE as CODE2_0_0_,
        this_.ENTERING_DATE as ENTERING3_0_0_,
        this_.NAME as NAME4_0_0_,
        this_.nationality as national5_0_0_ 
    from
        student this_
31-Jul-2018 10:30:31.805 WARN [http-nio-8080-exec-2] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions SQL Error: 1054, SQLState: 42S22
31-Jul-2018 10:30:31.806 ERROR [http-nio-8080-exec-2] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions Unknown column 'this_.nationality' in 'field list'
Hibernate: 
    select
        this_.id as id1_0_0_,
        this_.CODE as CODE2_0_0_,
        this_.ENTERING_DATE as ENTERING3_0_0_,
        this_.NAME as NAME4_0_0_,
        this_.nationality as national5_0_0_ 
    from
        student this_
31-Jul-2018 10:30:47.185 WARN [http-nio-8080-exec-3] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions SQL Error: 1054, SQLState: 42S22
31-Jul-2018 10:30:47.187 ERROR [http-nio-8080-exec-3] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions Unknown column 'this_.nationality' in 'field list'


It also tells me that
Request processing failed; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
.

I don't understand what's wrong. I downloaded the code, and created the database myself, is there something wrong with it?
Moreover, I changed the URL, the password, because Spring finds this database and even tries to do something with it....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2018-07-31
@LaRN

The error explicitly states that there is an unknown field:
Unknown column 'this_.nationality' in 'field list'
Check that the student table has a nationality field.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question