You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Erik Bengtson <er...@jpox.org> on 2006/06/24 23:15:25 UTC

class loading issue when super class has reference to sub class

Hi,

There is an issue when initialising a class when super class has reference to
sub class
(Cclass extending Bclass extending Aclass and Aclass has a reference to Cclass)

public class Aclass {
	private Cclass cclass;
}
public class Bclass extends Aclass {
}

public class Cclass extends Bclass {
}

public class Main {
	public static void main(String[] args) throws Exception {
		//The following line throws ExceptionInInitializerError caused by
java.lang.NullPointerException
		System.out.println(Class.forName("org.jpox.test.Bclass"));
	}
}


Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
	at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
	at org.jpox.test.Aclass.<clinit>(Aclass.java)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.jpox.test.Main.main(Main.java:6)
Caused by: java.lang.NullPointerException
	at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
	at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
	at org.jpox.test.Cclass.<clinit>(Cclass.java)
	... 8 more


See for a diagram
http://www.jpox.org/servlet/jira/browse/ENHANCER-58


The issue is due to the implementation of the jdoGetManagedFieldCount

The implementation for topmost classes in the hierarchy:
protected static int jdoGetManagedFieldCount () {
return jdoFieldNames.length;
}
The implementation for subclasses:
protected static int jdoGetManagedFieldCount () {
return <pc-superclass>.jdoGetManagedFieldCount() +
jdoFieldNames.length;
}

Re: class loading issue when super class has reference to sub class

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Ilan,

On Jun 24, 2006, at 4:32 PM, Ilan Kirsh wrote:

> Hi Erik,
>
> I remember similar problems with this enhanced method in the past
> so I just checked your test with ObjectDB, but now it works well
> with no exception.
>
> The code that is produced by the ObjectDB Enhancer is slightly  
> different
> and instead of jdoFieldNames.length there is a constant that is  
> calculated
> at enhancement time. Hopefully this change should do the difference.

Please note that there is a difference between what the spec requires  
in terms of the semantics and what the sample code shows as an  
implementation. The sample code in 21.21 is not normative.

The spec requires:

protected static int jdoGetManagedFieldCount();
This method returns the number of managed fields declared by this  
class plus the number
inherited from all superclasses. This method is generated in the  
class to allow the class to
determine at runtime the number of inherited fields, without having  
introspection code in
the enhanced class.

The sample code for Employee in section 21.21 is:

21.21.7 Generated jdoGetManagedFieldCount
The generated method returns the number of managed fields in this  
class plus the number
of inherited managed fields. This method is expected to be executed  
only during class
loading of the subclasses.
The implementation for topmost classes in the hierarchy:
protected static int jdoGetManagedFieldCount () {
return jdoFieldNames.length;
}
The implementation for subclasses:
protected static int jdoGetManagedFieldCount () {
return <pc-superclass>.jdoGetManagedFieldCount() +
jdoFieldNames.length;
}

So it looks like we could improve the example code by replacing the  
jdoFieldNames.length with an unnamed constant (which does not require  
that the jdoFieldNames field be initialized).

Craig

>
> Regards,
>
> Ilan
>
> ----- Original Message ----- From: "Erik Bengtson" <er...@jpox.org>
> To: <jd...@sun.com>; <jd...@db.apache.org>
> Sent: Saturday, June 24, 2006 11:15 PM
> Subject: class loading issue when super class has reference to sub  
> class
>
>
>> Hi,
>>
>> There is an issue when initialising a class when super class has  
>> reference to
>> sub class
>> (Cclass extending Bclass extending Aclass and Aclass has a  
>> reference to Cclass)
>>
>> public class Aclass {
>> private Cclass cclass;
>> }
>> public class Bclass extends Aclass {
>> }
>>
>> public class Cclass extends Bclass {
>> }
>>
>> public class Main {
>> public static void main(String[] args) throws Exception {
>> //The following line throws ExceptionInInitializerError caused by
>> java.lang.NullPointerException
>> System.out.println(Class.forName("org.jpox.test.Bclass"));
>> }
>> }
>>
>>
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Unknown Source)
>> at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
>> at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
>> at org.jpox.test.Aclass.<clinit>(Aclass.java)
>> at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Unknown Source)
>> at org.jpox.test.Main.main(Main.java:6)
>> Caused by: java.lang.NullPointerException
>> at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
>> at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
>> at org.jpox.test.Cclass.<clinit>(Cclass.java)
>> ... 8 more
>>
>>
>> See for a diagram
>> http://www.jpox.org/servlet/jira/browse/ENHANCER-58
>>
>>
>> The issue is due to the implementation of the jdoGetManagedFieldCount
>>
>> The implementation for topmost classes in the hierarchy:
>> protected static int jdoGetManagedFieldCount () {
>> return jdoFieldNames.length;
>> }
>> The implementation for subclasses:
>> protected static int jdoGetManagedFieldCount () {
>> return <pc-superclass>.jdoGetManagedFieldCount() +
>> jdoFieldNames.length;
>> }
>>
>>
>
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: class loading issue when super class has reference to sub class

