Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Custom Partitioning Policy

Please include the stack trace.


Michael Pflueger wrote:
> 
> Hello,
> i have trouble implementing a custom partitioning policy.
> 
> For testing purposes I'm trying to use a hashpartitioning but "attaching"
> it to the model class via @Partitioning. I created MyHashPartitioning
> which inherits from HashPartitioning and just sets its partitionField and
> unionUnpartitionableQueries fields with a default constructor like this:
> 
> public class MyHashPartitioningPolicy extends HashPartitioningPolicy {
> 	public MyHashPartitioningPolicy() {
> 		super("id", true);
> 	}
> }
> 
> When I now attach it to the model via
> @Partitioning(name = "part", partitioningClass =
> MyHashPartitioningPolicy.class)
> @Partitioned("part")
> 
> It does not work and I get NPE warnings plus it doesn't find any data of
> the partitioned class.
> Warnings:
> [EL Warning]: 2011-11-08
> 17:16:05.921--ClientSession(18012736)--java.lang.NullPointerException
> [EL Warning]: 2011-11-08
> 17:16:05.921--UnitOfWork(11982507)--java.lang.NullPointerException
> [EL Warning]: 2011-11-08
> 17:16:05.921--ClientSession(21048949)--java.lang.NullPointerException
> [EL Warning]: 2011-11-08
> 17:16:05.921--ClientSession(5312057)--java.lang.NullPointerException
> [EL Warning]: 2011-11-08
> 17:16:05.921--UnitOfWork(24966838)--java.lang.NullPointerException
> [EL Warning]: 2011-11-08
> 17:16:05.921--UnitOfWork(19488744)--java.lang.NullPointerException
> 
> When I use the normal way with
> 
> @HashPartitioning(name = "plantPart", unionUnpartitionableQueries=true,
> partitionColumn = @Column(name="id"))
> 
> It does work, however, and it finds the elements and I don't get any
> warnings.
> 
> Regards,
> Michael
> ___________________________________________________
> 
> SMA Solar Technology AG
> Aufsichtsrat: Guenther Cramer (Vorsitzender)
> Vorstand: Juergen Dolle, Roland Grebe, Uwe Hertel, Pierre-Pascal Urbon,
> Marko Werner
> Handelsregister: Amtsgericht Kassel HRB 3972
> Sitz der Gesellschaft: 34266 Niestetal
> USt-ID-Nr. DE 113 08 59 54
> WEEE-Reg.-Nr. DE 95881150
> ___________________________________________________
> 
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/Custom-Partitioning-Policy-tp32804681p32811940.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top