proxygen.exe returns java.lang.NoClassDefFoundError, although class is in classpath

303 views
Skip to first unread message

Daniel Heldt

unread,
Mar 6, 2015, 3:45:29 AM3/6/15
to jni...@googlegroups.com
Hi there,

I am trying to build c# proxies for some java software. 
I call 

proxygen.exe lib\myLib.jar -wd work -cp lib\dep1.jar;lib\dep2.jar;...

Proxygen stops with java.lang.NoClassDefFoundError: com.whatever.BadClass

Originally BadClass was part of myLib.jar, so I tried to move it into some dep?.jar, but the result is the same. 
BadClass is some simple abstract public class with no public consttuctor. It has some enclosed public static class EnclosedClass<Type>,
which is a generic. Might this be the problem? I guess generics are a problem, according to other postings here... 

Have you any suggestions, what to try? Otherwise I can try to create a minimal example triggering my problem, but I do not know if I am able to do so. 


Every hint is welcome!

with kind regards,

Daniel



Pavel Šavara

unread,
Mar 6, 2015, 3:50:50 AM3/6/15
to jni...@googlegroups.com
proxygen could be configured with explicit list of classes to wrap. 
See advanced samples in binary distribution.

XSD for it is here

Also it may be compiled with higher version of JDK than you are using together with proxygen. check JAVA_HOME shell variable.


--
--
You received this message because you are subscribed to jni...@googlegroups.com
http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
http://jni4net.sf.net/

---
You received this message because you are subscribed to the Google Groups "jni4net" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jni4net+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Heldt

unread,
Mar 6, 2015, 4:28:14 AM3/6/15
to jni...@googlegroups.com
Hi Pavel, 

first thank you for your rapid reply!


Am Freitag, 6. März 2015 09:50:50 UTC+1 schrieb Pavel Savara:
proxygen could be configured with explicit list of classes to wrap. 
See advanced samples in binary distribution.

XSD for it is here

thank you! That comes indeed handy, but I did not find documentation of it. Now I will use it.  


Also it may be compiled with higher version of JDK than you are using together with proxygen. check JAVA_HOME shell variable.

my JAVA_HOME points to a  64bit  Oracle 1.7.0_71-b14 JDK.  Is that recent enough (my proxygen.exe comes from your jni4net-0.8.8.0-bin.zip)?



Pavel Šavara

unread,
Mar 6, 2015, 6:03:14 AM3/6/15
to jni...@googlegroups.com
version of JDK, I was refering to your library. Is it perhaps compiled with JDK 1.8, some lambdas or something JDK 1.7 could not load and therefore NoClassDefFoundError ?

Or perhaps you just need to put some jar or native dependencies of you library on classpath of proxygen.

Daniel Heldt

unread,
Mar 6, 2015, 6:08:14 AM3/6/15
to jni...@googlegroups.com


Am Freitag, 6. März 2015 12:03:14 UTC+1 schrieb Pavel Savara:
version of JDK, I was refering to your library. Is it perhaps compiled with JDK 1.8, some lambdas or something JDK 1.7 could not load and therefore NoClassDefFoundError ?

I've build the library with the very same JDK.
 
Or perhaps you just need to put some jar or native dependencies of you library on classpath of proxygen.

They are all already on the classpath. 

So I guess I try to build a minimal example this afternoon.

 
Reply all
Reply to author
Forward
0 new messages