Posted by Michael Bouschen <mb...@spree.de>.
Hi,

I experimented with classes where I manually added the code that is 
generated by the enhancer. I could reproduce the class loading issue 
only with jdk1.4. I do not get an exception when compiling and running 
the classes with jdk 1.5. I can confirm that replacing the expression 
jdoFieldNames.length by a constant in the implementation of 
jdoGetManagedFieldCount solves the problem.

Regards Michael
> You can still call <pc-superclass>.jdoGetManagedFieldCount()
> (so the super class may be changed without recompiling the subclass)
> just replace the jdoFieldNames.length component with a constant.
>
> Ilan
>
>
> ----- Original Message ----- From: "Erik Bengtson" <er...@jpox.org>
> To: <jd...@sun.com>; <jd...@db.apache.org>
> Sent: Sunday, June 25, 2006 12:55 PM
> Subject: Re: class loading issue when super class has reference to sub 
> class
>
>
>> Thanks Ilan,
>>
>> I will do this way them, but this requires users to recompile and
>> reenhance
>> child classes if super classes are changed.
>>
>> Regards,
>>
>> Erik Bengtson
>> Quoting Ilan Kirsh <ki...@objectdb.com>:
>>
>>> Hi Erik,
>>>
>>> I remember similar problems with this enhanced method in the past
>>> so I just checked your test with ObjectDB, but now it works well
>>> with no exception.
>>>
>>> The code that is produced by the ObjectDB Enhancer is slightly 
>>> different
>>> and instead of jdoFieldNames.length there is a constant that is
>>> calculated
>>> at enhancement time. Hopefully this change should do the difference.
>>>
>>> Regards,
>>>
>>> Ilan
>>>
>>> ----- Original Message -----
>>> From: "Erik Bengtson" <er...@jpox.org>
>>> To: <jd...@sun.com>; <jd...@db.apache.org>
>>> Sent: Saturday, June 24, 2006 11:15 PM
>>> Subject: class loading issue when super class has reference to sub 
>>> class
>>>
>>>
>>> > Hi,
>>> >
>>> > There is an issue when initialising a class when super class has
>>> > reference
>>> > to
>>> > sub class
>>> > (Cclass extending Bclass extending Aclass and Aclass has a 
>>> reference to
>>> > Cclass)
>>> >
>>> > public class Aclass {
>>> > private Cclass cclass;
>>> > }
>>> > public class Bclass extends Aclass {
>>> > }
>>> >
>>> > public class Cclass extends Bclass {
>>> > }
>>> >
>>> > public class Main {
>>> > public static void main(String[] args) throws Exception {
>>> > //The following line throws ExceptionInInitializerError caused by
>>> > java.lang.NullPointerException
>>> > System.out.println(Class.forName("org.jpox.test.Bclass"));
>>> > }
>>> > }
>>> >
>>> >
>>> > Exception in thread "main" java.lang.ExceptionInInitializerError
>>> > at java.lang.Class.forName0(Native Method)
>>> > at java.lang.Class.forName(Unknown Source)
>>> > at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
>>> > at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
>>> > at org.jpox.test.Aclass.<clinit>(Aclass.java)
>>> > at java.lang.Class.forName0(Native Method)
>>> > at java.lang.Class.forName(Unknown Source)
>>> > at org.jpox.test.Main.main(Main.java:6)
>>> > Caused by: java.lang.NullPointerException
>>> > at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
>>> > at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
>>> > at org.jpox.test.Cclass.<clinit>(Cclass.java)
>>> > ... 8 more
>>> >
>>> >
>>> > See for a diagram
>>> > http://www.jpox.org/servlet/jira/browse/ENHANCER-58
>>> >
>>> >
>>> > The issue is due to the implementation of the jdoGetManagedFieldCount
>>> >
>>> > The implementation for topmost classes in the hierarchy:
>>> > protected static int jdoGetManagedFieldCount () {
>>> > return jdoFieldNames.length;
>>> > }
>>> > The implementation for subclasses:
>>> > protected static int jdoGetManagedFieldCount () {
>>> > return <pc-superclass>.jdoGetManagedFieldCount() +
>>> > jdoFieldNames.length;
>>> > }
>>> >
>>> >
>>> >
>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66
Fax.:++49/30/2175 2012		D-10783 Berlin


