Hibernate error while running web project

Asked

Viewed 208 times

1

I have an error that I could not solve, I start my project and it runs straight.
When I access the project via the web, I log in and it.
When I click on any button, it gives this error below:

Hibernate:

select
    person0_.id as id1_3_,
    person0_.accessUserName as accessUs2_3_,
    person0_.hourPay as hourPay3_3_,
    person0_.name as name4_3_,
    person0_.version as version5_3_ 
from
    Person person0_ 
where
    person0_.accessUserName=?

Error:

2017-01-10 11:46:32,889 [http-bio-8080-exec-1] ERROR org.hibernate.engine.jdbc.spi.Sqlexceptionhelper - ERROR: column person0_.accessusername does not exist Tip: Perhaps you Meant to Reference the column "person0_.access_user_name". Position: 31

  • I don’t understand what this has to do with Spring or Spring Roo. I edited the title and tags.

  • So, is that the project was done with Spring Roo, and in cmapo "Tags" here Stack does not have this option hahahah, but then, every time I starto, give this error, when I try to access some link from my screen, and the error is that the field does not exist.

  • Odair, is that to create tags has to have a little bit of experience on the site, this is not allowed to newcomers to avoid creating bad tags and tags with spam (and even so some of these still end up being created). If you want, I can add [spring] and [spring-Roo] tags, but while your project may use Spring Roo, it doesn’t mean that the scope of the question addresses Spring Roo.

  • Which database do you use? How is access done to it?

1 answer

0

The error message is very clear - the column accessusername of your select does not exist, but the column access_user_name exists.

So, what you have to do is fix your SQL query by correcting the spelling of the name of that column.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.