[ https://issues.apache.org/jira/browse/CASSANDRA-10026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14679167#comment-14679167 ]
Sam Tunnicliffe commented on CASSANDRA-10026: --------------------------------------------- pushed to the same location [~snazy]'s suggestion for a custom UDF executor based on {{JMXEnabledThreadPoolExecutor}} > AccessControlException in UFPureScriptTest > ------------------------------------------ > > Key: CASSANDRA-10026 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10026 > Project: Cassandra > Issue Type: Bug > Reporter: Sam Tunnicliffe > Assignee: Sam Tunnicliffe > Fix For: 3.0 beta 1 > > > CASSANDRA-9129 removed {{JMXEnabledScheduledThreadPoolExecutor}} and replaced > its usage in {{JavaBasedUDFuntion}} and {{ScriptBasedUDFunction}} with > {{JMXEnabledThreadPoolExecutor}} as the scheduling capabilities were not > required. This causes an {{AccessControlException}} as > {{JMXEnabedThreadPoolExecutor}} & {{DebuggableThreadPoolExecutor}} reference > internal {{o.a.c}} classes which is not permitted by the UDF execution > sandbox's {{SecurityManager}}. > JUnit output contains a bunch of > {noformat} > [junit] Exception: java.security.AccessControlException thrown from the > UncaughtExceptionHandler in thread "UserDefinedScriptFunctions:1" > {noformat} > And ultimately fails with: > {noformat} > [junit] Testcase: > testJavascriptSimpleCollections(org.apache.cassandra.cql3.validation.entities.UFPureScriptTest): > Caused an ERROR > [junit] execution of 'cql_test_keyspace_alt.function_1[list<double>]' failed: > java.lang.IllegalArgumentException: Invalid thread ID parameter: 0 > [junit] org.apache.cassandra.exceptions.FunctionExecutionException: execution > of 'cql_test_keyspace_alt.function_1[list<double>]' failed: > java.lang.IllegalArgumentException: Invalid thread ID parameter: 0 > [junit] at > org.apache.cassandra.exceptions.FunctionExecutionException.create(FunctionExecutionException.java:35) > [junit] at > org.apache.cassandra.cql3.functions.UDFunction.execute(UDFunction.java:286) > [junit] at > org.apache.cassandra.cql3.selection.ScalarFunctionSelector.getOutput(ScalarFunctionSelector.java:60) > [junit] at > org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:535) > [junit] at > org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:363) > [junit] at > org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:351) > [junit] at > org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:581) > [junit] at > org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:348) > [junit] at > org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:364) > [junit] at > org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:72) > [junit] at > org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:337) > [junit] at org.apache.cassandra.cql3.CQLTester.execute(CQLTester.java:654) > [junit] at > org.apache.cassandra.cql3.validation.entities.UFPureScriptTest.testJavascriptSimpleCollections(UFPureScriptTest.java:89) > [junit] Caused by: java.lang.IllegalArgumentException: Invalid thread ID > parameter: 0 > [junit] at sun.management.ThreadImpl.verifyThreadIds(ThreadImpl.java:154) > [junit] at > sun.management.ThreadImpl.verifyThreadCpuTime(ThreadImpl.java:227) > [junit] at sun.management.ThreadImpl.getThreadCpuTime(ThreadImpl.java:251) > [junit] at sun.management.ThreadImpl.getThreadCpuTime(ThreadImpl.java:222) > [junit] at > org.apache.cassandra.cql3.functions.UDFunction.executeAsync(UDFunction.java:369) > [junit] at > org.apache.cassandra.cql3.functions.UDFunction.execute(UDFunction.java:272) > [junit] > [junit] > [junit] Test org.apache.cassandra.cql3.validation.entities.UFPureScriptTest > FAILED > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)