Re: class loading issue when super class has reference to sub class

Posted by Ilan Kirsh <ki...@objectdb.com>.
You can still call <pc-superclass>.jdoGetManagedFieldCount()
(so the super class may be changed without recompiling the subclass)
just replace the jdoFieldNames.length component with a constant.

Ilan


----- Original Message ----- 
From: "Erik Bengtson" <er...@jpox.org>
To: <jd...@sun.com>; <jd...@db.apache.org>
Sent: Sunday, June 25, 2006 12:55 PM
Subject: Re: class loading issue when super class has reference to sub class


> Thanks Ilan,
>
> I will do this way them, but this requires users to recompile and
> reenhance
> child classes if super classes are changed.
>
> Regards,
>
> Erik Bengtson
> Quoting Ilan Kirsh <ki...@objectdb.com>:
>
>> Hi Erik,
>>
>> I remember similar problems with this enhanced method in the past
>> so I just checked your test with ObjectDB, but now it works well
>> with no exception.
>>
>> The code that is produced by the ObjectDB Enhancer is slightly different
>> and instead of jdoFieldNames.length there is a constant that is
>> calculated
>> at enhancement time. Hopefully this change should do the difference.
>>
>> Regards,
>>
>> Ilan
>>
>> ----- Original Message -----
>> From: "Erik Bengtson" <er...@jpox.org>
>> To: <jd...@sun.com>; <jd...@db.apache.org>
>> Sent: Saturday, June 24, 2006 11:15 PM
>> Subject: class loading issue when super class has reference to sub class
>>
>>
>> > Hi,
>> >
>> > There is an issue when initialising a class when super class has
>> > reference
>> > to
>> > sub class
>> > (Cclass extending Bclass extending Aclass and Aclass has a reference to
>> > Cclass)
>> >
>> > public class Aclass {
>> > private Cclass cclass;
>> > }
>> > public class Bclass extends Aclass {
>> > }
>> >
>> > public class Cclass extends Bclass {
>> > }
>> >
>> > public class Main {
>> > public static void main(String[] args) throws Exception {
>> > //The following line throws ExceptionInInitializerError caused by
>> > java.lang.NullPointerException
>> > System.out.println(Class.forName("org.jpox.test.Bclass"));
>> > }
>> > }
>> >
>> >
>> > Exception in thread "main" java.lang.ExceptionInInitializerError
>> > at java.lang.Class.forName0(Native Method)
>> > at java.lang.Class.forName(Unknown Source)
>> > at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
>> > at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
>> > at org.jpox.test.Aclass.<clinit>(Aclass.java)
>> > at java.lang.Class.forName0(Native Method)
>> > at java.lang.Class.forName(Unknown Source)
>> > at org.jpox.test.Main.main(Main.java:6)
>> > Caused by: java.lang.NullPointerException
>> > at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
>> > at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
>> > at org.jpox.test.Cclass.<clinit>(Cclass.java)
>> > ... 8 more
>> >
>> >
>> > See for a diagram
>> > http://www.jpox.org/servlet/jira/browse/ENHANCER-58
>> >
>> >
>> > The issue is due to the implementation of the jdoGetManagedFieldCount
>> >
>> > The implementation for topmost classes in the hierarchy:
>> > protected static int jdoGetManagedFieldCount () {
>> > return jdoFieldNames.length;
>> > }
>> > The implementation for subclasses:
>> > protected static int jdoGetManagedFieldCount () {
>> > return <pc-superclass>.jdoGetManagedFieldCount() +
>> > jdoFieldNames.length;
>> > }
>> >
>> >
>> >
>>
>>
>>
>
>
>
>
>
>



Re: class loading issue when super class has reference to sub class

Posted by Ilan Kirsh <ki...@objectdb.com>.
Sounds good to me, assuming that this does solve the exception in JPox.

Ilan

----- Original Message ----- 
From: "Craig L Russell" <Cr...@Sun.COM>
Cc: "JDO Expert Group" <jd...@Sun.COM>; "Apache JDO project" 
<jd...@db.apache.org>
Sent: Sunday, June 25, 2006 1:06 AM
Subject: Re: class loading issue when super class has reference to sub class


