Jump to content
We've recently updated our Privacy Statement, available here ×

EXTERNALD ATABASE A UTHENTICATION WITH ORACLE 12C(Community Edition)


udit.rajput2010

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...