We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
LibCV: NoDataSourceException (Read 2446 times)
LibCV: NoDataSourceException
Mar 5th, 2007, 9:22pm
 
I installed the Lib, JMF and detect the cam "Name = vfw:Microsoft WDM Image Capture (Win32):0" sucessfully...
And test the capturing in the JMStudio.

i changed the name in the "JMFSimpleTest.pde" but Processing gives me the Errormessage:

java.lang.NoClassDefFoundError: javax/media/NoDataSourceException
at Temporary_8011_8839.setup(Temporary_8011_8839.java:26)

Please Help!
Re: LibCV: NoDataSourceException
Reply #1 - Apr 4th, 2007, 4:21pm
 
I get the same error, using LibCV on Ubuntu Edgy.

The camera runs fine in Xawtv, Camorama and even with PD.

It's picked up in the JMF Registry fine and introspected (full output below).

However, when trying to duplicate the approach described here...

http://toxi.co.uk/p5/libcv/

...I get the following error.

java.lang.NoClassDefFoundError: javax/media/NoDataSourceException
at Temporary_9274_3271.setup(Temporary_9274_3271.java:30)


MY JMF REGISTRY SAYS >>>>>>>>>>>>

Name = v4l:Logitech QuickCam chat:0

Locator = v4l://0

Output Formats---->

0. javax.media.format.RGBFormat
 RGB, 320x240, Length=230400, 24-bit, Masks=3:2:1, PixelStride=3, LineStride=960
1. javax.media.format.RGBFormat
 RGB, 160x120, Length=38400, 16-bit, Masks=63488:2016:31, PixelStride=2, LineStride=320, LittleEndian
2. javax.media.format.RGBFormat
 RGB, 320x240, Length=153600, 16-bit, Masks=63488:2016:31, PixelStride=2, LineStride=640, LittleEndian
3. javax.media.format.RGBFormat
 RGB, 176x144, Length=50688, 16-bit, Masks=63488:2016:31, PixelStride=2, LineStride=352, LittleEndian
4. javax.media.format.RGBFormat
 RGB, 352x288, Length=202752, 16-bit, Masks=63488:2016:31, PixelStride=2, LineStride=704, LittleEndian
5. javax.media.format.RGBFormat
 RGB, 160x120, Length=57600, 24-bit, Masks=3:2:1, PixelStride=3, LineStride=480
6. javax.media.format.RGBFormat
 RGB, 176x144, Length=76032, 24-bit, Masks=3:2:1, PixelStride=3, LineStride=528
7. javax.media.format.RGBFormat
 RGB, 352x288, Length=304128, 24-bit, Masks=3:2:1, PixelStride=3, LineStride=1056
8. javax.media.format.RGBFormat
 RGB, 160x120, Length=76800, 32-bit, Masks=1:2:3, PixelStride=4, LineStride=640
9. javax.media.format.RGBFormat
 RGB, 320x240, Length=307200, 32-bit, Masks=1:2:3, PixelStride=4, LineStride=1280
10. javax.media.format.RGBFormat
 RGB, 176x144, Length=101376, 32-bit, Masks=1:2:3, PixelStride=4, LineStride=704
11. javax.media.format.RGBFormat
 RGB, 352x288, Length=405504, 32-bit, Masks=1:2:3, PixelStride=4, LineStride=1408
