Help with linux and java

Hello,

I am trying to install the frontPanel API on linux. I found the FrontPanel-FC7-3.0.10 files, and found the /API/Java directory. When I start my application, the startup script sets java.library.path to the directory containing the .so file and the .jar is put in the class path.

When I attempt to run in this manner, I get an UnsatisfiedLinkError:
com.opalkelly.frontpanel.okjFrontPanelJNI.new_okFrontPanel()J

when attempting to connect to the driver. Note that all the java code involved has been debugged and successfully run using the windows version of your product so I don’t think it is a bug in our Java code.

Can someone help me out here?

Thank you.

OH! I forgot to mention I am using Red Hat Enterprise Linux 5

Here is the full stack trace.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at waf.start.Main.main(Main.java:322)
Caused by: java.lang.UnsatisfiedLinkError: com.opalkelly.frontpanel.okjFrontPanelJNI.new_okFrontPanel()J
at com.opalkelly.frontpanel.okjFrontPanelJNI.new_okFrontPanel(Native Method)
at com.opalkelly.frontpanel.okFrontPanel.(okFrontPanel.java:37)
at fast.drivers.audio.okDAQ.Connect(okDAQ.java:121)
at fast.drivers.audio.AudioDAQDeviceDriver.nativeConnectWrapper(AudioDAQDeviceDriver.java:512)
at fast.drivers.audio.AudioDAQDeviceDriverUSB.nativeConnectWrapper(AudioDAQDeviceDriverUSB.java:150)
at fast.drivers.DeviceDriver.connect(DeviceDriver.java:367)
at fast.device.implementation.DeviceDataChannelImplementation.connectAndStart(DeviceDataChannelImplementation.java:135)
at fast.device.implementation.DeviceDataChannelImplementation.startChannel(DeviceDataChannelImplementation.java:196)
at fast.device.implementation.DeviceDataSource.sourceInit(DeviceDataSource.java:87)
at fast.data.implementation.DataSourceImplementation.start(DataSourceImplementation.java:108)
at waf.WAFserver$SvcDesc.start(WAFserver.java:124)
at waf.WAFserver$SvcDesc.start(WAFserver.java:118)
at waf.WAFserver$SvcDesc.start(WAFserver.java:118)
at waf.WAFserver$SvcDesc.start(WAFserver.java:118)
at waf.WAFserver$SvcDesc.access$13(WAFserver.java:100)
at waf.WAFserver.start(WAFserver.java:512)
at waf.WAFserver.serverStartup(WAFserver.java:641)
at waf.starters.WAFStart.mainStartup(WAFStart.java:154)
… 5 more

I also forgot to mention that before making the call that leads to the error, the code successfully loads the okjFrontPanel shared library

Here are the errors I get by simply trying to compile the example:

[root@pttlinux fpgaTesting]# /opt/java/bin/javac -classpath okjFrontPanel.jar DESTester.java
DESTester.java:19: cannot find symbol
symbol : variable NoError
location: class com.opalkelly.frontpanel.okFrontPanel
if (m_dev.NoError != m_dev.OpenBySerial("")) {
^
DESTester.java:35: cannot find symbol
symbol : variable NoError
location: class com.opalkelly.frontpanel.okFrontPanel
if (m_dev.NoError != m_dev.ConfigureFPGA(“destop.bit”)) {
^
2 errors

It would help a great deal if your website made it a bit easier to find the latest software.

So far I have been unable to find how to download the software to be sure I have the latest. My copy is from a CD that came with our board dated 2006.

I’m sure the problem is just a simple setup issue so if someone could please get back to me I’d appreciate it.

@ptt - Software downloads of the latest software can be found in the forum titled “Software Downloads”. Please read the announcement posted at the top of that forum titled “User access” to see that you need to email [email protected] with your order information to be granted access to download.

You state in your first post that you are using Red Hat Enterprise Linux 5. The software you tried to install, however, is built for Fedora Core 7. I would suspect that this is a contributing factor to your difficulties.

If you know, off the top of your head, how to determine which core enterprise is based on (5 or something else?) I would appreciate it. Of course, more to the point would be which version of your software should I use.

I’m primarily a Java developer and an embedded system developer: I use Linux as a development platform but not a target, so I apologize for my ignorance on details of Linux .so management and builds, cores, etc.

@ptt – thank you for pointing this out.

Recent builds of the Java wrapper have changed the way the enumeration gets wrapped (much to our surprise). The correct syntax for the enumerations is:

okFrontPanel.ErrorCode.NoError

The sample code itself will be fixed in the next relaese.