[
https://issues.apache.org/jira/browse/DERBY-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799073#action_12799073
]
vinay shukl commented on DERBY-4511:
------------------------------------
Rick,
Thansk for your quick reply. The test case is that we have a db table where we
have record of our schedule tasks(Scheduler Functionality). Our server picks
task and run it, after completion of the task it updates the db with next run
parameter.
The error appears to occur when Scheduler is performing a "SELECT ... FOR
UPDATE" to retrieve the scheduled task data from table. The error itself
suggests that some sort of authorization failed, but I'm unfamiliar with how
Derby handles access-privileges.
In any case, what I've noticed is that
org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(Activation, int)
performs a verification to determine if the current instance of
org.apache.derby.impl.sql.conn.GenericStatementContext has the appropriate
privileges for the current operation (e.g. READ, WRITE or CALL). By default,
the GenericStatementContent is given full-access.
GenericStatementContent.getSQLAllowed() is called to retrieve the current
access-level. This method could potentially return no-access
(org.apache.derby.catalog.types.RoutineAliasInfo.NO_SQL) if the current
instance is set as "not in use". However, I haven't been able to determine a
scenario which could possibly flag the GenericStatementContext as "not in use",
because it's explicitly set to "in use" earlier;
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.pushStatementContext().
The issue is intermittent, so I doubt there's anything wrong with the actual
table or data.
Hope this much information will help.
Thanks,
Vinay
> Error while Retrieving view data from database
> --------------------------------------------------
>
> Key: DERBY-4511
> URL: https://issues.apache.org/jira/browse/DERBY-4511
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Reporter: vinay shukl
>
> I am running an application ,in which I have used Apache Derby as a backend.
> While retrieving the values from resultset i am getting below error.
> ERROR 38001: The external routine is not allowed to execute SQL statements.
> at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> at
> org.apache.derby.impl.sql.conn.GenericAuthorizer.externalRoutineException(Unknown
> Source)
> at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(Unknown Source)
> at
> org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDeleteCascadeResultSet(Unknown
> Source)
> at
> org.apache.derby.exe.aceeb848bfx0125xd416xdf4ex00000e7f746f8c.fillResultSet(Unknown
> Source)
> at
> org.apache.derby.exe.aceeb848bfx0125xd416xdf4ex00000e7f746f8c.execute(Unknown
> Source)
> at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
> Source)
> at
> com.wm.app.b2b.server.dispatcher.JoinDBUtil.deleteExpiredAndFinishedTriggers(JoinDBUtil.java:396)
> at
> com.wm.app.b2b.server.dispatcher.JoinManager$JoinManagerTimeoutThread.run(JoinManager.java:200)
> at com.wm.util.pool.PooledThread.run(PooledThread.java:118)
> at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.