-->
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: null pointer exception
PostPosted: Mon Mar 08, 2010 2:10 am 
Beginner
Beginner

Joined: Fri Feb 26, 2010 8:23 am
Posts: 29
i am new to hibernate i try outer join query in hibernate.
but it is showing null pointer exception which is in the line ==> Iterator ite = query.list().iterator();
please send the reply to me how i can solve this error.it is very urgent.
i send the full stack trace of my exception.
11:31:44,562 INFO Environment:456 -11:31:44,562 INFO Environment:469 -11:31:44,562 INFO Environment:502 -11:31:44,562 INFO Environment:532 -11:31:44,562 INFO Configuration:1228 -11:31:44,562 INFO Configuration:1199 -11:31:44,875 INFO Configuration:439 -11:31:45,078 INFO HbmBinder:256 -11:31:45,093 INFO Configuration:439 -11:31:45,140 INFO HbmBinder:256 -11:31:45,140 INFO Configuration:1340 -11:31:45,156 INFO Configuration:844 -11:31:45,156 INFO Configuration:848 -11:31:45,156 INFO Configuration:857 -11:31:45,156 INFO Configuration:884 -11:31:45,359 INFO Dialect:89 -11:31:45,375 INFO SettingsFactory:87 -11:31:45,390 INFO SettingsFactory:90 -11:31:45,390 INFO SettingsFactory:94 -11:31:45,390 INFO SettingsFactory:98 -11:31:45,390 INFO SettingsFactory:273 -11:31:45,390 INFO ASTQueryTranslatorFactory:21 -11:31:45,390 INFO SettingsFactory:106 -11:31:45,390 INFO DriverManagerConnectionProvider:41 -11:31:45,390 INFO DriverManagerConnectionProvider:42 -11:31:45,390 INFO DriverManagerConnectionProvider:45 -11:31:45,406 INFO DriverManagerConnectionProvider:80 -11:31:45,406 INFO DriverManagerConnectionProvider:86 -11:31:46,093 INFO SettingsFactory:148 -11:31:46,093 INFO SettingsFactory:151 -11:31:46,093 INFO SettingsFactory:156 -11:31:46,093 INFO SettingsFactory:164 -11:31:46,109 INFO TransactionFactoryFactory:31 -11:31:46,109 INFO TransactionManagerLookupFactory:33 -11:31:46,109 INFO SettingsFactory:176 -11:31:46,125 INFO SettingsFactory:179 -11:31:46,125 INFO SettingsFactory:260 -11:31:46,171 INFO SettingsFactory:187 -11:31:46,171 INFO SettingsFactory:192 -11:31:46,171 INFO SettingsFactory:199 -11:31:46,171 INFO SettingsFactory:203 -11:31:46,171 INFO SettingsFactory:210 -11:31:46,171 INFO SettingsFactory:214 -11:31:46,171 INFO SettingsFactory:218 -11:31:46,171 INFO SettingsFactory:232 -11:31:46,359 INFO SessionFactoryImpl:140 -11:31:46,359 DEBUG CacheManager:191 -11:31:46,359 DEBUG CacheManager:164 -11:31:46,375 WARN Configurator:126 -11:31:46,390 DEBUG Configuration$DiskStore:185 -11:31:46,687 INFO SessionFactoryObjectFactory:82 -11:31:46,687 INFO SessionFactoryImpl:366 -11:31:46,828 DEBUG parser:83 -null
java.lang.NullPointerException
at org.hibernate.hql.ast.LiteralProcessor.lookupConstant(LiteralProcessor.java:67)
at org.hibernate.hql.ast.DotNode.resolve(DotNode.java:171)
at org.hibernate.hql.ast.FromReferenceNode.resolve(FromReferenceNode.java:87)
at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:266)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:2475)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2323)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2232)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:498)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:356)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:184)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:140)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:773)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at sample.Inner.main(Inner.java:23)


Top
 Profile  
 
 Post subject: Re: null pointer exception
PostPosted: Mon Mar 08, 2010 3:08 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
seems that there is a problem in the query syntax.
Can you please give more details about your query-condition.


Top
 Profile  
 
 Post subject: Re: null pointer exception
PostPosted: Mon Mar 08, 2010 3:10 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
There is some error in the query. It would help if you posted your code.


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.