[hibernate-issues] [Hibernate-JIRA] Commented: (EJB-192) Serialization exception with hashCode() and eager-eager

Stefan Norberg (JIRA) noreply at atlassian.com
Tue Aug 29 06:55:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-192?page=comments#action_24203 ] 

Stefan Norberg commented on EJB-192:
------------------------------------

Your report has been assigned an internal review ID of 784589, which is NOT visible
on the Sun Developer Network (SDN).

---------------------------------------------------------------


Date Created: Tue Aug 29 04:51:04 MDT 2006
Type:        bug
Customer Name:   Stefan Norberg
Customer Email:  stefan.norberg at ...
SDN ID:       stefan.norberg at ....
status:      Waiting
Category:    java
Subcategory: serialization
Company:     ...
release:     5.0
hardware:    x86
OSversion:   win_xp
priority:    4
Synopsis:    Serialization NullPointerException in hashCode()
Description:
 FULL PRODUCT VERSION :
>java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
JBoss 4.0.4_GA-patch1

A DESCRIPTION OF THE PROBLEM :
Emmanuel Bernard of the Hibernate team qualified this as a JDK bug.
It looks like the hashCode on the object is called before the object is initialized.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See http://opensource.atlassian.com/projects/hibernate/browse/EJB-192

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A deserialized object
ACTUAL -

javax.ejb.EJBException: java.lang.NullPointerException
   at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
   at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
   at
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
   at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
   at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
   at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
   at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
   at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
Caused by: java.lang.NullPointerException
   at com.weirdstuff.Player.hashCode(Player.java:83)
   at java.util.HashMap.hash(HashMap.java:264)
   at java.util.HashMap.put(HashMap.java:382)
   at java.util.HashSet.add(HashSet.java:194)
   at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
   at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273)
   at
org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183)
   at
org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268)
   at
org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249)
   at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866)
   at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853)
   at org.hibernate.loader.Loader.doQuery(Loader.java:717)
   at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
   at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
   at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
   at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
   at
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370)
   at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
   at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
   at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
   at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
   at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
   at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839)
   at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
   at org.hibernate.type.EntityType.resolve(EntityType.java:303)
   at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
   at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
   at org.hibernate.loader.Loader.doQuery(Loader.java:717)
   at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.doList(Loader.java:2145)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
   at org.hibernate.loader.Loader.list(Loader.java:2024)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
   at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
   at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
   at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
   at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
   at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
   at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
   at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
   at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
   at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
   at
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
   at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
   at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
   at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
   at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
   at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
   at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
   at org.jboss.remoting.Client.invoke(Client.java:525)
   at org.jboss.remoting.Client.invoke(Client.java:488)
   at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
   at
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
   at $Proxy0.getPlayers(Unknown Source)
   at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
   at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
   at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No JVM crash

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Packaged JAR file available from:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-192


Source code:
Client that calls a slsb on the Jboss server:

public class TestHashCodeClient extends TestCase {

   Facade facade = null;
   public TestHashCodeClient(String name) {
      super(name);
      
   }
   
   @Override
   protected void setUp() throws Exception {
      super.setUp();
      Properties properties = new Properties();
      properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
      properties.put("java.naming.provider.url","localhost:1099");
      InitialContext ctx = new InitialContext(properties);
      facade = (Facade) ctx.lookup( Facade.class.getSimpleName()+ "Bean/remote");
   }
   
   public void testUpdatePlayer() {
      Set<Player> players = new HashSet<Player>();
      players.add(new Player("Player1"));
      players.add(new Player("Player2"));
      players.add(new Player("Player3"));
      Team t1 = new Team("Team1");
      for (Player p : players) {
         p.setTeam(t1);
      }
      t1.setPlayers(players);
      facade.updateTeam(t1);
   }
   
   public void testGetPlayer() throws Exception {
      for (Player p : facade.getPlayers()) {
         System.out.println(p.getFullName());
      }
   }


The stateless session bean:

public @Stateless class FacadeBean implements Facade {
   
   @PersistenceContext
   EntityManager em;

   public List<Player> getPlayers() {
      Query q = em.createQuery("select p from Player p");
      return q.getResultList();
   }

   public void updateTeam(Team t) {
      em.merge(t);
   }
}


Two entity classes: Team and Player:


@Entity
public class Team implements Serializable {
   private static final long serialVersionUID = 1L;

   private Long id;

