项目在tomcat下部署后,用对象message.getContent()可以获得content字段的值,可是在WebSphere下部署后获得content字段的内容为null,是怎么回事?
applicationContext.xml中:
<bean id ="nativeJdbcExtractor"
class ="org.springframework.jdbc.support.nativejdbc.WebSphereNativeJdbcExtractor"
lazy-init ="true"/>
<bean id ="oracleLobHandler" class ="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init ="true">
<property name ="nativeJdbcExtractor" ref ="nativeJdbcExtractor"/>
</bean>
bean.hbm.xml中
<property name="content" type="org.springframework.orm.hibernate3.support.ClobStringType">
<column name="CONTENT" />
</property>
这样就可以了~
<bean id ="nativeJdbcExtractor"
class ="org.springframework.jdbc.support.nativejdbc.WebSphereNativeJdbcExtractor"
lazy-init ="true"/>
<bean id ="oracleLobHandler" class ="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init ="true">
<property name ="nativeJdbcExtractor" ref ="nativeJdbcExtractor"/>
</bean>
bean.hbm.xml中
<property name="content" type="org.springframework.orm.hibernate3.support.ClobStringType">
<column name="CONTENT" />
</property>
这样就可以了~
温馨提示:答案为网友推荐,仅供参考
第1个回答 2012-06-05
和你一样的问题,求解。