[closed] Farcrysolrpro lucee 5.2 and Magic match pattern is null

Hi All,
Is anyone running FarcrySolrpro (1.4.1) on lucee 5.2?
Looks like the issue is when its trying to load Tika.

I’m getting :

Core Version:	7.2.4
Instance:	unknown
Message:	Magic match pattern is null
Error Details
Exception Type:	java.lang.IllegalArgumentException
Tag Context:	
/srv/www/htdocs/farcry/plugins/farcrysolrpro/packages/forms/configSolrServer.cfc (line: 161)
/srv/www/htdocs/farcry/plugins/farcrysolrpro/config/_serverSpecificVarsAfterInit.cfm (line: 10)
/srv/www/htdocs/farcry/core/Application.cfc (line: 362)
/srv/www/htdocs/Application.cfc (line: 8)
/srv/www/htdocs/farcry/core/Application.cfc (line: 621)
/srv/www/htdocs/farcry/core/Application.cfc (line: 435)
/srv/www/htdocs/Application.cfc (line: 45)

There’s a similar issue for cfsolrlib on GitHub running on Lucee 5.x:

AFAIK, JAR files and JavaLoader should still work in Lucee 5.x just as they did in Lucee 4.5.x. It looks like the Tika constructor is overloaded, so I’m not sure if this is a Lucee bug in how the constructor is being called – but it looks like that error message does come directly from here:

I’m not sure how the MagicDetector gets configured/initialised – it could be something to do with configuration, or perhaps it is indeed a Lucee 5.x related issue. I wonder if @jeff or @seancoyne have any ideas? :smiley:

We run the majority of our sites under ACF and haven’t seen this so it is at least Lucee specific. The only thing I could suggest is to try swapping out the Tika jar for a newer version and see if that gets around the issue. I’d accept a pull request if it fixes it (and still works on ACF 10+)

1 Like

I updated to Tika 1.14, now I have the below error.
I’ll have another crack at it later today on another server and see if it’s my server.

Message:	Syntax Error, Invalid Construct
Error Details
Exception Type:	template
Tag Context:	
/farcry/plugins/farcrysolrpro/packages/custom/cfsolrlib/components/cfsolrlib.cfc (line: 1)
/farcry/plugins/farcrysolrpro/packages/forms/configSolrServer.cfc (line: 164)
/farcry/plugins/farcrysolrpro/config/_serverSpecificVarsAfterInit.cfm (line: 10)
/farcry/core/Application.cfc (line: 362)
/farcry/core/Application.cfc (line: 621)
/farcry/core/Application.cfc (line: 435)
/farcry/core/webtop/Application.cfc (line: 10)

Looks like it’s a Lucee 5.x issue.
I’ve tried multiple versions of Tika with Lucee 5.2 and 5.1. Up to 1.4 fail with the Magic match pattern is null and from 1.5 it’s the Syntax Error, Invalid Construct error.
Tika 1.14 works fine with Lucee 4.5.

Guess it’s hanging onto Lucee 4.5 for now.

If you can put together a simple test case that demonstrates the error on Lucee 5.x I’ll make sure it’s at least reviewed by the Lucee development team.

Ok looks like I have a solution. It’s a 2 part thing;

  1. Tika needs to be updated to a later version (I’ve used 1.14).
    This resolved the Magic Pattern error.

  2. cfsolrlib.cfc wasn’t encapsulated in a cfcomponent tag.
    This resolved the Syntax Error, Invalid Construct error.
    How did that go missing for so long. I guess lucee 5 is a bit stricter on components.

I’ll do a test in CF11 to make sure it works and then do a pull request.

Phil

1 Like

Ouch! Glad you found some workarounds :smiley:

Hi Sean,
Pull request done :slight_smile:

1 Like

Thanks, I’ll take a look this week

Hi Sean,
Any chance of committing that pull request and then updating the version num. I been caught out with the ‘indexing of draft items on save’ thinking I had the latest version.:sweat_smile:
Phil

version 1.5.0 released

1 Like