Missing ReflectionUtil methods?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing ReflectionUtil methods?

jerron
Hi.

I've forked jogl and made the changes necessary to get it building on FreeBSD:

http://github.com/rothwell/jogl/tree/freebsd-fixes

But I've come up against a problem:

java.compile.javase:
    [javac] Compiling 69 source files to /storage/home/m0/git-ext/jogamp-rothwell/jogl/build/nativewindow/classes
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/javax/media/nativewindow/GraphicsCon
    [javac]                     ReflectionUtil.createInstance("com.jogamp.nativewindow.impl.x11.X11GraphicsConfiguratio
    [javac]                                   ^
    [javac]   symbol:   method createInstance(String,ClassLoader,Object[])
    [javac]   location: class ReflectionUtil
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindo
    [javac]             ReflectionUtil.callStaticMethod( X11UtilClassName, cl, "initSingleton", new Class[]  { }, new O
    [javac]                           ^
    [javac]   required: String,String,Class[],Object[]
    [javac]   found: String,ClassLoader,String,Class[],Object[]
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindo
    [javac]                           ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) &&
    [javac]                                         ^
    [javac]   required: String
    [javac]   found: String,ClassLoader
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindo
    [javac]                           ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice",
    [javac]                                         ^
    [javac]   required: String
    [javac]   found: String,ClassLoader
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindo
    [javac]             registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false, cl), factory);
    [javac]                                           ^
    [javac]   symbol:   method getClass(String,boolean,ClassLoader)
    [javac]   location: class ReflectionUtil
    [javac] /storage/home/m0/git-ext/jogamp-rothwell/jogl/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeW
    [javac]                 nativeWindowConstructor = ReflectionUtil.getConstructor(windowClassName, getClass().getClas
    [javac]                                                         ^
    [javac]   symbol:   method getConstructor(String,ClassLoader,Class[])
    [javac]   location: class ReflectionUtil
    [javac] 6 errors

The types of some of the methods seem wrong: The only 'createInstance' I can find in jogl is in
gluegen and has the type:

public static final Object createInstance(Class clazz, Class[] cstrArgTypes, Object[] cstrArgs)

Obviously the code above is trying to call one of the type:

createInstance(String,ClassLoader,Object[])

Is something out of sync with the repos? Or is this a known problem/work in progress?
Reply | Threaded
Open this post in threaded view
|

Re: Missing ReflectionUtil methods?

Junyeong
oh.. I just got the same with you..

BUILD FAILED with below error message
    [javac] Compiling 70 source files to /home/rhdxmr/java/jogl/jogamp/jogl/build/nativewindow/classes
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java:81: cannot find symbol
    [javac] symbol  : method createInstance(java.lang.String,java.lang.ClassLoader,java.lang.Object[])
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]                     ReflectionUtil.createInstance("com.jogamp.nativewindow.impl.x11.X11GraphicsConfigurationFactory", GraphicsConfigurationFactory.class.getClassLoader(), new Object[] {});
    [javac]                                   ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:119: callStaticMethod(java.lang.String,java.lang.String,java.lang.Class[],java.lang.Object[]) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader,java.lang.String,java.lang.Class[],java.lang.Object[])
    [javac]             ReflectionUtil.callStaticMethod( X11UtilClassName, cl, "initSingleton", new Class[]  { }, new Object[] { } );
    [javac]                           ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:135: isClassAvailable(java.lang.String) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader)
    [javac]                           ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) &&
    [javac]                                         ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:136: isClassAvailable(java.lang.String) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader)
    [javac]                           ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice", cl) ;
    [javac]                                         ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:140: cannot find symbol
    [javac] symbol  : method getClass(java.lang.String,boolean,java.lang.ClassLoader)
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]             registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false, cl), factory);
    [javac]                                           ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java:90: cannot find symbol
    [javac] symbol  : method getConstructor(java.lang.String,java.lang.ClassLoader,java.lang.Class[])
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]                 nativeWindowConstructor = ReflectionUtil.getConstructor(windowClassName, getClass().getClassLoader(), new Class[] { Object.class, AbstractGraphicsConfiguration.class });
    [javac]                                                         ^
    [javac] 6 errors

BUILD FAILED
/home/rhdxmr/java/jogl/jogamp/jogl/make/build.xml:33: The following error occurred while executing this line:
/home/rhdxmr/java/jogl/jogamp/jogl/make/build-nativewindow.xml:339: Compile failed; see the compiler error output for details.
Reply | Threaded
Open this post in threaded view
|

