I am using external database authentication with oracle 12c. How can write "SELECT u.username,u.password,u.enabled FROM jiuser u WHERE u.username = ?" Query In Oracle database. I have try SELECT USER_NICK_NAME username, PASSWORD, 'true' enabled FROM XXCP_USER_LOGIN WHERE USER_NICK_NAME = 'akhilesh.kumar' Tools: Configuration File Name applicationContext-externalAuth-db.xml <bean id="externalUserDetailsService" class="com.jaspersoft.jasperserver.api.security.externalAuth.db.ExternalJDBCUserDetailsService"> <property name="dataSource" ref="externalDataSource"/> <property name="usersByUsernameQuery" value="SELECT USER_NICK_NAME username, PASSWORD, 'true' enabled FROM XXCP_USER_LOGIN WHERE USER_NICK_NAME = ?"/> <property name="authoritiesByUsernameQuery" value="SELECT u.USER_NICK_NAME username, r.ROLE_NAME rolename FROM XXCP_USER_LOGIN u, XXCP_ROLE r WHERE u.ROLE_ID = r.ROLE_ID and u.USER_NICK_NAME = ?"/> </bean> Java 8 Oracle 12c jasper Server 6.3.0 community Edition. Tomcat 8 Stack trace: ERROR EncryptionAuthenticationProcessingFilter,http-nio-8080-exec-9:218 - An internal error occurred while trying to authenticate the user. org.springframework.security.authentication.InternalAuthenticationServiceException: PreparedStatementCallback; uncategorized SQLException for SQL [sELECT USER_NICK_NAME username, PASSWORD, 'T' enabled FROM XXCP_USER_LOGIN WHERE USER_NICK_NAME = ?]; SQL state [99999]; error code [17059]; Fail to convert to internal representation; nested exception is java.sql.SQLException: Fail to convert to internal representation How can i use boolean datatype in ORACLE. Please Help me.