Hello,
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.
hibernate.cfg.xml
<hibernate-configuration>
<session-factory>
<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"/>
</session-factory>
</hibernate-configuration>
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()
.buildSessionFactory();
} 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/
User.hbm.xml
[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
ctory}
[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
torFactory
[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
/examples/./examplesServer/.wlnotdelete/examplesServer_lfapp_lfapp/jarfiles/WEB-
INF/lib/ehcache-1.136399.jar!/ehcache-failsafe.xml
[INFO] SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name c
onfigured
[INFO] SessionFactoryImpl - Checking 0 named queries
Hibernate Util --- currentSession
DataAccessFacade ----- qspGet1List
CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
Thanks in advance
Sridhar