You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Tony Chen <To...@LABONE.com> on 2005/06/27 15:59:00 UTC
invalid column type
Hi:
I received an Invalid Column Type error when querying an Oracle database. This issue is explained for Insert and Update. Does anyone know what is the reason for insert? The environment is Windows2000+JDeveloper. The message is like this
Cause:com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in oraclemag/view/sql-map.xml. --- The error occurred while applying a parameter map. --- Check the getEntitlementProfile-InlineParameterMap. --- Check the parameter mapping for the 'value' property. --- Cause: java.sql.SQLException: Invalid column type Caused by: java.sql.SQLException: Invalid column type
Here is the sqlmap
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap SYSTEM "file:///c:/dtd/sql-map-2.dtd">
<sqlMap namespace="IEntitlementProfile">
<!-- result maps -->
<select id="getEntitlementProfile" parameterClass="java.lang.String" resultClass="oraclemag.view.IEntitlementProfile">
SELECT
ACCESS_LEVEL as entitlementProfile_AccessLevel,
PASSWORD_DIGEST as entitlementProfile_DigestKey,
USER_ID_KEY as entitlementProfile_IndexKey,
LAST_LOGON_DATE as entitlementProfile_LastAccessed,
LOGON_ATTEMPTS as entitlementProfile_LogonAttempts,
PASSWORD as entitlementProfile_Password,
PASSWORD_EXPIRATION_DATE as entitlementProfile_PasswordExpiration,
STATUS as entitlementProfile_Status,
USER_ID as entitlementProfile_UserId,
VIEWONLY as entitlementProfile_ViewOnly
FROM EDB_USER
WHERE USER_ID = #value#
</select>
<!-- mapped statements -->
<update id="updatePassword" parameterClass="oraclemag.view.IEntitlementProfile">
UPDATE EDB_USER
SET PASSWORD_DIGEST = #entitlementProfile_AccessLevel#,
PASSWORD = #entitlementProfile_Password#,
PASSWORD_EXPIRATION_DATE = #entitlementProfile_PasswordExpiration#,
LOGON_ATTEMPTS = #entitlementProfile_LogonAttempts#
WHERE USER_ID = #entitlementProfile_UserId#
</update>
</sqlMap>
The sqlmap-config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig SYSTEM "file:///c:/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<!-- data source(s) -->
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="oracle.jdbc.driver.OracleDriver" />
<property name="JDBC.ConnectionURL" value="jdbc:oracle:thin:@cbssrv:1526:CLSREF" />
<property name="JDBC.Username" value="webres" />
<property name="JDBC.Password" value="resweb" />
<property name="JDBC.DefaultAutoCommit" value="false" />
<property name="Pool.MaximumActiveConnections" value="100" />
<property name="Pool.MaximumIdleConnections" value="0" />
<property name="Pool.QuietMode" value="false" />
</dataSource>
</transactionManager>
<sqlMap resource="oraclemag/view/sql-map.xml"/>
</sqlMapConfig>
Thanks in advance.
Tony Chen
9138952313
This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: securityincidentreporting@labone.com