I keep getting an ArrayIndexOutOfBoundsException whenever I try to save() a mapped class. The class is a subclass (implements an interface) and is populated correctly (based on toString() debug output), but everytime it attempts to save, it throws that exception. Everything else is working (the site is 99% read only), so I have things setup correctly AFAICT. I've used p6spy to see what exactly it's doing, but it never logs the insert statement. The Hibernate show_sql shows the correct statement (not filled in of course).
The mapping file is:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.enventistelecom.custportal.businessobjects.CDRRecord" table="cdrRecord" discriminator-value="I">
<id name="id" unsaved-value="null">
<generator class="increment" />
</id>
<discriminator column="discriminator" type="character"/>
<property name="cdrLine"/>
<property name="siteId"/>
<property name="enventisCharge"/>
<property name="accountCode"/>
<property name="callDate"/>
<property name="callDuration"/>
<property name="countryCode"/>
<property name="dialedNumber"/>
<property name="originatingNumber"/>
<property name="originatingCity"/>
<property name="originatingState"/>
<property name="terminatingCity"/>
<property name="terminatingNumber"/>
<property name="terminatingState"/>
<property name="terminatingCity"/>
<property name="switched"/>
<property name="dedicated"/>
<property name="interstate"/>
<property name="intrastate"/>
<property name="tollFree"/>
<property name="extended"/>
<property name="incomingCall"/>
<property name="outgoingCall"/>
<property name="international"/>
<property name="canada"/>
<property name="mexico"/>
<property name="validRecord"/>
<property name="discriminator"/>
<subclass name="com.enventistelecom.custportal.businessobjects.SprintCDRRecord" discriminator-value="S">
</subclass>
</class>
</hibernate-mapping>
The insert statement shows up as:
insert into cdrRecord (cdrLine, siteId, enventisCharge, accountCode,
callDate, callDuration, countryCode, dialedNumber, originatingNumber, originatingCity, originatingState, terminatingNumber, terminatingState, terminatingCity, switched, dedicated, interstate, intrastate, tollFree, extended, incomingCall, outgoingCall, international, canada, mexico, validRecord, discriminator, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
'S', ?)
The exact error I'm getting is:
2003-10-07 11:53:38,195 ERROR (CDRRater.java:104) - java.lang.ArrayIndexOutOfBoundsException: 27
Any ideas or am I just doing something totally wrong? Thanks!
Chris
|