-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: session.createQuery() error SOS !!
PostPosted: Mon Jun 19, 2006 11:17 am 
Newbie

Joined: Wed Jun 07, 2006 3:21 pm
Posts: 13
Need help with Hibernate? Read this first:

I am getting a MethodNotFoundError while executing session.createQuery() . I am able to insert , delete using the POJO but unable to select .




JDK- 131

Hibernate version:[/b]
3.1.3
Mapping documents:


<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="Event" table="event">
<id name="Id" column="ID">

</id>
<property name="title" column="TITLE"/>
<property name="eventDate" type="date" column="EVENT_DATE"/>



</class>


</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
session.beginTransaction();

List result = session.createQuery("from Event").list();

Full stack trace of any exception that occurs:
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - Hibernate 3.1.3
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - hibernate.properties not found
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - using CGLIB reflection optimizer
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - JVM does not support Statement.getGeneratedKeys()
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - JVM does not support LinkedHasMap, LinkedHashSet - ordered maps and sets disabled
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - using workaround for JVM bug in java.sql.Timestamp
19 Jun 2006 11:07:53 [INFO ] org.hibernate.cfg.Environment - using pre JDK 1.4 java.sql.Timestamp handling

19 Jun 2006 11:07:54 [INFO ] org.hibernate.cfg.Configuration - Reading mappings from file: C:\mywork\ideaprojects\CCAS-REPORT-AUTOMATION\com\trx\persistence\utils\event.hbm.xml
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - trying to resolve system-id [file:///C:/mywork/ideaprojects/CCAS-REPORT-AUTOMATION/config/hibernate-mapping-3.0.dtd]
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - recognized local namespace; attempting to resolve on classpath
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - unable to locate [file:///C:/mywork/ideaprojects/CCAS-REPORT-AUTOMATION/config/hibernate-mapping-3.0.dtd] on classpath
19 Jun 2006 11:07:54 [INFO ] org.hibernate.cfg.HbmBinder - Mapping class: Event -> event
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: Id -> ID
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: title -> TITLE
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: eventDate -> EVENT_DATE
19 Jun 2006 11:07:54 [INFO ] org.hibernate.cfg.Configuration - Reading mappings from file: C:\mywork\ideaprojects\CCAS-REPORT-AUTOMATION\com\trx\persistence\utils\person.hbm.xml
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.util.DTDEntityResolver - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
19 Jun 2006 11:07:54 [INFO ] org.hibernate.cfg.HbmBinder - Mapping class: Person -> person
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: Id -> PERSON_ID
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: firstName -> FIRST_NAME
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: lastName -> LAST_NAME
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: age -> AGE
19 Jun 2006 11:07:54 [INFO ] org.hibernate.cfg.HbmBinder - Mapping collection: Person.events -> PERSON_EVENT
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.HbmBinder - Mapped property: events

19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - Preparing to build session factory with filters : {}
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - processing extends queue
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - processing collection mappings
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.CollectionSecondPass - Second pass for collection: Person.events
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.CollectionSecondPass - Mapped collection key: PERSON_ID, element: EVENT_ID
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - processing native query and ResultSetMapping mappings
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - processing association property references
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - processing foreign key constraints
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - resolving reference to class: Person
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.cfg.Configuration - resolving reference to class: Event
19 Jun 2006 11:07:54 [INFO ] org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
19 Jun 2006 11:07:54 [INFO ] org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
19 Jun 2006 11:07:54 [INFO ] org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
19 Jun 2006 11:07:54 [INFO ] org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@localhost:1521:TEST
19 Jun 2006 11:07:54 [INFO ] org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=system, password=oracle}
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
19 Jun 2006 11:07:54 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - created connection to: jdbc:oracle:thin:@localhost:1521:TEST, Isolation Level: 2
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
19 Jun 2006 11:07:55 [INFO ] org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle9Dialect
19 Jun 2006 11:07:55 [INFO ] org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
19 Jun 2006 11:07:55 [INFO ] org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Connection release mode: auto
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
19 Jun 2006 11:07:55 [INFO ] org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Query cache: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.exception.SQLExceptionConverterFactory - Using dialect defined converter
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Statistics: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
19 Jun 2006 11:07:55 [INFO ] org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
19 Jun 2006 11:07:55 [INFO ] org.hibernate.impl.SessionFactoryImpl - building session factory
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryImpl - Session factory constructed with filter configurations : {}
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryImpl - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=oracle, sun.boot.library.path=C:\jdk13101\jre\bin, java.vm.version=1.3.1_01, hibernate.connection.username=system, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, idea.launcher.port=7543, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\mywork\ideaprojects\CCAS-REPORT-AUTOMATION, java.runtime.version=1.3.1_01, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hibernate.current_session_context_class=thread, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\MARUNA~1\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., java.awt.fonts=, os.name=Windows 2000, java.library.path=C:\jdk13101\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\WINDOWS\Downloaded Program Files;C:\IBMTOOLS\Python22;C:\Program Files\PC-Doctor for Windows\services;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\mystuff\software;C:\Program Files\Rational\common;C:\db2\BIN;C:\db2\FUNCTION;C:\db2\SAMPLES\REPL;C:\Program Files\Common Files\MicroStrategy;C:\Program Files\MicroStrategy\Desktop;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROGRA~1\CA\ETRUST~1;C:\mystuff\software\jwsdp\jwsdp-shared\bin, java.specification.name=Java Platform API Specification, java.class.version=47.0, os.version=5.1, user.home=C:\Documents and Settings\mArunachalam, user.timezone=America/New_York, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=windows-1252, java.specification.version=1.3, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver, user.name=mArunachalam, java.class.path=C:\jdk13101\jre\lib\i18n.jar;C:\jdk13101\jre\lib\jaws.jar;C:\jdk13101\jre\lib\rt.jar;C:\jdk13101\jre\lib\sunrsasign.jar;C:\mywork\ideaprojects\CCAS-REPORT-AUTOMATION\classes;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\asm.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\asm-attrs.jar;C:\mystuff\software\Xerces-J-bin.2.7.0\xerces-2_7_0\xml-apis.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\commons-logging-1.0.4.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\jgroups-2.2.8.jar;C:\oracle\ora92\jdbc\lib\classes12.zip;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\hibernate3.jar;C:\mystuff\software\Xerces-J-bin.2.7.0\xerces-2_7_0\xercesImpl.jar;C:\mystuff\software\Xerces-J-bin.2.7.0\xerces-2_7_0\resolver.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\cglib-2.1.3.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\antlr-2.7.6rc1.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\ant-antlr-1.6.5.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\dom4j-1.6.1.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\commons-collections-2.1.1.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\oscache-2.1.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\ehcache-1.1.jar;C:\mystuff\software\hibernate-3.1.3\hibernate-3.1\lib\jta.jar;C:\mystuff\software\logging-log4j-1.2.12\logging-log4j-1.2.12\dist\lib\log4j-1.2.12.jar;C:\mywork\ideaprojects\CCAS-REPORT-AUTOMATION;C:\mystuff\software\db2jdbcdriver\lib\util.jar;C:\mystuff\software\db2jdbcdriver\lib\base.jar;C:\mystuff\software\db2jdbcdriver\lib\db2.jar;C:\mywork\trx\PROJECTS\2006\24553-CCAS-REPORT-AUTOMATION\projects\citicom\lib\mysql206.jar;C:\IntelliJ-IDEA-4.5\lib\idea_rt.jar, hibernate.show_sql=false, java.vm.specification.version=1.0, java.home=C:\jdk13101\jre, hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:TEST, hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, hibernate.cglib.use_reflection_optimizer=true, java.version=1.3.1_01, java.ext.dirs=C:\jdk13101\jre\lib\ext, sun.boot.class.path=C:\jdk13101\jre\lib\rt.jar;C:\jdk13101\jre\lib\i18n.jar;C:\jdk13101\jre\lib\sunrsasign.jar;C:\jdk13101\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, idea.launcher.library=C:\IntelliJ-IDEA-4.5\bin\breakgen.dll, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, user.region=US, sun.cpu.isalist=pentium i486 i386}
19 Jun 2006 11:07:55 [DEBUG] net.sf.ehcache.CacheManager - Creating new CacheManager with default config
19 Jun 2006 11:07:55 [DEBUG] net.sf.ehcache.CacheManager - Configuring ehcache from classpath.
19 Jun 2006 11:07:55 [WARN ] net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/mystuff/software/hibernate-3.1.3/hibernate-3.1/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
19 Jun 2006 11:07:55 [DEBUG] net.sf.ehcache.config.Configuration$DiskStore - Disk Store Path: C:\DOCUME~1\MARUNA~1\LOCALS~1\Temp\
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: Event
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Version select: select ID from event where ID =?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select event_.ID, event_.TITLE as TITLE0_, event_.EVENT_DATE as EVENT3_0_ from event event_ where event_.ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into event (TITLE, EVENT_DATE, ID) values (?, ?, ?)
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update event set TITLE=?, EVENT_DATE=? where ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from event where ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: Person
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Version select: select PERSON_ID from person where PERSON_ID =?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: select person_.PERSON_ID, person_.FIRST_NAME as FIRST2_1_, person_.LAST_NAME as LAST3_1_, person_.AGE as AGE1_ from person person_ where person_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: insert into person (FIRST_NAME, LAST_NAME, AGE, PERSON_ID) values (?, ?, ?, ?)
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Update 0: update person set FIRST_NAME=?, LAST_NAME=?, AGE=? where PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: delete from person where PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.collection.AbstractCollectionPersister - Static SQL for collection: Person.events
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.collection.AbstractCollectionPersister - Row insert: insert into PERSON_EVENT (PERSON_ID, EVENT_ID) values (?, ?)
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.collection.AbstractCollectionPersister - Row update: update PERSON_EVENT set EVENT_ID=? where PERSON_ID=? and EVENT_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.collection.AbstractCollectionPersister - Row delete: delete from PERSON_EVENT where PERSON_ID=? and EVENT_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.persister.collection.AbstractCollectionPersister - One-shot delete: delete from PERSON_EVENT where PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=? for update
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=? for update nowait
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity Event: select event0_.ID as ID0_0_, event0_.TITLE as TITLE0_0_, event0_.EVENT_DATE as EVENT3_0_0_ from event event0_ where event0_.ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=? for update
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=? for update nowait
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_MERGE on entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.entity.EntityLoader - Static select for action ACTION_REFRESH on entity Person: select person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_, person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from person person0_ where person0_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.loader.collection.BasicCollectionLoader - Static select for collection Person.events: select events0_.PERSON_ID as PERSON1_1_, events0_.EVENT_ID as EVENT2_1_, event1_.ID as ID0_0_, event1_.TITLE as TITLE0_0_, event1_.EVENT_DATE as EVENT3_0_0_ from PERSON_EVENT events0_ left outer join event event1_ on events0_.EVENT_ID=event1_.ID where events0_.PERSON_ID=?
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryObjectFactory - registered: 297ed41d0becd561010becd5636c0000 (unnamed)
19 Jun 2006 11:07:55 [INFO ] org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryImpl - instantiated session factory
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryImpl - Checking 0 named HQL queries
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionFactoryImpl - Checking 0 named SQL queries
4
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.impl.SessionImpl - opened session at timestamp: 4713388751536128
END openSession
LIST EVENTS
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.context.ThreadLocalSessionContext - allowing method [beginTransaction] in non-transacted context
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.context.ThreadLocalSessionContext - allowing proxied method [beginTransaction] to proceed to real session
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.transaction.JDBCTransaction - begin
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.jdbc.ConnectionManager - opening JDBC connection
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - total checked-out connections: 0
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.connection.DriverManagerConnectionProvider - using pooled JDBC connection, pool size: 0
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.transaction.JDBCTransaction - current autocommit status: false
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.jdbc.JDBCContext - after transaction begin
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.context.ThreadLocalSessionContext - allowing proxied method [createQuery] to proceed to real session
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.engine.query.QueryPlanCache - unable to locate HQL query plan in cache; generating (from Event)
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.hql.ast.QueryTranslatorImpl - parse() - HQL: from Event
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.hql.ast.AST - --- HQL AST ---
\-[QUERY] 'query'
\-[SELECT_FROM] 'SELECT_FROM'
\-[FROM] 'from'
\-[RANGE] 'RANGE'
\-[IDENT] 'Event'

