Re: Collections
Per Nyfelt <per.nyfelt <at> resourcing.se>
2003-11-05 19:42:54 GMT
This is strange though Java doc for Class.getSuperclass(); says
/**
* Returns the <code>Class</code> representing the superclass of the
entity
* (class, interface, primitive type or void) represented by this
* <code>Class</code>. If this <code>Class</code> represents either the
* <code>Object</code> class, an interface, a primitive type, or void,
then
* null is returned. If this object represents an array class then the
* <code>Class</code> object representing the <code>Object</code> class is
* returned.
*
* <at> return the superclass of the class represented by this object.
*/
So i would expect null if only implementing OzoneCompatible but when i test
this i get java.lang.Object back from my 1.4.2 Sun jdk. certanly not what i
expected. Maybe there's a difference between JVM versions?
Anyhow, I've just checked in a null check for ReflectionClassDirector that may
or may not work. Please try it out and let me know if it fixes your problem.
Best regards,
Per
On Wednesday 05 November 2003 20.06, Per Nyfelt wrote:
> I can build and run the simple sample just fine so my guess is that you
> have some error in your implementation class and OPP is not telling you
> exactly what the issue is.
>
> Judging from the stack trace the following line in ReflectionClassDirector.
> fails:
> String superClassName = sourceClass.getSuperclass().getName();
>
> getSuperClass() returns null if you are not extending anything which is
> probably a bug since you could be implementing OzoneCompatible and still
> have a valid ozone object. ie it could look like the following
>
> interface Foo extends OzoneRemote{
> }
>
> class FooImpl implements Foo, OzoneCompatible {
> // some implementation methods needed here...
> }
>
> My guess is that you have not done this but simply forgot to extend
> OzoneObject which is the most common way to create the implementation
> class.
>
> If you find out what is wrong with your code please let us now so that one
> of us can add a more descriptive error message. If you cant find the issue
> then send me your code and i will take a look.
>
> Best regards,
> Per
>
> On Wednesday 05 November 2003 07.54, Oki DZ wrote:
> > On Tue, Nov 04, 2003 at 10:25:43AM +0100, Per Nyfelt wrote:
> > > Your options are to either update from HEAD, use
> >
> > I did, and I had the following:
> > compile.collections:
> > [javac] Compiling 48 source files to
> > /var/backups/ozone/modules/collections/build/classes
> > [java] java.lang.NullPointerException
> > [java] at
> > org.ozoneDB.tools.OPP.srcgen.direct.ReflectionClassDirector.build(Reflect
> >io nClassDirector.java:65) [java] at
> > org.ozoneDB.tools.OPP.OPP.makeProxiesAndFactories(OPP.java:273)
> > [java] at org.ozoneDB.tools.OPP.OPP.generate(OPP.java:193)
> > [java] at org.ozoneDB.tools.OPP.OPP.main(OPP.java:161)
> >
> > BUILD FAILED
> > file:/var/backups/ozone/modules/collections/build.xml:124: Java
> > returned: 1
> >
> > Pointers please.
> >
> > Thanks in advance,
> > Oki
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > Does SourceForge.net help you be more productive? Does it
> > help you create better code? SHARE THE LOVE, and help us help
> > YOU! Click Here: http://sourceforge.net/donate/
> > _______________________________________________
> > Ozone-users mailing list
> > Ozone-users <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ozone-users
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/