> Hi Ilan,
>
> On Jun 24, 2006, at 4:32 PM, Ilan Kirsh wrote:
>
>> Hi Erik,
>>
>> I remember similar problems with this enhanced method in the past
>> so I just checked your test with ObjectDB, but now it works well
>> with no exception.
>>
>> The code that is produced by the ObjectDB Enhancer is slightly
>> different
>> and instead of jdoFieldNames.length there is a constant that is
>> calculated
>> at enhancement time. Hopefully this change should do the difference.
>
> Please note that there is a difference between what the spec requires
> in terms of the semantics and what the sample code shows as an
> implementation. The sample code in 21.21 is not normative.
>
> The spec requires:
>
> protected static int jdoGetManagedFieldCount();
> This method returns the number of managed fields declared by this
> class plus the number
> inherited from all superclasses. This method is generated in the
> class to allow the class to
> determine at runtime the number of inherited fields, without having
> introspection code in
> the enhanced class.
>
> The sample code for Employee in section 21.21 is:
>
> 21.21.7 Generated jdoGetManagedFieldCount
> The generated method returns the number of managed fields in this
> class plus the number
> of inherited managed fields. This method is expected to be executed
> only during class
> loading of the subclasses.
> The implementation for topmost classes in the hierarchy:
> protected static int jdoGetManagedFieldCount () {
> return jdoFieldNames.length;
> }
> The implementation for subclasses:
> protected static int jdoGetManagedFieldCount () {
> return <pc-superclass>.jdoGetManagedFieldCount() +
> jdoFieldNames.length;
> }
>
> So it looks like we could improve the example code by replacing the
> jdoFieldNames.length with an unnamed constant (which does not require
> that the jdoFieldNames field be initialized).
>
> Craig
>
>>
>> Regards,
>>
>> Ilan
>>
>> ----- Original Message ----- From: "Erik Bengtson" <er...@jpox.org>
>> To: <jd...@sun.com>; <jd...@db.apache.org>
>> Sent: Saturday, June 24, 2006 11:15 PM
>> Subject: class loading issue when super class has reference to sub
>> class
>>
>>
>>> Hi,
>>>
>>> There is an issue when initialising a class when super class has
>>> reference to
>>> sub class
>>> (Cclass extending Bclass extending Aclass and Aclass has a
>>> reference to Cclass)
>>>
>>> public class Aclass {
>>> private Cclass cclass;
>>> }
>>> public class Bclass extends Aclass {
>>> }
>>>
>>> public class Cclass extends Bclass {
>>> }
>>>
>>> public class Main {
>>> public static void main(String[] args) throws Exception {
>>> //The following line throws ExceptionInInitializerError caused by
>>> java.lang.NullPointerException
>>> System.out.println(Class.forName("org.jpox.test.Bclass"));
>>> }
>>> }
>>>
>>>
>>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Unknown Source)
>>> at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
>>> at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
>>> at org.jpox.test.Aclass.<clinit>(Aclass.java)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Unknown Source)
>>> at org.jpox.test.Main.main(Main.java:6)
>>> Caused by: java.lang.NullPointerException
>>> at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
>>> at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
>>> at org.jpox.test.Cclass.<clinit>(Cclass.java)
>>> ... 8 more
>>>
>>>
>>> See for a diagram
>>> http://www.jpox.org/servlet/jira/browse/ENHANCER-58
>>>
>>>
>>> The issue is due to the implementation of the jdoGetManagedFieldCount
>>>
>>> The implementation for topmost classes in the hierarchy:
>>> protected static int jdoGetManagedFieldCount () {
>>> return jdoFieldNames.length;
>>> }
>>> The implementation for subclasses:
>>> protected static int jdoGetManagedFieldCount () {
>>> return <pc-superclass>.jdoGetManagedFieldCount() +
>>> jdoFieldNames.length;
>>> }
>>>
>>>
>>
>>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
> 



Re: class loading issue when super class has reference to sub class

Posted by Erik Bengtson <er...@jpox.org>.
Thanks Ilan,

I will do this way them, but this requires users to recompile and reenhance
child classes if super classes are changed.

Regards,

Erik Bengtson
Quoting Ilan Kirsh <ki...@objectdb.com>:

