I'm trying to run an example file that comes with ruby-processing, but it crashes with this error each time:
me$ rp5 run ~/rp_samples/samples/processing_app/library/movie/loop.rb
/Users/jimmy/rp_samples/samples/processing_app/library/movie/loop.rb:14 warning: ambiguous Java methods found, using background(int)
Java::JavaLang::UnsatisfiedLinkError
Could not load library: gstreamer
org.gstreamer.lowlevel.GstNative.load(org/gstreamer/lowlevel/GstNative.java:53)
org.gstreamer.lowlevel.GstNative.load(org/gstreamer/lowlevel/GstNative.java:43)
org.gstreamer.Gst.<clinit>(org/gstreamer/Gst.java:101)
java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:513)
RUBY.setup(/rp_samples/samples/processing_app/library/movie/loop.rb:16)
processing.core.PApplet.handleDraw(processing/core/PApplet.java:2361)
processing.core.PGraphicsJava2D.requestDraw(processing/core/PGraphicsJava2D.java:240)
processing.core.PApplet.run(processing/core/PApplet.java:2256)
java.lang.Thread.run(java/lang/Thread.java:695)
Here's what I've tried:
I was using the bundled (with ruby-processing) jruby-complete, but when this didn't work, I installed the regular jruby package.
I've already added the line from the answer on this page to resolve a Java::JavaLang::RuntimeException to get this far.
I found this question for java, but installing gstreamer via homebrew (on a Mac) didn't work and installing the universal pkg from gstreamer hasn't gotten me any further either.
I just want to play with ruby-processing :(. Let me know if I haven't given enough detail, but does anyone have any ideas? Thanks!
--
EDIT
I believe by looking at the gstreamer-java Google group, that the new version of gstreamer (> 1.0) isn't compatible. I found a collection of the old 0.10 gstreamer libs on homebrew and installed them.
I tried a 'sudo find / -iname "gstnative.java", and I can't seem to find the GSTNative.java file that this error is coming from. Maybe it's packaged somehow with ruby-processing? Anyway.. I found this line in gstreamer-java/src/org/gstreamer/lowlevel/Main.java:
System.setProperty("jna.library.path", "/usr/share/java:/opt/local/lib:/usr/local/lib:/usr/lib");
If I check for the files mentioned in the below comment (la /usr/local/lib/ | grep "gst"), I see them all and they're named both ways (0.10.0.dylib or 0.10.dylib). E.g.
lrwxr-xr-x 1 jimms admin 71 Jan 12 15:24 libgstinterfaces-0.10.0.dylib -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.0.dylib
lrwxr-xr-x 1 jimms admin 65 Jan 12 15:24 libgstinterfaces-0.10.a -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.a
lrwxr-xr-x 1 jimms admin 69 Jan 12 15:24 libgstinterfaces-0.10.dylib -> ../Cellar/gst-plugins-base010/0.10.36/lib/libgstinterfaces-0.10.dylib
So they seem to be there, but maybe I'm not understanding exactly what it's looking for. Any help is appreciated!
It's working now:
I'm not 100% sure about what fixed the problem finally, but, for future-googlers, here's a list of elements that seem to be required:
Do a brew search gst and install anything with 010 appended to it. Gstreamer-java has not been updated to be compatible with any version past gstreamer-0.10.
I updated my JDK to version 7 update 72 (maybe 8 will work, but I haven't tried). At this point, I removed the "java_args": "-d32" line from my .rp5rc file because 32bit mode wasn't supported.
The ruby-processing script doesn't seem to understand relative paths looks in a directory that's relative to where you run the rp5 command (instead of relative to the sketch itself) when loading a file with Movie.new, and so I changed it to an absolute path and Eureka!
--
Edit
Edited step 3 above for clarity: If I had cded into ~/rp_samples/samples/processing_app/library/movie/ before running rp5 run loop.rb it would have helped the troubleshooting process.
Related
I'm having an issue with Oracle 11g R2 Design Center feature. When I click it, it gives me the error below:
C:\app[username]\product\11.2.0\dbhome_1\owb\bin\win32>call setowbenv.bat
WARNING: Unknown directive: SetSkipJ2SDKCheck
WARNING: Could not find jvm.cfg! in 'C:\app[username]\product\11.2.0\dbhome_1\jdk\jre\lib\jvm.cfg'
WARNING: Cannot find default VM "client" at C:\app[username]\product\11.2.0\dbhome_1\jdk
ERROR: Cannot find VM at: C:\app[username]\product\11.2.0\dbhome_1\jdk
Aborting!
I've tried many things to resolve this, as listed below:
Download 32b version of JDK (actually, I've downloaded multiple to rule out the version issue, both 32 and 64)
Point environment variable and path to JDK installation
Change sqldeveloper.cfg file to include SetJavaHome {path to JDK}
Move the jvm.cfg file to the directory it's expected to be at
Checked the paths to ensure the expected files were there
With step 4, after doing so I receive a different error message:
"Client VM is unsupported"
With step 5, after doing so I realized the path to the executable was not in:
C:\app[username]\product\11.2.0\dbhome_1\jdk
But instead in:
C:\app[username]\product\11.2.0\dbhome_1\jdk\bin
So, from all of this I feel that if I can change the path the Oracle Design Center is using to the correct path, then this should resolve. Problem is, I'm unsure where to find this. Also, if it helps I believe the Design Center uses JDeveloper, since the error suggests to view the Oracle 9i JDeveloper Install Guide at jdev\install.html. I tried going to this link but I'm not sure if it exists anymore because it took me to Google. I chose the most relevant link but still, I did not find any information regarding this issue. If anyone can help I'd be very thankful, this has been running me in circles for 3 days now.
TIA
I've followed about every tutorial I could find, but somehow I can't seem to get Nd4j to work with a Cuda backend. I think I'm missing a library, but I can't figure out which one or where to download it.
The error I'm getting is:
18:23:23.872 [main] WARN org.nd4j.linalg.factory.Nd4jBackend - Skipped [JCublasBackend] backend (unavailable): java.lang.UnsatisfiedLinkError: no cudart in java.library.path
18:23:23.958 [main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] backend
I'm using Nd4j and I have (amongst a whole bunch of others) the following jars on my class path:
nd4j-native-1.0.0-beta3.jar
nd4j-native-api-1.0.0-beta3.jar
cuda-10.0-7.3-1.4.3.jar
nd4j-cuda-10.0-1.0.0-beta3.jar.
Cuda 10.0 is successfully installed:
C:\Users\username>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130
I tried to point Java to the Cuda bin directory like so:
-Djava.library.path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin"
but that makes no difference. Furthermore, I've tried the mvn command on the pom.xml's inside nd4j-cuda-10.0-platform-1.0.0-beta3.jar and cuda-platform-10.0-7.3-1.4.3.jar, which results in a download of a lot of jars, but none of them appear to contain the dll I'm missing.
When searching around I found other users talking about jars like 'cuda-10.0-7.3-1.4.3-windows-x86_64.jar' that should contain a jnicudart.dll, but I can't find such a jar anywhere. What am I missing here?
--UPDATE--
I've updated everything to beta5, and found a cuda jar containing the missing jnicudart.dll, but I still get the same error. I have used Dependencies to check what's wrong, and this is the result:
It says the checksum of the NVidia cudart64_100.dll is incorrect. Would this be related to NVidia Cuda10 not supporting my Geforce GT 730 because it is a Fermi architecture? Or is the cuda installation corrupt or something?
please update your nd4j/dl4j version to 1.0.0-beta5
please tell me, what’s your GPU model name and nvidia driver version? i.e. show nvidia-smi output.
OK I figured it out; had to install Cuda8.0 and revert all Nd4j to beta2, and add the correct cuda-8.9-6.0-1.4.1-windows-x86_64.jar to my classpath. Furthermore, I had to restart my IDE for the windows PATH environment to be updated so that the CUDA 8 bin directory was in it. And then I found out that
CUDA backend requires compute capatibility of 3.0 and above to run
and my retro card was only 2.1, so all was for nothing :/
Will have to purchase a new GPU I guess...
I have downloaded an application for installing. However, it reported Error Code 20 during the install4j Wizard.
Then I investigated on the log and found the following lines:
...
extracting bin\unpack200.exe (size 159296)
...
untaring JRE was successful
JRE is packed
checking jre\lib\charsets.jar
Unpacking JRE
jre\bin\unpack200.exe -r "jre\lib\charsets.jar.pack"
"jre\lib\charsets.jar"**
could not create unpack process
--End of the Log--
The unpack200.exe is extracted from the installer. I checked its size and it looks valid by comparing it with another successful log.
Does anyone know what does the Error Code 20 mean in install4j?
Thank you.
In my app I am saving temporary files to my app cache folder. I am getting the name of the cache directory via this method:
context.getCacheDir();
It returns me such path: /data/user/0/my.app.packagename
But later when I am trying to get name of parent directory of my cache file via this method - file.getParent(); I am getting absolutely different path to cache directory, in my case this: /data/data/my.app-packagename
So I am just wondering why this is happening, why getParent() doesn't return the same path as context.getCacheDir()?
The behaviour is correct, technically its the same.
If you connect to your android device via adb shell and go into /data/user/ and run the 'll' command you will see that the folder 0 is just a symbolic link to /data/data/.
root#android:/data/user # ll
lrwxrwxrwx root root 1970-01-01 01:00 0 -> /data/data/
If you dont know what that means, read up on symbolic links.
So there is no issue and you can trust android that they are the same.
This behavior confused me a lot today.
Here are my 50 Cent to bring light into this:
I've started an Emulator with Android 8.1
I've connected my Android 9 Device via USB
After that I've started Android-Studio and opend the Device File Explorer.
Now strange things happend:
On Android 8.1 you see the structure /data/user/0/com.myApp/
on Android 9 there is no directory /data/user (and no symbolic link visible via android-studio)
BUT, internally the path seems to be the same (even if there is no symbolic Link visible in android studio).
I use RNFetchBlob (React native package to read files), and if I output the Result from RNFetchBlob.fs.dirs.CacheDir the result was /data/user/0/.... even if on Android 9 this Directory not exist.
But I'd gave it a try and output all files that will be found at this Directory with the following Command :
RNFetchBlob.fs.ls(RNFetchBlob.fs.dirs.CacheDir)
.then((files) => {
console.log("output-files",files);
})
...and found that this output all the files I've cached before.
If anybody knows some documentation why this behavior exist up from Android 9, please comment and point us to this.
Hello Palantir community on StackOverflow - if you exist?
I'm having a problem with pXML and PXZ files on a QuickStart instance (see below for details). If I export from Graph (even if only a few relatively small Objects), then try and reimport that file, I get the error message,
Error: The file [file path & name] is not a valid .pxz file:
com.palantir.exceptionPalantirUserMessageException. Unexpected error
while validating PalantirXML; please see the log for details.
The log will then give some version of,
Value " with length = '0' is not faced-valid with respect to minLength
'1' for type #AnonType_namedataSource;.
Multiple Java error references will then follow (195, 131, 384, 318, etc).
So this seems to be an issue with Palantir writing an XML file badly, then not recognising it when you try to reimport.
The XML file itself seems ok - it's not very small, all the XML tags close off, etc. But clearly there's a value somewhere that's meant to be a positive, and it's not being populated in the correct way. The errant tag isn't obvious, if that's the case.
Weirdly, I can usually export a single Object (or maybe two or three) - but not if the Object is too complex (eg has lots of Properties).
I'm using an installation of Palantir Quick Start 3.8 (3.8.2.8.603030, Java Version: 1.6.0_30 Sun Microsystems Inc. - Java HotSpot(TM) 64-Bit Server VM build 20.5-b03 64-bit).
I've tried various configurations of Java updates (6.3 32 & 64, 7.25 32 & 64, no Java update (Pal 3.8 comes with 6.3).
The computer is an Intel, 2.7 Ghz with 16 GB of RAM, running Windows 7 (SP1), 64bt.
I tried disabling the AV (McAfee) and Windows firewall - no difference.
I'll leave it there for now - very grateful for any advice / suggestions.
R
That's an old version of Palantir! I worked on the code you're seeing errors with through many versions of Gotham. The problem is that the first step in the import process is validating the pXML against its .xsd file. While writing, the library makes sure the XML is syntactically valid, but doesn't verify it against the schema.
That error makes it sound like a DataSource is missing some value that's required by the schema. Exporting from a new Investigation may work, but this bug would need to be fixed by a Palantir developer.
You could also try it later version where it may be fixed already.