• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate3.0 with Weblogic7.0  RSS feed

sridhar vu
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm migrating my web application from Tomcat 5.0.30 to weblogic 7.0. I'm having problem with hibernate when I deploy it. Can some one please help me with this.

Configuration settings are given below.


<property name="jndi.url">t3://localhost:7001</property>
<property name="jndi.class">weblogic.jndi.WLInitialContextFactory</property>
<property name="connection.datasource">jdbc/lossforecast</property>
<property name="show_sql">false</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- Mapping files -->
<mapping resource="com/test/lossforecast/dao/hibernate/User.hbm.xml"/>

Class where I'm getting the SessionFactory:

public class HibernateUtil {
private static final SessionFactory sessionFactory;
private static Log log = LogFactory.getLog(HibernateUtil.class.getName());

static {
try {
sessionFactory = new Configuration().configure()
} catch (Throwable ex) {
log.error("HibernateUtil error", ex);
throw new ExceptionInInitializerError(ex);

Console Messages:

[INFO] Environment - Hibernate 3.0.5
[INFO] Environment - hibernate.properties not found
[INFO] Environment - using CGLIB reflection optimizer
[INFO] Environment - JVM does not support Statement.getGeneratedKeys()
[INFO] Environment - JVM does not support LinkedHasMap, LinkedHashSet - ordered
maps and sets disabled
[INFO] Environment - using workaround for JVM bug in java.sql.Timestamp
[INFO] Environment - using pre JDK 1.4 java.sql.Timestamp handling
[INFO] Configuration - configuring from resource: /hibernate.cfg.xml
[INFO] Configuration - Configuration resource: /hibernate.cfg.xml
[INFO] Configuration - Mapping resource: com/bac/pao/lossforecast/dao/hibernate/
[INFO] Configuration - Configured SessionFactory: null
[INFO] Configuration - processing extends queue
[INFO] Configuration - processing collection mappings
[INFO] Configuration - processing association property references
[INFO] Configuration - processing foreign key constraints
[INFO] NamingHelper - JNDI InitialContext properties:{java.naming.provider.url=t
3://localhost:7001, java.naming.factory.initial=weblogic.jndi.WLInitialContextFa
[INFO] DatasourceConnectionProvider - Using datasource: jdbc/lossforecast
[INFO] SettingsFactory - RDBMS: Microsoft SQL Server, version: Microsoft SQL Ser
ver 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

[INFO] SettingsFactory - JDBC driver: SQLServer, version: 2.2.0040
[INFO] Dialect - Using dialect: org.hibernate.dialect.SQLServerDialect
[INFO] TransactionFactoryFactory - Using default transaction strategy (direct JD
BC transactions)
[INFO] TransactionManagerLookupFactory - No TransactionManagerLookup configured
(in JTA environment, use of read-write or transactional second-level cache is no
t recommended)
[INFO] SettingsFactory - Automatic flush during beforeCompletion(): disabled
[INFO] SettingsFactory - Automatic session close at end of transaction: disabled

[INFO] SettingsFactory - Scrollable result sets: enabled
[INFO] SettingsFactory - JDBC3 getGeneratedKeys(): disabled
[INFO] SettingsFactory - Connection release mode: null
[INFO] SettingsFactory - Default batch fetch size: 1
[INFO] SettingsFactory - Generate SQL with comments: disabled
[INFO] SettingsFactory - Order SQL updates by primary key: disabled
[INFO] SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTransla
[INFO] ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
[INFO] SettingsFactory - Query language substitutions: {}
[INFO] SettingsFactory - Second-level cache: enabled
[INFO] SettingsFactory - Query cache: disabled
[INFO] SettingsFactory - Cache provider: org.hibernate.cache.EhCacheProvider
[INFO] SettingsFactory - Optimize cache for minimal puts: disabled
[INFO] SettingsFactory - Structured second-level cache entries: disabled
[INFO] SettingsFactory - Statistics: disabled
[INFO] SettingsFactory - Deleted entity synthetic identifier rollback: disabled
[INFO] SettingsFactory - Default entity-mode: pojo
[INFO] SessionFactoryImpl - building session factory
[WARN] Configurator - No configuration found. Configuring ehcache from ehcache-f
ailsafe.xml found in the classpath: zip:C:/bea/weblogic700/samples/server/config
[INFO] SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name c
[INFO] SessionFactoryImpl - Checking 0 named queries
Hibernate Util --- currentSession
DataAccessFacade ----- qspGet1List
CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken

Thanks in advance
Tim Troy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Hibernate3 Migration Guide for part of the answer. Instead of modifing my WebLogic pre-classpath, I added the hibernate property:

As I understand it, this forces Hibernate to use version 2 query parser.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!