B4J Question Web Camera?

HARRY

Active Member
Licensed User
Longtime User
I am trying to run the WebCamTest on my Raspberry . The program starts and then I get the following log after one or two seconds :

B4X:
Program started.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Java HotSpot(TM) Client VM warning:
You have loaded library /tmp/BridJExtractedLibraries4452529451130851871/bridj.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.RuntimeException: Failed to initialize BridJ
    at org.bridj.Platform.initLibrary(Platform.java:370)
    at org.bridj.Platform.<clinit>(Platform.java:175)
    at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<clinit>(OpenIMAJGrabber.java:59)
    at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:56)
    at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/BridJExtractedLibraries4452529451130851871/bridj.so: /tmp/BridJExtractedLibraries4452529451130851871/bridj.so: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1083)
    at org.bridj.Platform.initLibrary(Platform.java:347)
    ... 7 more
main._justtotest (java line: 82)
java.lang.ClassCastException: java.lang.UnsatisfiedLinkError cannot be cast to java.lang.Exception
    at anywheresoftware.b4a.BA.setLastException(BA.java:292)
    at b4j.example.main._justtotest(main.java:82)
    at b4j.example.main._appstart(main.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.start(main.java:36)
    at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
    at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
    at java.secu
rity.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
    at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
    at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:860)
    at com.sun.glass.ui.lens.LensApplication.access$1800(LensApplication.java:58)
    at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:917)
    at java.lang.Thread.run(Thread.java:744)

I have put the three .jars in the Library folder. "Check the image below and the attachment project in the entry #14" I do not understand what to do with the stuff mentionned in # 14.


What am I doing wrong?

Harry
 
Upvote 0

CanguroCode

Active Member
Licensed User
Longtime User
I am trying to run the WebCamTest on my Raspberry . The program starts and then I get the following log after one or two seconds :

B4X:
Program started.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Java HotSpot(TM) Client VM warning:
You have loaded library /tmp/BridJExtractedLibraries4452529451130851871/bridj.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.RuntimeException: Failed to initialize BridJ
    at org.bridj.Platform.initLibrary(Platform.java:370)
    at org.bridj.Platform.<clinit>(Platform.java:175)
    at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.<clinit>(OpenIMAJGrabber.java:59)
    at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:56)
    at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/BridJExtractedLibraries4452529451130851871/bridj.so: /tmp/BridJExtractedLibraries4452529451130851871/bridj.so: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1083)
    at org.bridj.Platform.initLibrary(Platform.java:347)
    ... 7 more
main._justtotest (java line: 82)
java.lang.ClassCastException: java.lang.UnsatisfiedLinkError cannot be cast to java.lang.Exception
    at anywheresoftware.b4a.BA.setLastException(BA.java:292)
    at b4j.example.main._justtotest(main.java:82)
    at b4j.example.main._appstart(main.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.start(main.java:36)
    at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
    at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
    at java.secu
rity.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
    at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
    at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:860)
    at com.sun.glass.ui.lens.LensApplication.access$1800(LensApplication.java:58)
    at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:917)
    at java.lang.Thread.run(Thread.java:744)

I have put the three .jars in the Library folder. "Check the image below and the attachment project in the entry #14" I do not understand what to do with the stuff mentionned in # 14.


What am I doing wrong?

Harry

you could upload your B4J project?
 
Upvote 0

HARRY

Active Member
Licensed User
Longtime User
Thanks for your support.

Meanwhile my exercises with fswebcam were successfull, so I stick to that solution.
Regards,

Harry
 
Upvote 0

Swissmade

Well-Known Member
Licensed User
Longtime User
Sounds interesting.
How about Camera's from network stream?????
 
Upvote 0
Top