Perl inline::Java No public method ' ' defined for class ' ' -


i looking getting bit of code funciton correctly via perl inline::java. problem occurs when call stupid() method passing 2 arguments. apache log (attached below) returns no public method 'stupid' defined class 'main::mathfunctions'.

note: line 342 print $jfunc->stupid($tapsre{$i},$tapsim{$i}) . "\n"; other method (twocomplimentnbit) inside mathfunctions class works fine. can point i'm missing here?

begin { $env{classpath} .= ":/var/www/java/commons-lang-2.6/commons-lang-2.6.jar"; $env{classpath} .= ":/var/www/java/commons-math-2.2/commons-math-2.2.jar"; } use inline::java; use inline (java => <<'end_of_java_code', autostudy => 1, debug => 6,  import org.apache.commons.math.complex.*; import org.apache.commons.math.mathexception; import org.apache.commons.math.transform.fastfouriertransformer; import java.util.*;   class mathfunctions {    public static int twocomplimentnbit(int val, int bits) { val &= (int) (1 << bits) - 1;  int r = (int) (1 << bits - 1);  if (val < r) { return val; } else { return val - r * 2; } }     public double stupid (float real, float img) { complex result = new complex(real,img); double realone = result.getreal(); double imgone = result.getimaginary(); return realone;  }   } end_of_java_code shared_jvm => 1, directory => '/tmp', );  $jfunc = new mathfunctions(); 

output:

[fri jun 27 16:11:45 2014] [error]  [perl][3]   packet sent call_method 2031 mathfunctions      fastatan2 (double,double) scalar:ltaumdaxotu2oty5njq2mdm2mzc= scalar:mc4wmde5nty5njk2ndywmzyznw== [fri jun 27 16:11:45 2014] [error]  [perl][3]   packet recv ok scalar:ltaunzg1mzk4mg== [fri jun 27 16:11:45 2014] [error]  [perl][5]     stupid [fri jun 27 16:11:45 2014] [error]  no public method 'stupid' defined class 'main::mathfunctions' @ /var/www/pre_eq-dev.cgi line 342 [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object::tie [fri jun 27 16:11:45 2014] [error]  [perl][2]  destroying object in java (main::mathfunctions): [fri jun 27 16:11:45 2014] [error]  [perl][3]   deleting object main::mathfunctions=hash(0x8cd4248) 2031 (mathfunctions) [fri jun 27 16:11:45 2014] [error]  [perl][3]   packet sent delete_object 2031 [fri jun 27 16:11:45 2014] [error]  [perl][3]   packet recv ok undef: [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::protocol [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object::private [fri jun 27 16:11:45 2014] [error]  [perl][1] killed natural death. [fri jun 27 16:11:45 2014] [error]  [perl][1] jvm non-owner exiting... [fri jun 27 16:11:45 2014] [error]  [perl][1] exiting 9 [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object::tie [fri jun 27 16:11:45 2014] [error]  [perl][4]    script marked done, object destruction not    propagated java [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::protocol [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object::private [fri jun 27 16:11:45 2014] [error]  [perl][4]    destroying inline::java::object::tie [fri jun 27 16:11:45 2014] [error]  [perl][4]    script marked done, object destruction not propagated java 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -