Mysql Sql Error 0 Sqlstate S0022
Contents |
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.
Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Object Relational Mapping Hibernate: Column not found. org.hibernate.exception.GenericJDBCException Natalie Ap Ranch Hand Posts: 49 posted 7 years ago Hi all, https://forum.hibernate.org/viewtopic.php?f=1&t=1006399 I am stuck with this since a very long time. I am getting this error for an HQL or a native sql query in hibernate. I request you to help me. I am unable to find https://coderanch.com/t/458459/databases/Hibernate-Column-org-hibernate-exception the post where this has been discussed before. Kindly help! Error INFO: Not binding factory to JNDI, no JNDI name configured Aug 14, 2009 7:04:57 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries INFO: Checking 0 named queries Hibernate: select user0_.USERNAME from USER user0_ Aug 14, 2009 7:04:58 PM org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: S0022 Aug 14, 2009 7:04:58 PM org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: Column 'col_0_0_' not found. Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92) at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1518) at org.hibernate.loader.Loader.list(Loader.java:1498) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:266) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:788) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74) at myapp.test.dao.HibernateDAO.validatePassword(HibernateDAO.java:41) at myapp.test.dao.HibernateDAO.main(HibernateDAO.java:468) Caused by: java.sql.SQLException: Column 'col_0_0_' not found. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.Re
and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor. Announcement Announcement http://forum.spring.io/forum/spring-projects/data/31830-createsqlquery-problems Module Collapse No announcement yet. createSqlQuery problems Page Title Module Move https://access.redhat.com/solutions/716233 Remove Collapse X Conversation Detail Module Collapse Posts Latest Activity Search Forums Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts ultron not found Junior Member Join Date: Apr 2007 Posts: 6 #1 createSqlQuery problems Jun 23rd, 2007, 10:34 AM I'm trying to do a very simple native SQL query using Spring/Hibernate like this: Code: List subscriptions = getSession().createSQLQuery("select {s}.ID as {s.id} from product {s}") .addEntity("s", Product.class) .list(); The above code produces the following exception: Code: 2007-06-23 17:24:46,789 column not found INFO [org.hibernate.type.IntegerType] - could not read column value from result set: clazz_0_; Column 'clazz_0_' not found. 2007-06-23 17:24:46,789 INFO [org.hibernate.type.IntegerType] - could not read column value from result set: clazz_0_; Column 'clazz_0_' not found. 2007-06-23 17:24:46,794 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: S0022 2007-06-23 17:24:46,794 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 0, SQLState: S0022 2007-06-23 17:24:46,794 ERROR [org.hibernate.util.JDBCExceptionReporter] - Column 'clazz_0_' not found. 2007-06-23 17:24:46,794 ERROR [org.hibernate.util.JDBCExceptionReporter] Column 'clazz_0_' not found. The following HQL query works fine though: Code: getHibernateTemplate().find("from Product"); Can anyone with some more experience with this please point me in the right direction, as I'm out of ideas on this one. I Tags: None dr_pompeii Senior Member Join Date: Aug 2006 Posts: 2846 - Manuel Jordan Kill Your Pride, Share Your Knowledge With All The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7 Blog LinkedIn Technical Reviewer of Apress SpringSource Certified Instructor SpringSource Certified Spring Professional #2 Jun 24
Red Hat Certificate System Red Hat Satellite Subscription Asset Manager Red Hat Update Infrastructure Red Hat Insights Ansible Tower by Red Hat Cloud Computing Back Red Hat CloudForms Red Hat OpenStack Platform Red Hat Cloud Infrastructure Red Hat Cloud Suite Red Hat OpenShift Container Platform Red Hat OpenShift Online Red Hat OpenShift Dedicated Storage Back Red Hat Gluster Storage Red Hat Ceph Storage JBoss Development and Management Back Red Hat JBoss Enterprise Application Platform Red Hat JBoss Data Grid Red Hat JBoss Web Server Red Hat JBoss Portal Red Hat JBoss Operations Network Red Hat JBoss Developer Studio JBoss Integration and Automation Back Red Hat JBoss Data Virtualization Red Hat JBoss Fuse Red Hat JBoss A-MQ Red Hat JBoss BPM Suite Red Hat JBoss BRMS Mobile Back Red Hat Mobile Application Platform Services Back Consulting Technical Account Management Training & Certifications Red Hat Enterprise Linux Developer Program Support Get Support Production Support Development Support Product Life Cycle & Update Policies Knowledge Search Documentation Knowledgebase Videos Discussions Ecosystem Browse Certified Solutions Overview Partner Resources Tools Back Red Hat Insights Learn More Red Hat Access Labs Explore Labs Configuration Deployment Troubleshooting Security Additional Tools Red Hat Access plug-ins Red Hat Satellite Certificate Tool Security Back Product Security Center Security Updates Security Advisories Red Hat CVE Database Security Labs Resources Overview Security Blog Security Measurement Severity Ratings Backporting Policies Product Signing (GPG) Keys Community Back Discussions Red Hat Enterprise Linux Red Hat Virtualization Red Hat Satellite Customer Portal Private Groups All Discussions Start a Discussion Blogs Customer Portal Red Hat Product Security Red Hat Access Labs Red Hat Insights All Blogs Events Customer Eve