Hello
I am new to hibernate but have played with it enough to implement it within a product. I am working a support issue currently where a customer is seeing within a dialogue box (swing JTextField) that the value of APM_SCENARIOS_NAMED_VALUES_TAB.val is truncated to 255 characters.
The DB is correct and is set to VARCHAR(2000). I even recreated all the tables to make sure that wasnt it.
Now the funny thing is the dev DB instance of our customer is not having this while the prod instance is. I have not been able to reproduce this until just recently.
This is the value in the DB (its long and ugly, with some URLencoded characters)
/login/00login.fcc?TYPE=33554433&REALMOID=06-781e84be-e97b-40f0-896c-8ba85b7f7d69&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=-SM-rTgCiRj%2fV8CXRrxJRRWPvpKrFMSIBqse%2brBHGHgkpSqmIs6aLrOE7g%3d%3d&TARGET=-SM-http%3a%2f%2fnlaasp05server1%2esubsidia%2eorg%3a8001%2fcarteclient%2fdefault%2easp
But it alwayws comes out as
/login/00login.fcc?TYPE=33554433&REALMOID=06-781e84be-e97b-40f0-896c-8ba85b7f7d69&GUID=&SMAUTHREASON=0&METHOD=GET&SMAGENTNAME=-SM-rTgCiRj%2fV8CXRrxJRRWPvpKrFMSIBqse%2brBHGHgkpSqmIs6aLrOE7g%3d%3d&TARGET=-SM-http%3a%2f%2fnlaasp05server1%2esubsidia%2eorg%3a8
its basically cut-off at 255 characters. Now if I use some code we have that imports data via an XML stream. It goes into the database fine. Once I update, then it overwrites the DB.
I thought it might have to do with collation but that was confirmed not an issue.
Any help would be great.
One more note. I do get a reflection error, I thought it may have to do with the column="val" type="string" length="2000" for an element node under the map collection.
2005-04-26 11:24:46,238 INFO net.sf.hibernate.util.ReflectHelper - reflection optimizer disabled for: com.mosol.integration.apm.data.bean.Scenario, InstantiationError: com.mosol.integration.apm.data.bean.Scenario
Hibernate version: version 2.1.2
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping default-cascade="all">
<class name="com.mosol.integration.apm.data.bean.Scenario" table="APM_SCENARIOS_TAB" discriminator-value="null">
<cache usage="read-write"/>
<id name="id" type="long" unsaved-value="0">
<generator class="increment"/>
</id>
<discriminator column="scenario_type" type="string" not-null="false" force="true" />
<property name="name" column="name" type="string" length="2000"/>
<property name="type" column="scenario_type" insert="false" update="false"/>
<property name="shared" column="is_shared"/>
<property name="timeCreated" type="timestamp"/>
<property name="lastUpdated" type="timestamp"/>
<map name="namedValues" table="APM_SCENARIOS_NAMEDVALUES_TAB" cascade="all">
<cache usage="read-write"/>
<key column="scenario_id" />
<index column="name" type="string" length="150"/>
<element column="val" type="string" length="2000" />
</map>
<set name="responseTimeThresholds" cascade="all" table="APM_SCENARIOS_RT_THRESH_TAB">
<cache usage="read-write"/>
<key>
<column name="scenario_id" not-null="true" />
</key>
<composite-element class="com.mosol.integration.apm.data.bean.Scenario$Threshold">
<property name="alarmSeverity"/>
<property name="alarmDescription"/>
<property name="type" column="rt_type"/>
<property name="lower" column="lo" />
<property name="upper" column="hi" />
</composite-element>
</set>
</class>
<class name="com.mosol.integration.apm.data.bean.ScenarioActivation" table="APM_TESTS_SCENARIOS_TAB" >
<composite-id unsaved-value="any">
<key-many-to-one name="test" column="test_id" class="com.mosol.integration.apm.data.bean.Test" />
<key-many-to-one name="scenario" column="scenario_id" class="com.mosol.integration.apm.data.bean.Scenario" />
<key-property name="position" column="pos"/>
</composite-id>
<property name="active" column="is_active"/>
<many-to-one name="identity" column="identity_id" class="com.mosol.integration.apm.data.bean.Identity" />
<many-to-one name="proxy" column="proxy_id" class="com.mosol.integration.apm.data.bean.Proxy" />
<many-to-one name="cookie" column="cookie_id" class="com.mosol.integration.apm.data.bean.Cookie" />
</class>
<query name="scenarioOrphans"><![CDATA[
from com.mosol.integration.apm.data.bean.Scenario as scenario
where not exists(
from com.mosol.integration.apm.data.bean.ScenarioActivation as activation
where activation.scenario = scenario
and scenario.shared = false )
]]></query>
<query name="scenarioActivations"><![CDATA[
from com.mosol.integration.apm.data.bean.ScenarioActivation as activation
where activation.scenario = ?
]]></query>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
SQL Server 2000 with SP2
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
|