help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with invoke call from Java


From: Philip Nienhuis
Subject: Re: Problem with invoke call from Java
Date: Thu, 5 Jun 2014 15:00:16 -0700 (PDT)

Olaf Lüke wrote
> Hi,
> 
> Our project has the following general setup:
> 
> * Octave calls a Java method from a jar, which controls some hardware.
> * Some time later the hardware gives information back to Java.
> * Java then calls invoke (from OctaveReference) to give information from
> the hardware back to Octave.
> 
> You can take a look at the project here:
> http://www.tinkerforge.com/en/doc/Software/API_Bindings_MATLAB.html
> 
> The source itself is located here:
> http://download.tinkerforge.com/bindings/matlab/tinkerforge_matlab_bindings_2_0_0.zip
> 
> 
> 
> I recently updated my Ubuntu box to 14.04 which updated my Octave from
> version 2.6.4 to 2.8.1. With the new version the last part of our
> approach doesn't work anymore. I tried lots of different configurations
> and so on, every time the octave.jar internally calls doInvoke (which is
> a native function of liboctinterp) we get the following exception:
> 
> java.lang.UnsatisfiedLinkError:
> org.octave.Octave.doInvoke(I[Ljava/lang/Object;)V
>       at org.octave.Octave.doInvoke(Native Method)
>       at org.octave.OctaveReference.invoke(OctaveReference.java:54)
> 
> In theory this should mean that either the liboctinterp.so is not loaded
> or the function doInvoke is not present in the lib. But as far as i can
> tell it is loaded and the method is implemented properly.
> 
> I already tried to add a
> 
> static {
>   System.loadLibrary("octinterp");
> }
> 
> in the Octave.java and recompiled the octave.jar. The liboctinterp does
> load, but i still get the exception.
> 
> The problem is also present if i compile the latest version of Octave
> from source myself (instead of using the Ubuntu package).
> 
> What could be the problem and what can i do to debug this?

No hints, merely counter questions:

I suppose you upgraded Octave from 3.6.4 to 3.8.1, not from 2.6.4 to 2.8.1?

What Java version do you have installed? 32 or 64 bit?

32 or 64 bit OS?

Another thing (that you do not mention): did you try to install the OF Java
package in 3.8.1? (3.8.1 should have Java support built in). What does:
octave_config_info ("features").JAVA
give?

The exception mentions:
org.octave.Octave.doInvoke(I[Ljava/lang/Object;)V
which contains intruiging syntax ("I[L" and a trailing "V")
Could there be a code page or locale issue?

I tried a few commands from the examples in
http://www.tinkerforge.com/en/doc/Software/Bricklets/AnalogIn_Bricklet_MATLAB.html#analog-in-bricklet-matlab-examples;
it just works fine til the ipcon.connect statement, as obviously I have no
suitable hardware installed here. (And I suppose it is part of the first two
parts that work for you as well).
Note: I use javaObject rather than java_new (should be in OF java-1.2.8 as
well; OF-java is (was) at 1.2.9)

So would you have a few lines of code that do not need the HW and that do
show the problem?

Finally, I'd say if it worked in 3.6.4 & OF-Java, it should work in 3.8.1 w
built-in Java support.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-invoke-call-from-Java-tp4664495p4664502.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]