rude04 / metadata-extractor

Automatically exported from code.google.com/p/metadata-extractor
0 stars 0 forks source link

NoClassDefFoundError com/adobe/xml/XMLException #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using the latest extractor on your website. 2.5.0 RC3.

Jpg file exception:

When I try to get the date of release of this photo I get an exception that I 
can not manage, the program crashes anyone has any idea?

The development environment is the NetBeans 7.1.1, jdk version 1.6
s.o. windows 7 32 bit and windows xp 32 bit

The method I used is as follows:

     public static String LeggiMetaDataDataScatto (java.lang.String Path) {

         String result = "";

         JpegFile file = new File (Path);
             try {
                 Metadata metadata = ImageMetadataReader.readMetadata (jpegFile);

                 for (Directory directory: metadata.getDirectories ()) {
                     for (Tag tag: directory.getTags ()) {
                         String info = tag.toString ();

                         System.out.println (info);
                         if (Info.contains ("Date / Time Digitized")) {
                             Result = info;
                         }
                     }
                 }
                 System.out.println (metadata);
             } Catch (Exception e) {
             }
}

I get this error:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com / 
adobe / xmp / XMPException
com.drew.imaging.jpeg.JpegMetadataReader.extractMetadataFromJpegSegmentReader 
at (Unknown Source)
com.drew.imaging.jpeg.JpegMetadataReader.readMetadata at (Unknown Source)
com.drew.imaging.ImageMetadataReader.readMetadata at (Unknown Source)
com.drew.imaging.ImageMetadataReader.readMetadata at (Unknown Source)

Please provide any additional information below.

Original issue reported on code.google.com by pergola....@gmail.com on 15 Apr 2012 at 2:41

Attachments:

GoogleCodeExporter commented 9 years ago
Dunno how you do it in netbeans but somehow make sure you have the second 
xmp.jar from the src zip in your active libraries

Original comment by dsmitt...@gmail.com on 6 May 2012 at 9:47

GoogleCodeExporter commented 9 years ago
You're seeing this error because Adobe's XMP jar file couldn't be found.  Are 
you sure it's available on your classpath?

In a future version I hope to make the dependency upon this XMP jar optional.

Original comment by drewnoakes on 18 May 2012 at 10:59

GoogleCodeExporter commented 9 years ago
I updated the wiki with information that should help in this case:

http://code.google.com/p/metadata-extractor/wiki/Troubleshooting

Original comment by drewnoakes on 18 May 2012 at 11:13

GoogleCodeExporter commented 9 years ago
I dont see in the directions where XMP is mentioned, not where i can download it

Original comment by wes...@varela.net on 2 Aug 2012 at 9:47