ORA-01031: insufficient privileges - Weblogic

This is a discussion on ORA-01031: insufficient privileges - Weblogic ; When we tried to parse the below query using OCI Driver we are getting the subject error. Please help us to resolve this. Query ===== " SELECT " + " TIMESTAMP," + " REMOTE_USER," + " COMMENTS " + "FROM ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ORA-01031: insufficient privileges

  1. ORA-01031: insufficient privileges

    When we tried to parse the below query using OCI Driver we are getting
    the subject error. Please help us to resolve this.

    Query
    =====

    " SELECT "
    + " TIMESTAMP,"
    + " REMOTE_USER,"
    + " COMMENTS "
    + "FROM "
    + " ACTIVITY_LOG A,"
    + " USERS U "
    + "WHERE "
    + " FEATURE_ID = :FEATURE AND"
    + " A.CLIENT_ID = :CLIENT_ID AND"
    + " A.REMOTE_USER = U.USERNAME AND"
    + " TIMESTAMP BETWEEN TO_DATE(:START_DATE,'mm/dd/yyyy
    hh24:mi:ss') AND"
    + " TO_DATE(:END_DATE,'mm/dd/yyyy hh24:mi:ss') AND" + "
    U.ID IN "
    + DbBindUtil.getIntArrayClause() + " ORDER BY TIMESTAMP";

    Error log:

    java.sql.SQLException: ORA-01031: insufficient privileges
    at weblogic.db.oci.OciCursor.getCDAException(OciCurso r.java:
    259)
    at weblogic.jdbc.oci.Statement.private_parse(Statemen t.java:
    818)
    at
    weblogic.jdbc.oci.Connection.prepareStatement(Conn ection.java:717)
    at
    weblogic.jdbc.pool.Connection.prepareStatement(Con nection.java:393)
    at
    com.atroad.report12.authorization.RbacAuditTrailRe portCommand.getAuditRecords(RbacAuditTrailReportCo mmand.java:
    311)
    at
    com.atroad.report12.authorization.RbacAuditTrailRe portCommand.execute(RbacAuditTrailReportCommand.ja va:
    249)
    at
    com.atroad.report12.ArReportServlet.doPost(ArRepor tServlet.java:106)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:
    760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:
    853)
    at
    weblogic.servlet.internal.ServletStubImpl
    $ServletInvocationAction.run(ServletStubImpl.java: 1104)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:
    430)
    at
    weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:20)
    at
    weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    27)
    at com.atroad.util.UTF8Filter.doFilter(UTF8Filter.jav a:25)
    at
    weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    27)
    at
    com.atroad.util.security.LoginFilter.doFilter(Logi nFilter.java:81)
    at
    weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    27)
    at
    weblogic.servlet.internal.WebAppServletContext
    $ServletInvocationAction.run(WebAppServletContext. java:5770)
    at
    weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:
    690)
    at
    weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:
    3230)
    at
    weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:
    2642)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:
    262)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:224)


  2. Re: ORA-01031: insufficient privileges

    Hi. We need to discover if there's any reason it's not simply a
    permissions issue.
    What happens if you log in to the same DBMS, using SQL-PLUS and the
    same user/password, and try the same query?
    Joe Weinstein at BEA Systems


    On Apr 3, 12:13 am, rajkumar.gayat...@gmail.com wrote:
    > When we tried to parse the below query using OCI Driver we are getting
    > the subject error. Please help us to resolve this.
    >
    > Query
    > =====
    >
    > " SELECT "
    > + " TIMESTAMP,"
    > + " REMOTE_USER,"
    > + " COMMENTS "
    > + "FROM "
    > + " ACTIVITY_LOG A,"
    > + " USERS U "
    > + "WHERE "
    > + " FEATURE_ID = :FEATURE AND"
    > + " A.CLIENT_ID = :CLIENT_ID AND"
    > + " A.REMOTE_USER = U.USERNAME AND"
    > + " TIMESTAMP BETWEEN TO_DATE(:START_DATE,'mm/dd/yyyy
    > hh24:mi:ss') AND"
    > + " TO_DATE(:END_DATE,'mm/dd/yyyy hh24:mi:ss') AND" + "
    > U.ID IN "
    > + DbBindUtil.getIntArrayClause() + " ORDER BY TIMESTAMP";
    >
    > Error log:
    >
    > java.sql.SQLException: ORA-01031: insufficient privileges
    > at weblogic.db.oci.OciCursor.getCDAException(OciCurso r.java:
    > 259)
    > at weblogic.jdbc.oci.Statement.private_parse(Statemen t.java:
    > 818)
    > at
    > weblogic.jdbc.oci.Connection.prepareStatement(Conn ection.java:717)
    > at
    > weblogic.jdbc.pool.Connection.prepareStatement(Con nection.java:393)
    > at
    > com.atroad.report12.authorization.RbacAuditTrailRe portCommand.getAuditRecords(RbacAuditTrailReportCo mmand.java:
    > 311)
    > at
    > com.atroad.report12.authorization.RbacAuditTrailRe portCommand.execute(RbacAuditTrailReportCommand.ja va:
    > 249)
    > at
    > com.atroad.report12.ArReportServlet.doPost(ArRepor tServlet.java:106)
    > at javax.servlet.http.HttpServlet.service(HttpServlet .java:
    > 760)
    > at javax.servlet.http.HttpServlet.service(HttpServlet .java:
    > 853)
    > at
    > weblogic.servlet.internal.ServletStubImpl
    > $ServletInvocationAction.run(ServletStubImpl.java: 1104)
    > at
    > weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:
    > 430)
    > at
    > weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:20)
    > at
    > weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    > 27)
    > at com.atroad.util.UTF8Filter.doFilter(UTF8Filter.jav a:25)
    > at
    > weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    > 27)
    > at
    > com.atroad.util.security.LoginFilter.doFilter(Logi nFilter.java:81)
    > at
    > weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:
    > 27)
    > at
    > weblogic.servlet.internal.WebAppServletContext
    > $ServletInvocationAction.run(WebAppServletContext. java:5770)
    > at
    > weblogic.security.service.SecurityServiceManager.r unAs(SecurityServiceManager.java:
    > 690)
    > at
    > weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:
    > 3230)
    > at
    > weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:
    > 2642)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:
    > 262)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:224)



+ Reply to Thread