Squirrel SQL: Maximum column length of 100,000 exceeded

While trying to import a large dataset into my database using Squirrel I encountered the following error.

[Dataimport Executor Thread] ERROR net.sourceforge.squirrel_sql.plugins.dataimport.ImportDataIntoTableExecutor - Error while reading file
java.io.IOException: Maximum column length of 100,000 exceeded in column 3 in record 519,064. Set the SafetySwitch property to false if you're expecting column lengths greater than 100,000 characters to avoid this error.
 at com.csvreader.CsvReader.readRecord(CsvReader.java:841)
 at net.sourceforge.squirrel_sql.plugins.dataimport.importer.csv.CSVFileImporter.next(CSVFileImporter.java:123)
 at net.sourceforge.squirrel_sql.plugins.dataimport.ImportDataIntoTableExecutor._execute(ImportDataIntoTableExecutor.java:160)
 at net.sourceforge.squirrel_sql.plugins.dataimport.ImportDataIntoTableExecutor.access$000(ImportDataIntoTableExecutor.java:51)
 at net.sourceforge.squirrel_sql.plugins.dataimport.ImportDataIntoTableExecutor$1.run(ImportDataIntoTableExecutor.java:108)

Continue reading “Squirrel SQL: Maximum column length of 100,000 exceeded”

J-ExifTool v0.0.4

Today I’ve released version 0.0.4 of J-ExifTool. This version adds support for unsupported tags and for changing the languages of the error messages. Furthermore, I’ve improved the JavaDoc a bit and changed some internal bits.

The new jar can be downloaded from BitBucket.

Following example explains how to add support for unsupported tags.

Example: new Tag for Sony Camera’s

Following Tag class will create support for an Exif tag which is specific to Sony.

public enum SonyTag implements Tag {
                LENSSPEC("LensSpec", false, false, false, DataType.STRING);
                private final boolean avoided;
                private final boolean unsafe;
                private final boolean protectedField;
                private final String name;
                private final DataType type;

                private TestTagClass(final String name, final boolean unsafe, final boolean avoided, final boolean protectedField, final DataType type) {
                        this.avoided = avoided;
                        this.unsafe = unsafe;
                        this.protectedField = protectedField;
                        this.name = name;
                        this.type = type;
                }

The only thing left to do is register the new Tags:

TagUtil.register(SonyTag.class);

Following example explains how to change the language of the error messages to Dutch

Example: change language to Dutch

Cal10nUtil.changeLocale(new Locale("nl"));

Currently supported languages are “en” and “nl”. If you try any other language, then J-ExifTool will fall back to English.

J-ExifTool v0.0.3

Today I’ve released version 0.0.3 of J-ExifTool. This version adds support for GPS tags.

This new version adds 1 new methods to JExifInfo which allows you to set all mandatory GPS tags at once (a JExifValidationException is thrown when a parameter is missing, other than that there’s no validation)

  • setGPSInfo

The new jar can be downloaded from BitBucket.

Following examples explain how to use the setGPSInfo method.

Example 1: decimal format

Following example will place the image at 50.84791165546716N 4.350469368264016E at an altitude of 50m above sea level (0 == above sea level).

 JExifTool tool = new JExifTool();
 JExifInfo gpsInfo = tool.getInfo(new File("gps.jpg"));
 gpsInfo.setGPSInfo("50.84791165546716", "N", "4.350469368264016", "E", "50", "0");
 tool.stop();
 

Example 2: DMS format

This example will place the image at 100m below sea level (1 == below sea leven) somewhere in the South Pacific Ocean (at 60.586967S 131.835938W)

JExifTool tool = new JExifTool();
JExifInfo gpsInfo = tool.getInfo(new File("gps.jpg"));
gpsInfo.setGPSInfo("60 35 13.08", "S", "131 50 9.38", "W", "100", "1");
tool.stop();

Just for reference, v0.0.3 = revision dbd80ff67380.

J-ExifTool v0.0.2

Today I’ve released version 0.0.2 of J-ExifTool. I’ve been so naughty to change the signature of some methods in JExifInfo, so be aware of this when upgrading.

This new version adds 4 new methods to JExifInfo to read all tag-values at once from a single image:

  • getAllTagsValues
  • getAllExactTagsValues
  • getAllSupportedTagsValues
  • getAllSupportedExactTagsValues

As the names imply, they either read out all the tag values in human readable format or in exact format and they return all the tags (as String) or only those supported by J-ExifTool (as Tag.class).

For some bizarre reason, the unit tests for reading out all the tag values sometimes fail, I’m not sure why it skips certain tags from time to time (random behaviour), so be aware that it might happen (it’s v0.0.2 for a reason ;) ).

The new jar can be downloaded from BitBucket.

Just for reference, v0.0.2 = revision d4a45a6189fe.

J-ExifTool v0.0.1

Today I’ve released the first version of J-ExifTool together with its source code on BitBucket.  It’s the first version and it’s still very, very beta so I won’t guarantee that it’ll work flawlessly but if you find any bugs, please let me know and I’ll do my best to fix them :) .

The only prerequisites are that you have ExifTool by Phil Harvey installed somewhere on your computer and that you point towards it via the exiftool.path system property (as explained on the wiki) . Also, obviously, you’ll need some other dependencies which I’ve kindly put in a zip for you (there are better ways I know, but the sun is shining and I’m not in the mood to find a better way atm :-P ).

Reading and writing tags should now be as easy as

JExifTool tool = new JExifTool(); //starts exiftool process
JExifInfo info1 = tool.getInfo(new File("test-resources/read01.JPG")); // create proxy
System.out.println("ISO value is " +  info1.getTag(ExifIFD.ISO)); //execute read
System.out.println("Focal length changed to " + info1.setTag(ExifIFD.FOCALLENGTH, "5.0"));

For reference purposes only: git revision a2c4c7c5eb22 = v0.0.1 .