Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session replication-QueryBasedValueHolder-null pointer exception  RSS feed

syed aliarshad
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

1) Clustered environment with 2 tomcat nodes.
2) Toplink as ORM.
3) JMS Cache coordination enabled.

Clustering has been setup perfectly and working fine. The problem is with the fail over situation. We have a User model class which has several properties along with properties using Toplink's ValueHolderInterface like
private ValueHolderInterface role = new ValueHolder(); We are setting this User model class in session. Session gets replicated but there might be an issue with Toplink's ValueHolderInterface.

Now when we test the fail over scenario we get below given exception.

java.lang.NullPointerException at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate( at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate( at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue( at com.model.test.User.getRole( at


Note that we are using Toplink specific implementation in our User class and putting it in session. Usually we should DTO's or VO's to transfer data back and forth and don't use ORM specific functionality in those objects which we usually transfer over the network.

Any help would be appreciated.

Thanks in advance.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!