• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sandbox security denying CFINDEX from indexing a collection (Solr/CF9)

LEGEND ,
May 23, 2013 May 23, 2013

Copy link to clipboard

Copied

Hello, everyone.

I did fix the last Sandbox security related issue with Solr collections - it was in the "Files/Dir" section, I had to put everything under C:\ColdFusion9\wwwroot.

Now, I'm facing yet another Sandbox related issue with collections.

I have one reindex script that has NO ISSUES when pulling data from a database and indexing a collection from that.

I have another reindex script that will not index a collection from a query, unless Sandbox is disabled.  I will try to give some pseudo code.

<cfquery name="search_results" datasource="documents">

  SELECT DOC_ID, DOC_NAME, DOC_DESCRIPTION

  FROM DOC

  WHERE DOC_ID in (<cfqueryparam value="#thisList#" cfsqltype="CF_SQL_VARCHAR" list="yes">)

</cfquery>

<cftry>

  <cfindex action="refresh" collection="collection_name" key="DOC_DESCRIPTION" type="custom" title="DOC_DESCRIPTION" query="search_results" body="DOC_ID, DOC_NAME, DOC_DESCRIPTION" status="results" />

  <cfcatch><cfdump var="#cfcatch#"></cfcatch>

</cftry>

The query will retrieve 15 records, with or without Sandbox.  But the CFINDEX will not work if Sandbox is enabled.

The other reindex script is not affected, either way.

What could be causing the CFINDEX to fail?

Thank you,

^_^

Views

842

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2013 May 24, 2013

Copy link to clipboard

Copied

The CFINDEX is not erroring, and it's contained within a CFTRY that will dump "cfcatch" if anything did error.  But the collection remains documents: 0 and size: 0.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 13, 2014 Jun 13, 2014

Copy link to clipboard

Copied

I had a similar issue with CFSEARCH on CF10 with sandbox security that I resolved by adding the following to the neo-security.xml file:

<struct><var name='CLASS'><string>java.net.SocketPermission</string></var><var name='TARGET'><string>127.0.0.1:0</string></var><var name='ACTION'><string>listen,resolve</string></var></struct></array></var></struct></var></struct>

That gives permission to listen on dynamic ports (the colon-zero part).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 24, 2014 Jun 24, 2014

Copy link to clipboard

Copied

LATEST

I ran into an issue with CFINDEX that was fixed by disabling Sandbox Security, running the CFINDEX, and then re-enabling. Perhaps the first time the collection is indexed requires elevated privileges?

It may have also helped to add sandbox access to C:\Users\<user_running_coldfusion_service>\AppData\Local\Temp\-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation