wood burning stoves*
The moose likes Distributed Java and the fly likes Session replication-QueryBasedValueHolder-null pointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Session replication-QueryBasedValueHolder-null pointer exception" Watch "Session replication-QueryBasedValueHolder-null pointer exception" New topic
Author

Session replication-QueryBasedValueHolder-null pointer exception

syed aliarshad
Greenhorn

Joined: Jun 20, 2012
Posts: 11
Hello all,

Setup:
====
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(QueryBasedValueHolder.java:62) at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:55) at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61) at com.model.test.User.getRole(User.java:51) 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.





 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Session replication-QueryBasedValueHolder-null pointer exception
 
Similar Threads
MVC Model and Domain Model
Retired Patterns
generating a data model
Toplink
what's the relationship between toplink and ejb?