It might be the problem with configuration but I don't know that. I am getting the following messages along with the exceptions message
11:25:24,701 INFO Environment:447 - Hibernate 3.0 beta 2
11:25:24,717 INFO Environment:465 - loaded properties from resource hibernate.properties: {hibernate.connection.username=cr_appsrvr, hibernate.connection.password=appsrvr, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=org.hibernate.dialect.OracleDialect, hibernate.connection.url=jdbc:oracle:thin:@10.130.30.37:10920:widev, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver}
11:25:24,717 INFO Environment:493 - using CGLIB reflection optimizer
11:25:24,732 INFO Environment:523 - using JDK 1.4 java.sql.Timestamp handling
11:25:24,732 INFO Configuration:821 - processing extends queue
11:25:24,732 INFO Configuration:825 - processing collection mappings
11:25:24,732 INFO Configuration:834 - processing association property references
11:25:24,732 INFO Configuration:861 - processing foreign key constraints
11:25:24,764 INFO Dialect:86 - Using dialect: org.hibernate.dialect.OracleDialect
11:25:24,873 INFO SettingsFactory:92 - Generate SQL with comments: disabled
11:25:24,873 INFO SettingsFactory:96 - Order SQL updates by primary key: disabled
11:25:24,873 INFO SettingsFactory:264 - Query translator: org.hibernate.hql.classic.ClassicQueryTranslatorFactory
11:25:24,889 INFO SettingsFactory:104 - Query language substitutions: {}
11:25:24,889 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
11:25:24,889 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
11:25:24,889 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
11:25:25,014 INFO DriverManagerConnectionProvider:80 - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@10.130.30.37:10920:widev
11:25:25,014 INFO DriverManagerConnectionProvider:86 - connection properties: {user=cr_appsrvr, password=****}
11:25:25,670 INFO SettingsFactory:145 - JDBC batch size: 15
11:25:25,670 INFO SettingsFactory:148 - JDBC batch updates for versioned data: disabled
11:25:25,670 INFO SettingsFactory:153 - Scrollable result sets: enabled
11:25:25,670 INFO SettingsFactory:161 - JDBC3 getGeneratedKeys(): disabled
11:25:25,686 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
11:25:25,686 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
11:25:25,686 INFO SettingsFactory:173 - Automatic flush during beforeCompletion(): disabled
11:25:25,686 INFO SettingsFactory:176 - Automatic session close at end of transaction: disabled
11:25:25,686 INFO SettingsFactory:251 - Cache provider: org.hibernate.cache.EhCacheProvider
11:25:25,686 INFO SettingsFactory:184 - Second-level cache: enabled
11:25:25,686 INFO SettingsFactory:186 - Optimize cache for minimal puts: disabled
11:25:25,701 INFO SettingsFactory:194 - Structured second-level cache entries: enabled
11:25:25,701 INFO SettingsFactory:198 - Query cache: disabled
11:25:25,701 INFO SettingsFactory:209 - Statistics: disabled
11:25:25,701 INFO SettingsFactory:213 - Deleted entity synthetic identifier rollback: disabled
11:25:25,936 INFO SessionFactoryImpl:137 - building session factory
11:25:26,217 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/BnaSwitch/lib/third-party/hibernate/ehcache-1.1.jar!/ehcache-failsafe.xml
11:25:26,279 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
11:25:26,279 INFO SessionFactoryImpl:363 - Checking 0 named queries
org.hibernate.QueryException: in expected: msg [from Message msg order by msg.text asc]
at org.hibernate.hql.classic.FromParser.token(FromParser.java:106)
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:86)
at org.hibernate.hql.classic.PreprocessingParser.token(PreprocessingParser.java:108)
at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:29)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:172)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:148)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:410)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:987)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1018)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
at com.webmd.bna.hello.ReadMessage.main(ReadMessage.java:42)
I tried looking for help on Google. Somebody was getting the similar exception and they said that when they added Message (or their class ) to the configuration, then the error was gone and everything ran successfully. So, I am not sure what to do becuase from the messages I see when I create configuration object it is able to find hibernate.properties successfully and my Message.hbm.xml mapping document is in the same directory..
Thanx for your help.
|