12. javax.media.format.YUVFormat
 YUV Video Format: Size = java.awt.Dimension[width=160,height=120] MaxDataLength = 28800 DataType = class [B yuvType = 2 StrideY = 160 StrideUV = 80 OffsetY = 0 OffsetU = 19200 OffsetV = 24000

13. javax.media.format.YUVFormat
 YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLength = 115200 DataType = class [B yuvType = 2 StrideY = 320 StrideUV = 160 OffsetY = 0 OffsetU = 76800 OffsetV = 96000

14. javax.media.format.YUVFormat
 YUV Video Format: Size = java.awt.Dimension[width=176,height=144] MaxDataLength = 38016 DataType = class [B yuvType = 2 StrideY = 176 StrideUV = 88 OffsetY = 0 OffsetU = 25344 OffsetV = 31680

15. javax.media.format.YUVFormat
 YUV Video Format: Size = java.awt.Dimension[width=352,height=288] MaxDataLength = 152064 DataType = class [B yuvType = 2 StrideY = 352 StrideUV = 176 OffsetY = 0 OffsetU = 101376 OffsetV = 126720





Re: LibCV: NoDataSourceException
Reply #2 - Apr 4th, 2007, 7:45pm
 
i get the same error in a ubuntu box.  Googling the error found this:

"A NoDataSourceException is thrown when a DataSource can't be found for a particular URL or MediaLocator."

at :https://java.sun.com/products/java-media/jmf/2.1.1/apidocs/javax/media/NoDataSo
urceException.html

but i review the camera's name twice and it is fine.
Re: LibCV: NoDataSourceException
Reply #3 - Apr 4th, 2007, 8:02pm
 
The thing which I'm suspicious of, is that there's a NoClassDefFoundError.

The NoDataSourceException is not necessarily actually being thrown, but it's being referenced and no class definition is available.

I was suspicious that this meant no JMF was available to processing at all, and hence none of the error classes either.

Though an irritating error, this might make it a much simpler problem.

Anyone know how to be sure JMF is accessible - a really simple test?

Equally, how do you introduce additional elements on the classpath with Processing.

I tried an environment variable CLASSPATH but it really didn't like that very much, and lost all its references to jars in the 'libraries' directory.
Re: LibCV: NoDataSourceException
Reply #4 - Apr 20th, 2007, 5:12pm
 
i also had problems getting libCV working under Ubuntu 6.10 and i finally decided to just change the processing script and add the lines:

export JMFHOME=/home/rein/JMF-2.1.1e
export LD_LIBRARY_PATH=$JMFHOME/lib

and from that point on, libCV worked!

(but now i need to get it working with OpenGL)

Rein


cefn wrote on Apr 4th, 2007, 8:02pm:
The thing which I'm suspicious of, is that there's a NoClassDefFoundError.

The NoDataSourceException is not necessarily actually being thrown, but it's being referenced and no class definition is available.

I was suspicious that this meant no JMF was available to processing at all, and hence none of the error classes either.

Though an irritating error, this might make it a much simpler problem.

Anyone know how to be sure JMF is accessible - a really simple test

Equally, how do you introduce additional elements on the classpath with Processing.

I tried an environment variable CLASSPATH but it really didn't like that very much, and lost all its references to jars in the 'libraries' directory.

Re: LibCV: NoDataSourceException
Reply #5 - Apr 21st, 2007, 3:08am
 
i just edit my processing script but jmf still dead Sad

What version of P5 and java did you using?
can you post your processing script?
Re: LibCV: NoDataSourceException
Reply #6 - Apr 21st, 2007, 12:56pm
 
if i remember correctly...

1. i first installed JMF and had troubles with getting jmstudio to work (the other programs in bin did work).

I had to change the last line in the jmstudio script to:

exec java -Dawt.toolkit=sun.awt.motif.MToolkit JMStudio $*


2. i copies the contents of the $JMFHOME/lib dir to
$PROCESSINGHOME/libraries/jmf/library

3. i changed the processing script and added

export JMFHOME=/home/rein/JMF-2.1.1e
export LD_LIBRARY_PATH=$JMFHOME/lib


I really thought that it was step 3 that did it. But after i removed the jmf dir from the processing libraries it didn't work anymore. So step 2 is nescessary as well...

Maybe i can change 3 now to point to the jmf lib within processing?

Maybe i'm making things even more complicated then they are already..

Succes and let me hear about your progress

Rein

zea wrote on Apr 21st, 2007, 3:08am:
i just edit my processing script but jmf still dead Sad

What version of P5 and java did you using
can you post your processing script

Re: LibCV: NoDataSourceException
Reply #7 - Apr 21st, 2007, 2:31pm
 
Thanks Rein!!

i follow your instructions and work perfectly! Smiley

just copy the libraries and that's it!

I change the point 3 to my libraries at p5 folder and work fine.

Would be fine that toxy read this thread and put this little howto with de libcv documentation.

Cheers!

zea
Page Index Toggle Pages: 1