-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate problrm
PostPosted: Thu Jun 05, 2008 12:02 am 
Newbie

Joined: Fri Apr 25, 2008 8:02 am
Posts: 5
hi

i new to hibernate concept.

I got following exception while executing.

please help me.


Jun 5, 2008 9:22:13 AM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.6
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : event/Sample.hbm.xml
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: event.Sample -> sample
Jun 5, 2008 9:22:14 AM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Jun 5, 2008 9:22:14 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
Jun 5, 2008 9:22:14 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
Jun 5, 2008 9:22:14 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: autocommit mode: false
Jun 5, 2008 9:22:14 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/test
Jun 5, 2008 9:22:14 AM org.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=root, password=****}
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 5.0.45-community-nt
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
Jun 5, 2008 9:22:15 AM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLDialect
Jun 5, 2008 9:22:15 AM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
Jun 5, 2008 9:22:15 AM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Jun 5, 2008 9:22:15 AM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.NoCacheProvider
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Jun 5, 2008 9:22:15 AM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
Jun 5, 2008 9:22:15 AM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Exception in thread "main" java.lang.NullPointerException
at Test.main(Test.java:30)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 11:50 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
What's going on at line 30? That seems to be where the error is.

Perhaps it's a setup problem. Here's a good tutorial on setting up Hibernate and getting things working. It might be a good resource for you:

http://www.hiberbook.com/HiberBookWeb/learn.jsp?tutorial=01howtogetstartedwithhibernate

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.