Forum Numerical Method Bug Reports
SuanShu inside NetBeans platform application
-
Anonymous 2011-11-15 at 11:13 am
Hi,
I met anouther issue regarding using SuanShu library. I’m going to use SS in my application based on NetBeans platform v 6.9.1 (http://netbeans.org/features/platform/). When I tried to do that I found that NetBeans proxy class loader doesn’t load class from the default packages (http://kickjava.com/src/org/netbeans/ProxyClassLoader.java.htm see loadClass method). When I try to execute something like
<br /> .....<br /> ShapiroWilk sw = new ShapiroWilk(myData);<br /> .....<br />inside my NetBeans application I get next exception:
<br /> Caused by: java.lang.NoClassDefFoundError: w<br /> at com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction.<clinit>(tg:229)<br /> at com.numericalmethod.suanshu.stats.distribut-> ion.univariate.NormalDistribution.</clinit><clinit>(mn:298)<br /> at com.numericalmethod.suanshu.stats.test.distribution.normality.ShapiroWilk.<init>(og:253)<br /> .....<br /> Caused by: java.lang.ClassNotFoundException: Will not load classes from default package (w)<br /> at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:199)<br /> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)<br /> .....<br /> </init></clinit>It happens when SS tries to load class w but this class is in default package of SuanShu. Could you remove class w from default package and put it to some xxx.utils or something like that ? We are planning to use this library in our application and it makes a big problem.
I’m not sure that is bug but definitely it will not work in NB based applications.
–dima
-
RyuParticipant 2011-11-15 at 2:05 pm
hmm… we do not have any class in the default package. All our packages start with ‘com.numericalmethod’. We will look into the problem you reported and get back to you soon.
-
Anonymous 2011-11-15 at 2:14 pm
Hi, Definitely you have :
<br /> > unzip -l suanshu-1.7.0.jar<br /> ...............<br /> 3650 2011-10-28 16:09 com/numericalmethod/suanshu/analysis/function/polynomial/root/jenkinstraub/o.class<br /> 8294 2011-10-28 16:09 com/numericalmethod/suanshu/analysis/function/polynomial/root/jenkinstraub/v.class<br /> 1018 2011-10-28 16:09 com/numericalmethod/suanshu/analysis/function/polynomial/root/jenkinstraub/x.class<br /> 4543 2011-10-28 16:09 com/numericalmethod/suanshu/analysis/function/polynomial/root/jenkinstraub/j.class<br /> 942 2011-10-28 16:09 w.class<br />w.class is in default package.
–dima
-
Ken YiuParticipant 2011-11-16 at 10:17 am
o16t, thank you for using Suanshu in your application!
We will improve the class packaging in suanshu.jar to accommodate your requirements, and will make a new release soon. Thank you for your suggestion. Please stay tuned.
-
Anonymous 2011-11-16 at 1:21 pm
Thank you !
-
RyuParticipant 2011-12-02 at 12:59 pm
Release 1.8.0 should have addressed this problem. http://numericalmethod.com/forum/index.php/topic,98.0.html
-
Anonymous 2011-12-05 at 11:10 am
Hi, Thanks you guys, now it works perfect !!!
Excellent support service !