   @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
   public Long getId() {
      return id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   /** Optimistic locking */
   private Integer version;

   @Version
   public Integer getVersion() {
      return version;
   }

   public void setVersion(Integer version) {
      this.version = version;
   }

   public Team() {

   }

   public Team(String name) {
      setName(name);
   }

   private String name;

   @Basic
   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   private Set<Player> players = new HashSet<Player>();

   @OneToMany(fetch = FetchType.EAGER, mappedBy = "team")
   @Cascade( { org.hibernate.annotations.CascadeType.ALL,
         org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
   public Set<Player> getPlayers() {
      return players;
   }

   public void setPlayers(Set<Player> players) {
      this.players = players;
   }

   public String toString() {
      return name;
   }

   public boolean equals(Object obj) {
      if (obj instanceof Team) {
         Team other = (Team) obj;
         return other.getName().equals(this.getName());
      }
      return false;
   }

   public int hashCode() {
      return name.hashCode();
   }
}

@Entity
public class Player implements Serializable {
   private static final long serialVersionUID = 1L;

   private Long id;

   @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
   public Long getId() {
      return id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   /** Optimistic locking */
   private Integer version;

   @Version
   public Integer getVersion() {
      return version;
   }

   public void setVersion(Integer version) {
      this.version = version;
   }

   public Player() {

   }

   public Player(String name) {
      setFullName(name);
   }

   private String fullName;

   public String getFullName() {
      return fullName;
   }

   public void setFullName(String name) {
      this.fullName = name;
   }

   private Team team;

   @ManyToOne(fetch = FetchType.EAGER)
   public Team getTeam() {
      return team;
   }

   public void setTeam(Team team) {
      this.team = team;
   }

   public String toString() {
      return fullName;
   }

   public boolean equals(Object obj) {
      if (obj instanceof Player) {
         Player other = (Player) obj;
         return other.getFullName().equals(this.getFullName());
      }
      return false;
   }

   public int hashCode() {
      return fullName.hashCode();
   }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
This workaround works fine I think, but feels a bit unsafe.

public boolean equals(Object obj) {
if (name == null) return super.equals(obj);
if (obj instanceof Team) {
Team other = (Team) obj;
return other.getName().equals(this.getName());
}
return false;
}

public int hashCode() {
if (name == null) return super.hashCode(obj);
return name.hashCode();
}
workaround:  

> Serialization exception with hashCode() and eager-eager
> -------------------------------------------------------
>
>          Key: EJB-192
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-192
>      Project: Hibernate Entity Manager
>         Type: Bug

>   Components: EntityManager
>     Versions: 3.2.0.cr1
>  Environment: JBoss 4.0.4.GA-patch1  and SUN JDK 1.5.0_07 on Windows XP
>     Reporter: Stefan Norberg
>  Attachments: eager-eager.jar
>
>
> I have a problem with some weird stuff going on when I implement the equals()/hashCode() methods in my entites. The short version is that I get a NullPointerException on deserialization on the client side after a remote server request when I am using eager fetching in both Team and Player. If I set the player-> team to lazy it works.
> More details are on the Hibernate forum:
> http://forum.hibernate.org/viewtopic.php?p=2308640#2308640
> I'm going to post the test case here tomorrow when I get the code from work.
> All the fields in the entity are null when the the object hits the deserialization code and hence the exception... But the name is of course initialized when shown in my test case app later. What gives? Seems to me the deserialization is broken. Perhaps this is a bug in JBoss remoting, but since I can only get this with the Entity Manager I posted here. 
> This workaround works fine I think, but something seems terribly broken in either Hibernate or Jboss (remoting?).
> public boolean equals(Object obj) {
> if (name == null) return super.equals(obj);
> if (obj instanceof Team) {
> Team other = (Team) obj;
> return other.getName().equals(this.getName());
> }
> return false;
> }
> public int hashCode() {
> if (name == null) return super.hashCode(obj);
> return name.hashCode();
> }
> Full stack trace of any exception that occurs:
> javax.ejb.EJBException: java.lang.NullPointerException
>    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
>    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
>    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
>    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
>    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
>    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
>    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
>    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
>    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
>    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
> Caused by: java.lang.NullPointerException
>    at com.weirdstuff.Player.hashCode(Player.java:83)
>    at java.util.HashMap.hash(HashMap.java:264)
>    at java.util.HashMap.put(HashMap.java:382)
>    at java.util.HashSet.add(HashSet.java:194)
>    at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
>    at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273)
>    at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183)
>    at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268)
>    at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249)
>    at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866)
>    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853)
>    at org.hibernate.loader.Loader.doQuery(Loader.java:717)
>    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
>    at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
>    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
>    at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
>    at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
>    at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370)
>    at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
>    at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
>    at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
>    at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
>    at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
>    at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839)
>    at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
>    at org.hibernate.type.EntityType.resolve(EntityType.java:303)
>    at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
>    at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
>    at org.hibernate.loader.Loader.doQuery(Loader.java:717)
>    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
>    at org.hibernate.loader.Loader.doList(Loader.java:2145)
>    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
>    at org.hibernate.loader.Loader.list(Loader.java:2024)
>    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
>    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
>    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
>    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
>    at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:585)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
>    at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
>    at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
>    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
>    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
>    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
>    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
>    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
>    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
>    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
>    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
>    at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
>    at org.jboss.remoting.Client.invoke(Client.java:525)
>    at org.jboss.remoting.Client.invoke(Client.java:488)
>    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
>    at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
>    at $Proxy0.getPlayers(Unknown Source)
>    at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:585)
>    at junit.framework.TestCase.runTest(TestCase.java:154)
>    at junit.framework.TestCase.runBare(TestCase.java:127)
>    at junit.framework.TestResult$1.protect(TestResult.java:106)
>    at junit.framework.TestResult.runProtected(TestResult.java:124)
>    at junit.framework.TestResult.run(TestResult.java:109)
>    at junit.framework.TestCase.run(TestCase.java:118)
>    at junit.framework.TestSuite.runTest(TestSuite.java:208)
>    at junit.framework.TestSuite.run(TestSuite.java:203)
>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list