Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle clob with JPA and spring

552045Dec 15 2006 — edited Dec 18 2006
Hi,
I am trying to create/update a clob with JPA, spring, and using toplink as the JpaVendorAdapter, however, I am unable to do so. The exception that I am getting is:
[TopLink Warning]: 2006.12.15 12:51:58.730--ServerSession(32580443)--Thread(Thread[main,5,main])--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 9.1 (Build b25)): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00902: invalid datatype
Error Code: 902
Call:CREATE TABLE Q_SERVER_XML_CONFIG (ID INTEGER NOT NULL, CONFIGURATION_ID VARCHAR(255), PROPERTY_NAME VARCHAR(255), XML_VALUE LONGVARCHAR, PRIMARY KEY (ID))


This is my spring declaration:
<!-- At last, the entity manager. -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="ServerConfiguration"/>
<!-- InstrumentationLoadTimeWeaver expects you to start the appserver with
-javaagent:/Java/workspace2/spring/dist/weavers/spring-agent.jar -->
<property name="loadTimeWeaver">
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
</property>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
<property name="databasePlatform"
value="oracle.toplink.essentials.platform.database.HSQLPlatform"/>
<property name="generateDdl" value="true"/>
<property name="showSql" value="true" />
</bean>
</property>
</bean>


@Entity
@Table(name="Q_SERVER_XML_CONFIG")
@NamedQuery(name="findXmlByConfigurationId",
query = "SELECT x FROM XmlServerConfigObj x WHERE x.configurationId = :configurationId")
public class XmlServerConfigObj {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;


@Lob @Basic(fetch=FetchType.EAGER)
@Column(name="XML_VALUE")
private String xmlValue;
...............

Does anyone have a clue as to what I might be doing wrong? Please let me know if you do.

Thanks,
Sasipriya
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2007
Added on Dec 15 2006
1 comment
1,580 views