[solved] exception in thread main java.lang.noclassdeffounderror wrong name
Exception in thread main java.lang.noclassdeffounderror wrong name:
This error may occur due to the below line in your hibernate project,
List employees = s.createQuery(“FROM employee”).list();
we must use “From Employee” while selecting from our db using hibernate.
Eventhough we have created our table as EMPLOYEE also we must specify there as “From Employee” only.
After changing this to
List employees = s.createQuery(“FROM Employee”).list();
Now it will execute without throwing any errors and takes the values from db to list.
Hope it helps you…..!!!
365 total views, 1 views today