19 Jun 2006 11:07:55 [DEBUG] org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
19 Jun 2006 11:07:55 [DEBUG] org.hibernate.hql.antlr.HqlSqlBaseWalker - select << begin [level=1, statement=select]
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.tree.FromElement - FromClause{level=1} : Event (no alias) -> event0_
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.antlr.HqlSqlBaseWalker - select : finishing up [level=1, statement=select]
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.HqlSqlWalker - processQuery() : ( SELECT ( FromClause{level=1} event event0_ ) )
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.HqlSqlWalker - Derived SELECT clause created.
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.util.JoinProcessor - Using FROM fragment [event event0_]
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.antlr.HqlSqlBaseWalker - select >> end [level=1, statement=select]
19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.AST - --- SQL AST ---
\-[SELECT] QueryNode: 'SELECT' querySpaces (event)
+-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
| +-[SELECT_EXPR] SelectExpressionImpl: 'event0_.ID as ID0_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=event,tableAlias=event0_,origin=null,colums={,className=Event}}}
| \-[SQL_TOKEN] SqlFragment: 'event0_.TITLE as TITLE0_, event0_.EVENT_DATE as EVENT3_0_'
\-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[event0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
\-[FROM_FRAGMENT] FromElement: 'event event0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=null,role=null,tableName=event,tableAlias=event0_,origin=null,colums={,className=Event}}

19 Jun 2006 11:07:56 [DEBUG] org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors
java.lang.reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError
at org.hibernate.hql.ast.SqlGenerator$DefaultWriter.clause(SqlGenerator.java:170)
at org.hibernate.hql.ast.SqlGenerator.out(SqlGenerator.java:44)
at org.hibernate.hql.antlr.SqlGeneratorBase.selectStatement(SqlGeneratorBase.java:166)
at org.hibernate.hql.antlr.SqlGeneratorBase.statement(SqlGeneratorBase.java:117)
at org.hibernate.hql.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:203)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:178)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at java.lang.reflect.Method.invoke(Native Method)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at $Proxy0.createQuery(Unknown Source)
at EventManager.listEvents(EventManager.java:56)
at EventManager.main(EventManager.java:202)


Name and version of the database you are using:
ORACLE 9

The generated SQL (show_sql=true):


Debug level Hibernate log excerpt:


POJO-



import java.util.*;


public class Event
{

private String id = null;
private String title = null;
private java.util.Date eventDate = null;

public void setId(String newId)
{
id = newId;
}

public String getId()
{
return id;
}

public void setEventDate(java.util.Date newDate)
{
eventDate=newDate;
}

public java.util.Date getEventDate()
{
return eventDate;
}

public void setTitle(String newTitle)
{
title = newTitle;
}

public String getTitle()
{
return title;
}
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 4:16 pm 
Newbie

Joined: Wed Mar 22, 2006 3:22 pm
Posts: 9
not sure if this is it but I think this

<id name="Id" column="ID">

should be

<id name="id" column="ID">


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 5:06 pm 
Newbie

Joined: Wed Jun 07, 2006 3:21 pm
Posts: 13
hi ,
Thanks . I did change the name of the property as you suggested but still its not working . I am able to insert /update/delete but unable to select using the createQuery() . Is it because I am using jdk131 because the code worked fine in JDK142.

Thanks ,
Arun


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.