Re: Missing ReflectionUtil methods?

Michael Bien
pull from my gluegen repo (http://github.com/mbien/gluegen) or wait a few days until the changes are upstream in Sven's repo.

regards,
michael

On 06/26/2010 10:14 AM, Junyeong [via jogamp] wrote:
oh.. I just got the same with you..

BUILD FAILED with below error message
    [javac] Compiling 70 source files to /home/rhdxmr/java/jogl/jogamp/jogl/build/nativewindow/classes
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java:81: cannot find symbol
    [javac] symbol  : method createInstance(java.lang.String,java.lang.ClassLoader,java.lang.Object[])
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]                     ReflectionUtil.createInstance("com.jogamp.nativewindow.impl.x11.X11GraphicsConfigurationFactory", GraphicsConfigurationFactory.class.getClassLoader(), new Object[] {});
    [javac]                                   ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:119: callStaticMethod(java.lang.String,java.lang.String,java.lang.Class[],java.lang.Object[]) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader,java.lang.String,java.lang.Class[],java.lang.Object[])
    [javac]             ReflectionUtil.callStaticMethod( X11UtilClassName, cl, "initSingleton", new Class[]  { }, new Object[] { } );
    [javac]                           ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:135: isClassAvailable(java.lang.String) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader)
    [javac]                           ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) &&
    [javac]                                         ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:136: isClassAvailable(java.lang.String) in com.jogamp.common.util.ReflectionUtil cannot be applied to (java.lang.String,java.lang.ClassLoader)
    [javac]                           ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice", cl) ;
    [javac]                                         ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java:140: cannot find symbol
    [javac] symbol  : method getClass(java.lang.String,boolean,java.lang.ClassLoader)
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]             registerFactory(ReflectionUtil.getClass(AWTComponentClassName, false, cl), factory);
    [javac]                                           ^
    [javac] /home/rhdxmr/java/jogl/jogamp/jogl/src/nativewindow/classes/com/jogamp/nativewindow/impl/NativeWindowFactoryImpl.java:90: cannot find symbol
    [javac] symbol  : method getConstructor(java.lang.String,java.lang.ClassLoader,java.lang.Class[])
    [javac] location: class com.jogamp.common.util.ReflectionUtil
    [javac]                 nativeWindowConstructor = ReflectionUtil.getConstructor(windowClassName, getClass().getClassLoader(), new Class[] { Object.class, AbstractGraphicsConfiguration.class });
    [javac]                                                         ^
    [javac] 6 errors

BUILD FAILED
/home/rhdxmr/java/jogl/jogamp/jogl/make/build.xml:33: The following error occurred while executing this line:
/home/rhdxmr/java/jogl/jogamp/jogl/make/build-nativewindow.xml:339: Compile failed; see the compiler error output for details.



View message @ http://jogamp.762907.n3.nabble.com/Missing-ReflectionUtil-methods-tp923893p923904.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Missing ReflectionUtil methods?

jerron
Hi.

Given that I've already forked and patched both of Sven's repos, what would be the
best way to proceed here? It seems messy to patch your repos too. I've not
got a deadline to meet but I am quite anxious to get going on an OpenGL
project I've had waiting!
Reply | Threaded
Open this post in threaded view
|

Re: Missing ReflectionUtil methods?

Michael Bien
this is the nice part of decentralized repositories. You can just pull from any clone you want. Its completly fine.

e.g. just do a:
cd repo/
git pull git://github.com/mbien/gluegen.git master

and you are up2date again. You did everything right by cloning Sven's repos, you don't have to change anything.

jogl/jocl will build (today) if you are in sync with:
mbien/gluegen
sgothel/jogl or mbien/jogl
mbien/jocl

usually you can expect gluegen to be in sync too.


Tomorrow i will integrate your changes, i am to busy today with other things.


why do we have this situation?
well we usually don't push to someone else repo without a review. This means if Sven has time he will review my stuff, pull from me and he is up2date again.


thanks again,

michael

On 06/26/2010 02:52 PM, jerron [via jogamp] wrote:
Hi.

Given that I've already forked and patched both of Sven's repos, what would be the
best way to proceed here? It seems messy to patch your repos too. I've not
got a deadline to meet but I am quite anxious to get going on an OpenGL
project I've had waiting!


View message @ http://jogamp.762907.n3.nabble.com/Missing-ReflectionUtil-methods-tp923893p924124.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Missing ReflectionUtil methods?

jerron
I see, thanks. I did wonder why there were multiple repositories.

I'll sort everything out now.