I received a ClassFormatError today while trying execute some insert SQL.  The SQL is quite long and abridged versions succeed.  I have not examined my data closely yet but I will.  Here is the full story:

In my database loading code I am working on updating a table (named ruling).  To do that the code drops the table and then creates it again followed by inserting the data (as read from an xml file).  The log contains the following

2006-09-07 13:21:26.067 GMT Thread[main,5,main] (XID = 5935), (SESSIONID = 1), drop table ruling ******* null
2006-09-07 13:21:27.082 GMT Thread[main,5,main] (XID = 5935), (SESSIONID = 1), create table ruling (ruling_id INT NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT ruling_pk PRIMARY KEY, card_id INT, ruling_date DATE, ruling VARCHAR (1024), CONSTRAINT ruling_card_fk FOREIGN KEY (card_id) REFERENCES card) ******* null
2006-09-07 13:21:28.911 GMT Thread[main,5,main] Wrote class org.apache.derby.exe.ac08264012x010dx8870x7dfdx0000000be0501 to file ac08264012x010dx8870x7dfdx0000000be0501.class. Please provide support with the file and the following exception information: java.lang.ClassFormatError: Invalid method Code length 69936 in class file org/apache/derby/exe/ac08264012x010dx8870x7dfdx0000000be0501
 
I have stepped through my code and the exception comes after I attempt to execute the insert sql that looks like this:
insert into ruling (card_id, ruling_date, ruling) values (1423,'2006-02-01','If your opponent discards any cards during his or her cleanup step to get down to the maximum hand size, the ability will trigger and players will receive priority. After that cleanup step ends, a new one will begin and Abyssal Nocturnus’s effect will end. It won’t carry over into the next turn.'),
(1423,'2006-02-01','If your opponent discards multiple cards to a single effect, this will trigger multiple times.'),
(1587,'2006-07-15','Adarkar Valkyrie’s ability can target a token creature, but since token creatures cease to exist when they leave play, it won’t be returned to play.'),
(956,'2005-10-01','Attacking creatures (including Agrus Kos) that are both red and white get +2/+2 until end of turn.'),
(674,'2004-12-01','The “play this ability only once each turn” restriction applies even if the creature changes controllers.'),
(349,'2005-06-01','Akuta must already be in your graveyard as your upkeep begins in order for its ability to trigger.'),
(349,'2005-06-01','In multiplayer games, it checks for each opponent.'),
(1589,'2006-07-15','You may pay the alternative cost rather than the card’s mana cost. Any additional costs are paid as normal.'),
(1589,'2006-07-15','Paying the alternative cost doesn’t change when you can play the spell. A creature spell you play this way, for example, can still only be played during your main phase while the stack is empty.'),
(1589,'2006-07-15','If you don’t have two cards of the right color in your hand, you can’t choose to play the spell using the alternative cost.'),
...
(346,'2005-06-01','You choose the mode on announcement.'),
(1424,'2006-02-01','AEtherplasm will return to your hand before any combat damage is assigned.'),
(1424,'2006-02-01','If you want, you can return AEtherplasm to your hand and not put anything into play. The attacking creature will still be considered blocked, so it won’t be able to deal combat damage to you unless it has trample or a similar ability.'),
(1424,'2006-02-01','The creature you put into play may be the AEtherplasm you just returned to your hand. This allows it to dodge abilities likeDeathgazer’s.'),
(1424,'2006-02-01','The creature you put into play from your hand is blocking the attacking creature, even if the block couldn’t legally be declared (for example, if that creature comes into play tapped, or it can’t block, or the attacking creature has protection from it).'),
(1424,'2006-02-01','Putting a blocking creature into play doesn’t trigger “When this creature blocks” and “When this creature becomes blocked” abilities. It also won’t check blocking restrictions, costs, or requirements.')

the total sql statement contains 1742 lines

When I create the sql statement with the shortest 150 lines (only those lines where the ruling text is < 80) instead all is well.  The maximum length of the ruling text is 700 characters so I am well under the 1024 limit on the column.

Is this a known issue?  Is my SQL too long?  I plan to look closely at my data but at 1741 lines of values that will take a while. 

Any help or advice would be appreciated.

Thanks,

Ian

--
Ian Leslie - Shareware Author (mailto:[EMAIL PROTECTED])

Reply via email to