-->
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.  [ 1 post ] 
Author Message
 Post subject: NullPointerException on HQL
PostPosted: Sat Apr 15, 2006 6:05 pm 
Newbie

Joined: Sat Apr 08, 2006 1:07 pm
Posts: 3
Hello,

I encounter NullPointerException when trying to get list of a table elements.
Mean that createQuery return Null but don"t understand why

Thanks.

Hibernate: select playerinfo0_.Id as Id73_, playerinfo0_.Name as Name73_, playerinfo0_.HistoryScore as HistoryS3_73_, playerinfo0_.Credits as Credits73_ from Player playerinfo0_
2006-04-16 01:47:19,919 : JFactory.postInvoke : system exception in business method:
java.lang.NullPointerException



Here my call :

final List players = ssn.createQuery("from PlayerInfo").list();


<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.insia.hyplite.beans">
<class name="PlayerInfo" table="Player" lazy="true">
<id name="id" column="Id">
<generator class="native"/>
</id>
<property name="name" column="Name"/>
<property name="historyScore" column="HistoryScore"/>
<property name="credits" column="Credits"/>


<set name="planets" cascade="save-update,persist,delete" inverse="true">
<key column="PlayerId"/>
<one-to-many class="PlanetInfo"/>
</set>



<set name="alliances" inverse="true" table="AlliancePlayer">
<key column="playerId"/>
<many-to-many column="allianceId"
class="AllianceInfo"/>
</set>

</class>
</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.