> Hi Erik,
>
> I remember similar problems with this enhanced method in the past
> so I just checked your test with ObjectDB, but now it works well
> with no exception.
>
> The code that is produced by the ObjectDB Enhancer is slightly different
> and instead of jdoFieldNames.length there is a constant that is calculated
> at enhancement time. Hopefully this change should do the difference.
>
> Regards,
>
> Ilan
>
> ----- Original Message -----
> From: "Erik Bengtson" <er...@jpox.org>
> To: <jd...@sun.com>; <jd...@db.apache.org>
> Sent: Saturday, June 24, 2006 11:15 PM
> Subject: class loading issue when super class has reference to sub class
>
>
> > Hi,
> >
> > There is an issue when initialising a class when super class has reference
> > to
> > sub class
> > (Cclass extending Bclass extending Aclass and Aclass has a reference to
> > Cclass)
> >
> > public class Aclass {
> > private Cclass cclass;
> > }
> > public class Bclass extends Aclass {
> > }
> >
> > public class Cclass extends Bclass {
> > }
> >
> > public class Main {
> > public static void main(String[] args) throws Exception {
> > //The following line throws ExceptionInInitializerError caused by
> > java.lang.NullPointerException
> > System.out.println(Class.forName("org.jpox.test.Bclass"));
> > }
> > }
> >
> >
> > Exception in thread "main" java.lang.ExceptionInInitializerError
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Unknown Source)
> > at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
> > at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
> > at org.jpox.test.Aclass.<clinit>(Aclass.java)
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Unknown Source)
> > at org.jpox.test.Main.main(Main.java:6)
> > Caused by: java.lang.NullPointerException
> > at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
> > at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
> > at org.jpox.test.Cclass.<clinit>(Cclass.java)
> > ... 8 more
> >
> >
> > See for a diagram
> > http://www.jpox.org/servlet/jira/browse/ENHANCER-58
> >
> >
> > The issue is due to the implementation of the jdoGetManagedFieldCount
> >
> > The implementation for topmost classes in the hierarchy:
> > protected static int jdoGetManagedFieldCount () {
> > return jdoFieldNames.length;
> > }
> > The implementation for subclasses:
> > protected static int jdoGetManagedFieldCount () {
> > return <pc-superclass>.jdoGetManagedFieldCount() +
> > jdoFieldNames.length;
> > }
> >
> >
> >
>
>
>




Re: class loading issue when super class has reference to sub class

Posted by Ilan Kirsh <ki...@objectdb.com>.
Hi Erik,

I remember similar problems with this enhanced method in the past
so I just checked your test with ObjectDB, but now it works well
with no exception.

The code that is produced by the ObjectDB Enhancer is slightly different
and instead of jdoFieldNames.length there is a constant that is calculated
at enhancement time. Hopefully this change should do the difference.

Regards,

Ilan

----- Original Message ----- 
From: "Erik Bengtson" <er...@jpox.org>
To: <jd...@sun.com>; <jd...@db.apache.org>
Sent: Saturday, June 24, 2006 11:15 PM
Subject: class loading issue when super class has reference to sub class


> Hi,
>
> There is an issue when initialising a class when super class has reference 
> to
> sub class
> (Cclass extending Bclass extending Aclass and Aclass has a reference to 
> Cclass)
>
> public class Aclass {
> private Cclass cclass;
> }
> public class Bclass extends Aclass {
> }
>
> public class Cclass extends Bclass {
> }
>
> public class Main {
> public static void main(String[] args) throws Exception {
> //The following line throws ExceptionInInitializerError caused by
> java.lang.NullPointerException
> System.out.println(Class.forName("org.jpox.test.Bclass"));
> }
> }
>
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at org.jpox.test.Aclass.___jdo$loadClass(Aclass.java)
> at org.jpox.test.Aclass.__jdoFieldTypesInit(Aclass.java)
> at org.jpox.test.Aclass.<clinit>(Aclass.java)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at org.jpox.test.Main.main(Main.java:6)
> Caused by: java.lang.NullPointerException
> at org.jpox.test.Bclass.jdoGetManagedFieldCount(Bclass.java)
> at org.jpox.test.Cclass.__jdoGetInheritedFieldCount(Cclass.java)
> at org.jpox.test.Cclass.<clinit>(Cclass.java)
> ... 8 more
>
>
> See for a diagram
> http://www.jpox.org/servlet/jira/browse/ENHANCER-58
>
>
> The issue is due to the implementation of the jdoGetManagedFieldCount
>
> The implementation for topmost classes in the hierarchy:
> protected static int jdoGetManagedFieldCount () {
> return jdoFieldNames.length;
> }
> The implementation for subclasses:
> protected static int jdoGetManagedFieldCount () {
> return <pc-superclass>.jdoGetManagedFieldCount() +
> jdoFieldNames.length;
> }
>
>
>