# Custom Partition class for partition node

**URL:** <https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217>\
**Category:** CloverDX Platform\
**Created:** [September 6, 2007, 12:00am UTC](https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217 "2007-09-06T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan77](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@saravanan77](https://forum.cloverdx.com/u/saravanan77)\
**Post date:** [September 6, 2007, 12:00am UTC](https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217/1 "2007-09-06T00:00:00Z")

</div>

Hi,

While using a external partition class to partition node, i am getting this error.

java.lang.RuntimeException: Can’t create object of type PARTITION with reason: PARTITION:PARTITION0:Can’t find specified partition function class: PARTITION0

I have created seperate jar file for this partition class and added to build path in eclipse. But still it is throwing this exception.

Regards,  
Saravanan A

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [September 7, 2007, 7:26am UTC](https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217/2 "2007-09-07T07:26:41Z")

</div>

Hi, are you running graph from command line or from GUI? You only need to have your class in classpath.

---

<div class="post-metadata">

**Author:** ![saravanan77](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@saravanan77](https://forum.cloverdx.com/u/saravanan77)\
**Post date:** [September 7, 2007, 12:32pm UTC](https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217/3 "2007-09-07T12:32:36Z")

</div>

Hi,

I found the problem. Problem is in clover.etl source code.

In partition.java, instead of creating partition function class using XML\_PARTITIONCLASS\_ATTRIBUTE it is creating using XML\_ID\_ATTRIBUTE in fromXML method.

if (xattribs.exists(XML\_PARTITIONCLASS\_ATTRIBUTE)) {//load class with partition function  
try {  
//TODO move creating function to init method  
partitionFce = **(PartitionFunction)Class.forName(xattribs.getString(XML\_ID\_ATTRIBUTE)).newInstance();**

Regards,  
Saravanan A

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [September 10, 2007, 7:13am UTC](https://forum.cloverdx.com/t/custom-partition-class-for-partition-node/217/4 "2007-09-10T07:13:52Z")

</div>

Thanks for report, bug will be fixed.
